3.2 KiB
3.2 KiB
Runtime Parameter Mapping
This file defines how sn-infographic infers runtime arguments for sn-image-base tools.
Inputs
Read from:
- the original user request
- any explicit follow-up confirmation from the user about size or ratio
Output Arguments
Map into:
--image-size--aspect-ratio
Image Size
Default: 2k — always used unless the user explicitly says otherwise. Never ask the user about this.
Rules:
- Never ask the user about
image_size. Default silently to2k. - If the user explicitly asks for lower cost, faster draft, quick concept, or small output, use
--image-size 1k. - If the user explicitly asks for higher detail, print-quality, poster-quality, fine text, or large output, use
--image-size 2k. - Otherwise use
--image-size 2k(default).
Aspect Ratio
Supported values:
2:33:23:44:34:55:41:116:99:1621:99:21
Use the first matching rule:
- If the user explicitly gives a supported ratio, use it directly.
- If the user confirms a ratio preference in a follow-up turn, use that confirmed value.
- If the user gives only orientation:
Portraitor竖屏-> prefer9:16; use4:5,3:4, or2:3when the prompt implies a print poster, editorial layout, or card-style portrait compositionLandscapeor横屏-> prefer16:9; use4:3,3:2,5:4, or21:9when the prompt implies classic slides, photography framing, near-square cards, or cinematic bannersSquareor方形->--aspect-ratio 1:1
- If neither ratio nor orientation is explicit, infer from the scene:
- phone wallpaper, story card, vertical reel cover, ultra-tall mobile infographic ->
9:16or9:21 - print poster, book cover, one-page portrait infographic ->
2:3 - editorial illustration, portrait card, magazine-style page ->
3:4 - social feed poster, product card, portrait marketing creative ->
4:5 - avatar, icon, logo mark, square cover ->
1:1 - presentation slide, dashboard, classroom chart, classic screen layout ->
4:3 - landscape photo, postcard, brochure hero, medium-width banner ->
3:2 - near-square desktop card, comparison board, compact infographic panel ->
5:4 - banner, keynote cover, widescreen infographic, landing hero ->
16:9 - cinematic hero, panoramic banner, ultra-wide header ->
21:9 - otherwise ->
16:9
- phone wallpaper, story card, vertical reel cover, ultra-tall mobile infographic ->
Notes
- The skill should pass
expanded_prompt(fromprompts-expand) as--prompt, not the raw user request. image_sizedefaults to2k— the Worker Agent must NOT ask the user about it.aspect_ratiois inferred from the originaluser_prompt(before expansion), not fromexpanded_prompt.- Prefer inference over interruption when there is one clearly reasonable choice.
- Ask the user only when multiple aspect ratios are genuinely plausible and the choice would materially change composition or layout.
- When asking the user, ask for
aspect_ratiodirectly instead of a vague "horizontal or vertical" question whenever possible. - Use
--save-pathto write the output directly to the task's temp directory (/tmp/openclaw/sn-infographic/<task_id>/round_<N>.png), avoiding a separate move step.