Loading...
Loading...
Generates professional infographics with various layout types and visual styles. Analyzes content, recommends layout and style, and generates publication-ready infographics. Use when user asks to create "infographic", "信息图", "visual summary", or "可视化".
npx skill4agent add opensensenova/sensenova-skills sn-infographicsn-image-generatesn-image-recognizesn-text-optimizesn-image-base| Parameter | Type | Default Value | Description |
|---|---|---|---|
| string | Required | User original request |
| int | | Maximum number of generation rounds |
| string | | Output mode: friendly / verbose |
| string | | expand strategy: auto / force / disable |
sn_agent_runner.pysn-image-base| Call Type | Tool | Authentication Parameters | Description |
|---|---|---|---|
| LLM | sn-text-optimize (evaluation/expansion) | Default reads | Built-in default points to Sensenova internal network service |
| VLM | sn-image-recognize (image review) | Default reads | Built-in default points to Sensenova internal network service |
| Image Generation | sn-image-generate | Default reads | Default uses image generation configuration of |
MissingApiKeyError$SN_IMAGE_BASE/references/api_spec.md$SN_IMAGE_BASE$SN_IMAGE_BASEsn-image-baseSKILL.mdsn-image-base| Role | Responsibility |
|---|---|
| Main Agent | Receive user request, normalize parameters, send preflight, start Worker, collect results, send text and images to user |
| Worker Agent | Execute orchestration loop (expand → multiple rounds of generation + review → sort), return structured JSON |
user_promptmax_roundsoutput_modefriendlyprompts_expand_modeauto"Using sn-infographic skill to generate infographic, please wait..."status=okneed_main_agent_send=trueresultviolationsstatus=errorerroruser_promptmax_roundsoutput_modeprompts_expand_modeSN_IMAGE_INFOGtask_idYYYYMMDD_HHMMSS/tmp/openclaw/sn-infographic/<task_id>/TEMP_DIRroundsaspect_ratio16:9image_size2kuser_prompt$SKILL_DIR/references/runtime-parameters.mdprompts_expand_modedisableuser_promptexpanded_promptEXPANDED_PROMPT="$USER_PROMPT"
echo "$EXPANDED_PROMPT" > "$TEMP_DIR/expanded-prompt.txt"prompts_expand_skipped = trueforceautorequired_resultsoptional_resultsrequired_passanswerrequired_results"yes"optional_passanswer="yes"optional_resultsshould_expand = not (required_pass and optional_pass)should_expand = trueshould_expand = falseprompts_expand_skipped = trueEXPANDED_PROMPT="$USER_PROMPT"
echo "$EXPANDED_PROMPT" > "$TEMP_DIR/expanded-prompt.txt"should_expand = truesn-image-basesn-text-optimizepython "$SN_IMAGE_BASE/scripts/sn_agent_runner.py" sn-text-optimize \
--system-prompt-path "$SKILL_DIR/references/evaluation-standard.md" \
--user-prompt "$USER_PROMPT" \
--output-format jsonsn-image-basesn-text-optimizeANALYSIS=$(python "$SN_IMAGE_BASE/scripts/sn_agent_runner.py" sn-text-optimize \
--system-prompt-path "$SKILL_DIR/references/analysis-framework.md" \
--user-prompt "$USER_PROMPT" \
--output-format json)analysis.json$TEMP_DIR/analysis.jsonecho "$ANALYSIS" > "$TEMP_DIR/analysis.json"$TEMP_DIR/analysis.jsonANALYSIS=$(cat "$TEMP_DIR/analysis.json")data_typetoneaudiencelayoutstyle$SKILL_DIR/references/layout-style-selection.mdLAYOUT_DEF=$(cat "$SKILL_DIR/references/layouts/<layout>.md")
STYLE_DEF=$(cat "$SKILL_DIR/references/styles/<style>.md")hub-spokecorporate-memphis$TEMP_DIR/layout-style.jsonlayout-style.json{
"layout": "<layout>",
"style": "<style>"
}user_promptANALYSIS=$(cat "$TEMP_DIR/analysis.json")
LAYOUT_STYLE=$(cat "$TEMP_DIR/layout-style.json")
STRUCTURED_CONTENT_TEMPLATE=$(cat "$SKILL_DIR/references/structured-content-template.md")analysis.jsoncat > "$TEMP_DIR/structured-content.md" << 'EOF'
<Content generated based on structured-content-template.md format>
EOFsn-image-basesn-text-optimizeSTRUCTURED_CONTENT=$(cat "$TEMP_DIR/structured-content.md")
LAYOUT_STYLE=$(cat "$TEMP_DIR/layout-style.json")
LAYOUT=$(echo "$LAYOUT_STYLE" | jq -r '.layout')
STYLE=$(echo "$LAYOUT_STYLE" | jq -r '.style')
LAYOUT_DEF=$(cat "$SKILL_DIR/references/layouts/${LAYOUT}.md")
STYLE_DEF=$(cat "$SKILL_DIR/references/styles/${STYLE}.md")
cat > "$TEMP_DIR/expand-system-prompt.md" << EOF
$(cat "$SKILL_DIR/references/prompts-expand-system.md")
---
## Selected Layout: $LAYOUT
$LAYOUT_DEF
---
## Selected Style: $STYLE
$STYLE_DEF
---
## Output Template Reference
$(cat "$SKILL_DIR/references/base-prompt.md")
EOFstructured-content.mdpython "$SN_IMAGE_BASE/scripts/sn_agent_runner.py" sn-text-optimize \
--system-prompt-path "$TEMP_DIR/expand-system-prompt.md" \
--user-prompt "$STRUCTURED_CONTENT" \
--output-format jsonresultexpanded_promptecho "$EXPANDED_PROMPT" > "$TEMP_DIR/expanded-prompt.txt"round1max_roundssn-image-basesn-image-generatepython "$SN_IMAGE_BASE/scripts/sn_agent_runner.py" sn-image-generate \
--prompt "$EXPANDED_PROMPT" \
--image-size "$IMAGE_SIZE" \
--aspect-ratio "$ASPECT_RATIO" \
--save-path "$TEMP_DIR/round_<N>.png" \
-o jsonmax_rounds > 1max_rounds > 1python "$SN_IMAGE_BASE/scripts/sn_agent_runner.py" sn-image-recognize \
--system-prompt-path "$SN_IMAGE_INFOG/references/prompts-critic-system.md" \
--user-prompt "Evaluate the diagram in the image against the rules. Output your assessment." \
--images "$TEMP_DIR/round_<N>.png" \
--output-format jsonreferences/prompts-critic-system.md{
"round": 1,
"image": "$TEMP_DIR/round_1.png",
"result": "PASS|FAIL",
"violations_count": 0,
"violations": [],
"reasoning": "<Reasoning process, empty string when max_rounds=1>",
"timing": {
"image_generation": { "elapsed_seconds": 12.34, "model": "sn_image_model" },
"vlm_review": { "elapsed_seconds": 5.67, "model": "sensenova-6.7-flash-lite" }
}
}elapsed_seconds--output-format jsonimage_generation.model"sn_image_model"vlm_review.modeltiming.vlm_reviewmax_rounds=1max_rounds > 1result=PASSresult=FAILviolations_countround{
"status": "ok",
"need_main_agent_send": true,
"output_mode": "friendly|verbose",
"expanded_prompt": "<always contains when output_mode=verbose; value is original user_prompt when prompts_expand_skipped=true, otherwise is expanded result>",
"prompts_expand_skipped": true,
"early_terminated": true,
"timing": {
"total_elapsed_seconds": 35.12,
"prompt_detection": { "elapsed_seconds": 2.11, "model": "sensenova-6.7-flash-lite" },
"content_analysis": { "elapsed_seconds": 3.22, "model": "sensenova-6.7-flash-lite" },
"prompt_expand": { "elapsed_seconds": 8.45, "model": "sensenova-6.7-flash-lite" }
},
"rounds": [
{
"round": 1,
"image": "$TEMP_DIR/round_1.png",
"result": "PASS|FAIL",
"violations_count": 0,
"violations": [],
"reasoning": "<Reasoning process, empty string when max_rounds=1>",
"timing": {
"image_generation": { "elapsed_seconds": 12.34, "model": "sn_image_model" },
"vlm_review": { "elapsed_seconds": 5.67, "model": "sensenova-6.7-flash-lite" }
}
}
]
}{
"status": "error",
"error": "<Actual error information>"
}status=okneed_main_agent_send: trueexpanded_promptoutput_mode=verboseuser_promptprompts_expand_skipped=trueprompts_expand_skippedtrueprompts_expand_mode=disableprompts_expand_mode=autoearly_terminatedtrueviolationsreasoningmax_rounds=1timingtotal_elapsed_secondsprompt_detectionelapsed_secondsmodelprompts_expand_mode=disablecontent_analysiselapsed_secondsmodelprompt_expandelapsed_secondsmodelrounds[].timing.image_generation.model"sn_image_model"rounds[].timing.vlm_reviewmax_rounds=1max_rounds = 1expanded_promptmax_rounds > 1resultviolationsresult=PASSresult=FAILresult=FAILQuality ranking result (high -> low)
---
Expanded prompt: [expanded | not expanded, using original prompt]
<expanded_prompt>
---
#1 round=<n> result=<PASS|FAIL> violations=<n> [early terminated]
#2 round=<n> result=<PASS|FAIL> violations=<n>
...
---
Time statistics: Total <total>s | Prompt evaluation <t>s | Content analysis <t>s | Prompt expansion <t>s | Image generation <t>s×<n> rounds | VLM review <t>s×<n> rounds
---
Images (sent in rank order)sn-image-basesn-image-generatesn-image-recognizesn-text-optimizereferences/analysis-framework.mdreferences/base-prompt.mdreferences/evaluation-standard.mdreferences/layout-style-selection.mdreferences/prompts-expand-system.mdreferences/prompts-critic-system.mdreferences/runtime-parameters.mdreferences/structured-content-template.mdreferences/layouts/<layout>.mdreferences/styles/<style>.md