Best for
- Use when user asks to "imitate style", "保持这个风格重画", "按这张图风格生成", or "style transfer with new content".
OpenSenseNova/SenseNova-Skills/skills/sn-image-imitate/SKILL.md
Use it for engineering and operations tasks; the detail page covers purpose, installation, and practical steps.
Decision brief
Image style imitation scene skill (tier 1), relying on the sn-image-recognize, sn-text-optimize, and sn-image-generate tools provided by sn-image-base (tier 0).
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/OpenSenseNova/SenseNova-Skills --skill "skills/sn-image-imitate"Inspect the Agent Skill "sn-image-imitate" from https://github.com/OpenSenseNova/SenseNova-Skills/blob/24abfbb1eb5168027be74ecc18f2e5ac55890f5d/skills/sn-image-imitate/SKILL.md at commit 24abfbb1eb5168027be74ecc18f2e5ac55890f5d. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. Extract referenceimage, targetcontent, outputmode (default friendly), aspectratio (default 16:9), imagesize (default 2k), maxattempts (default 3), and layoutthreshold (default 0.75) 2. Validate required inputs: - referenceimage is provided and resolvable - targetcontent is no…
1. Extract referenceimage, targetcontent, outputmode (default friendly), aspectratio (default 16:9), imagesize (default 2k), maxattempts (default 3), and layoutthreshold (default 0.75) 2. Validate required inputs: - referenceimage is provided and resolvable - targetcontent is no…
Worker Agent receives referenceimage, targetcontent, outputmode, aspectratio, imagesize, maxattempts, layoutthreshold, and the working directory of this skill ($SKILLDIR).
1. Generate taskid with format YYYYMMDDHHMMSS 2. Create temp directory: /tmp/openclaw/sn-image-imitate// as TEMPDIR 3. Resolve and normalize REFERENCEIMAGE 4. Persist user request:
Use prompts/imageannotate.md as system prompt and call sn-image-recognize on reference image.
Permission review
The documentation includes network, browsing, or remote request actions.
SN_BASE_URL="https://token.sensenova.cn/v1"The documentation asks the agent to create, modify, or delete local files.
Create temp directory: `/tmp/openclaw/sn-image-imitate/<task_id>/` as `TEMP_DIR`The documentation asks the agent to run terminal commands or scripts.
python "$SN_IMAGE_BASE/scripts/sn_agent_runner.py" sn-image-recognize \The documentation asks the agent to run terminal commands or scripts.
python "$SN_IMAGE_BASE/scripts/sn_agent_runner.py" sn-text-optimize \Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 89/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 4,855 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Image style imitation scene skill (tier 1), relying on the sn-image-recognize, sn-text-optimize, and sn-image-generate tools provided by sn-image-base (tier 0).
Features:
reference_image (string, required): local path or URL of the style reference imagetarget_content (string, required): new content user wants in the generated imageoutput_mode (string, default friendly): output mode, friendly or verboseaspect_ratio (string, default 16:9): output aspect ratio for generationimage_size (string, default 2k): output image size presetmax_attempts (int, default 3): maximum generation attempts for meeting layout consistencylayout_threshold (float, default 0.75): minimum layout similarity score to accept resultDependency installation and API key configuration are for sn-image-base skill.
The minimum environment variables to configure sn-image-base skill running with SenseNova Token Plan:
SN_BASE_URL="https://token.sensenova.cn/v1"
SN_API_KEY="your-api-key"
Fallback priority is dedicated variable > domain shared variable > global variable. Text calls use SN_TEXT_API_KEY -> SN_CHAT_API_KEY -> SN_API_KEY; vision calls use SN_VISION_API_KEY -> SN_CHAT_API_KEY -> SN_API_KEY; image generation uses SN_IMAGE_GEN_API_KEY -> SN_API_KEY.
Please refer to the Python dependencies and API keys section in sn-image-generate_en.md for more configurations.
All API calls in this skill are executed through the sn_agent_runner.py of the sn-image-base skill,
please refer to the sn-image-base skill (README.md) for more details.
sn-image-recognize (Step 1 & 3)sn-text-optimize (Step 2)sn-image-generate (Step 3)When encountering MissingApiKeyError or needing explicit model control: pass model and auth params explicitly via CLI arguments. See $SN_IMAGE_BASE/references/api_spec.md.
$SN_IMAGE_BASE path explanation: $SN_IMAGE_BASE is the installation directory of the sn-image-base skill (SKILL.md exists). The agent can locate this path by skill name sn-image-base.
This skill uses a two-tier agent architecture:
Responsibility Boundaries:
reference_image, target_content, output_mode (default friendly), aspect_ratio (default 16:9), image_size (default 2k), max_attempts (default 3), and layout_threshold (default 0.75)reference_image is provided and resolvabletarget_content is non-empty"Using sn-image-imitate skill to generate a style-consistent image, please wait..."status=ok: send final summary and generated imagestatus=error: report the actual errorWorker Agent receives reference_image, target_content, output_mode, aspect_ratio, image_size, max_attempts, layout_threshold, and the working directory of this skill ($SKILL_DIR).
Error Handling Strategy:
All sn_agent_runner.py calls share the same error handling rules:
status=error with the actual error message from stderr or the system error stringresult field: return status=error, do not silently continue with empty or default valuestask_id with format YYYYMMDD_HHMMSS/tmp/openclaw/sn-image-imitate/<task_id>/ as TEMP_DIRREFERENCE_IMAGEecho "$TARGET_CONTENT" > "$TEMP_DIR/target-content.txt"
Use prompts/image_annotate.md as system prompt and call sn-image-recognize on reference image.
python "$SN_IMAGE_BASE/scripts/sn_agent_runner.py" sn-image-recognize \
--system-prompt-path "$SKILL_DIR/prompts/image_annotate.md" \
--user-prompt "Please annotate this reference image and follow the required output format." \
--images "$REFERENCE_IMAGE" \
--output-format json
Parse JSON result, then parse three blocks:
SHORT_CAPTION: ...LONG_CAPTION: ...LAYOUT_BLUEPRINT_JSON: { ... }If parsing fails, LONG_CAPTION is empty, or LAYOUT_BLUEPRINT_JSON is invalid JSON, return status=error.
Persist outputs:
echo "$SHORT_CAPTION" > "$TEMP_DIR/reference-short-caption.txt"
echo "$LONG_CAPTION" > "$TEMP_DIR/reference-long-caption.txt"
echo "$LAYOUT_BLUEPRINT_JSON" > "$TEMP_DIR/layout-blueprint.json"
Goal: preserve style/layout/visual language from reference long caption while replacing core content by target_content.
Hard constraints to preserve (guided by layout-blueprint.json):
Preferred system prompt: prompts/caption_rewrite.md (recommended to add).
If missing, use inline fallback system prompt:
Rewrite the long caption by preserving style and layout constraints while replacing semantic content according to user target. Do not change block topology, reading order, or visual hierarchy. Keep the caption detailed and directly usable for image generation.
Call sn-text-optimize:
python "$SN_IMAGE_BASE/scripts/sn_agent_runner.py" sn-text-optimize \
--system-prompt-path "$SKILL_DIR/prompts/caption_rewrite.md" \
--user-prompt "Reference long caption:\n$LONG_CAPTION\n\nLayout blueprint JSON:\n$LAYOUT_BLUEPRINT_JSON\n\nTarget content:\n$TARGET_CONTENT\n\nReturn only the rewritten long caption." \
--output-format json
Parse JSON result as NEW_LONG_CAPTION. If empty, return status=error.
Persist output:
echo "$NEW_LONG_CAPTION" > "$TEMP_DIR/new-long-caption.txt"
Execute attempt from 1 to max_attempts sequentially:
Generate Image (using sn-image-base's sn-image-generate tool):
python "$SN_IMAGE_BASE/scripts/sn_agent_runner.py" sn-image-generate \
--prompt "$CURRENT_PROMPT" \
--aspect-ratio "$ASPECT_RATIO" \
--image-size "$IMAGE_SIZE" \
--save-path "$TEMP_DIR/attempt_<N>.png" \
--output-format json
VLM configuration requirements:
max_attempts > 1, VLM review is required for each attemptmax_attempts to 1 to skip reviewLayout Consistency Review (only executed when max_attempts > 1):
Review candidate vs reference using prompts/layout_review.md (with blueprint as structural oracle):
python "$SN_IMAGE_BASE/scripts/sn_agent_runner.py" sn-image-recognize \
--system-prompt-path "$SKILL_DIR/prompts/layout_review.md" \
--user-prompt "Reference is image[0], candidate is image[1]. Layout blueprint JSON:\n$LAYOUT_BLUEPRINT_JSON\n\nEvaluate layout similarity and return JSON only." \
--images "$REFERENCE_IMAGE" "$TEMP_DIR/attempt_<N>.png" \
--output-format json
Expected review JSON (inside result):
{
"layout_similarity_score": 0.0,
"style_similarity_score": 0.0,
"pass": false,
"major_deviations": [],
"fix_hints": []
}
Save Attempt Result:
{
"attempt": 1,
"image": "$TEMP_DIR/attempt_1.png",
"layout_similarity_score": 0.0,
"style_similarity_score": 0.0,
"pass": false,
"major_deviations": [],
"timing": {
"image_generation": { "elapsed_seconds": 12.34, "model": "sn_image_model" },
"vlm_review": { "elapsed_seconds": 5.67, "model": "sensenova-122b" }
}
}
Note: elapsed_seconds is read from the --output-format json return of each CLI call; image_generation.model is fixed to the hardcoded placeholder "sn_image_model" (sn-image-generate does not return the model field); vlm_review.model is read from the JSON return of sn-image-recognize. timing.vlm_review is omitted when max_attempts=1.
Early Termination Check (only executed when max_attempts > 1):
Pass criteria:
layout_similarity_score >= layout_threshold
pass = true
If pass: immediately exit the loop, do not continue generating
If fail and attempts remain, append correction hints to prompt:
Layout correction requirements:
- <fix_hint_1>
- <fix_hint_2>
...
layout_passed=falseWorker Agent final response must be bare JSON (no extra text, no code fence).
{
"status": "ok",
"need_main_agent_send": true,
"output_mode": "friendly|verbose",
"result": {
"image": "/tmp/openclaw/sn-image-imitate/<task_id>/attempt_2.png",
"reference_image": "<resolved_reference_image>",
"reference_short_caption": "<short caption from step 1>",
"reference_long_caption": "<long caption from step 1>",
"layout_blueprint": { "...": "..." },
"new_long_caption": "<rewritten long caption from step 2>",
"layout_passed": true,
"selected_attempt": 2
},
"attempts": [
{
"attempt": 1,
"image": "/tmp/openclaw/sn-image-imitate/<task_id>/attempt_1.png",
"layout_similarity_score": 0.62,
"style_similarity_score": 0.79,
"pass": false,
"major_deviations": ["center panel too narrow", "title block moved to top-right"]
},
{
"attempt": 2,
"image": "/tmp/openclaw/sn-image-imitate/<task_id>/attempt_2.png",
"layout_similarity_score": 0.81,
"style_similarity_score": 0.84,
"pass": true,
"major_deviations": []
}
],
"review": {
"threshold": 0.75
},
"timing": {
"total_elapsed_seconds": 24.56,
"annotate": { "elapsed_seconds": 3.21, "model": "sensenova-122b" },
"rewrite": { "elapsed_seconds": 2.45, "model": "sensenova-122b" },
"generation_total": { "elapsed_seconds": 11.90, "model": "sn_image_model" },
"review_total": { "elapsed_seconds": 7.00, "model": "sensenova-122b" }
}
}
{
"status": "error",
"error": "<actual_error_message>"
}
Rules:
status=ok must include need_main_agent_send: trueresult.image must be an existing generated image pathtiming.total_elapsed_seconds covers full worker executionstatus=error (do not silently continue)attempts must record each generation + review attemptresult.layout_passed=falseresult.imageStyle imitation result
---
Reference short caption: <reference_short_caption>
---
Style/layout cues:
<brief extraction from reference_long_caption + layout_blueprint>
---
New long caption:
<new_long_caption>
---
#1 attempt=<n> layout_score=<0.00> style_score=<0.00> pass=<true|false> [selected]
deviations: <major_deviations or none>
#2 attempt=<n> layout_score=<0.00> style_score=<0.00> pass=<true|false>
deviations: <major_deviations or none>
...
---
Layout threshold: <0.75> | Passed: <true|false> | Selected: attempt <n>
Time statistics: Total <total>s | Annotation <t>s | Rewrite <t>s | Generation <t>s×<n> attempts | Review <t>s×<n> attempts
---
Images (selected image)
sn-image-base → sn-image-recognize, sn-text-optimize, sn-image-generateprompts/image_annotate.md - Image annotation + layout blueprint system prompt (Step 1, required)prompts/caption_rewrite.md - Caption rewrite system prompt with layout-lock constraints (Step 2, required)prompts/layout_review.md - Candidate-vs-reference layout/style review prompt (Step 3, required)../sn-image-base/SKILL.md - Base tool behavior and parameter defaultsAlternatives
alirezarezvani/claude-skills
App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist
dotnet/skills
Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing
HKUDS/Vibe-Trading
Create, modify, and optimize quantitative trading strategies, then backtest and evaluate them.
K-Dense-AI/scientific-agent-skills
Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.