sn-image-imitate
できること
このスキルは、参考画像と同じスタイルの新しい画像を作りますが、あなたが説明する別の内容にします。ある雰囲気を気に入って、それを新しいものに使いたい人のためのものです。
使う場面
- ✓新しいシーンに使いたいスタイルを持つ参考画像があるとき。
- ✓写真の構図や雰囲気は保ちつつ、写っている内容だけを変えたいとき。
- ✓ある画像のスタイルを、新しく生成する画像にそのまま使いたいとき。
スキルのリンク
https://github.com/OpenSenseNova/SenseNova-Skills/blob/main/skills/sn-image-imitate/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“この写真のスタイルと色を使って、夜のコーヒーショップの新しい絵を描いてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは参考画像を詳しく説明し、その説明をスタイルと構図を保ちながら新しい内容に書き直します。その後、新しい画像を生成し、構図を確認します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
sn-image-imitate
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:
- Extracts high-fidelity long caption from a reference image
- Rewrites caption according to user requested content change while preserving style and layout
- Enforces layout-lock constraints during caption rewrite
- Performs post-generation layout consistency review and bounded retries
- Returns structured process artifacts for debugging and reproducibility
Non-goals
- Pure neural style transfer without content change (use dedicated style-transfer tools instead)
- Local editing / inpainting of specific regions within the reference image
- Processing video or animation input (only single static images are supported)
- Batch generation from multiple reference images in one invocation
- Guaranteeing pixel-level fidelity to the reference; the skill targets layout and style consistency, not exact reproduction
Input Specification
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, defaultfriendly): output mode,friendlyorverboseaspect_ratio(string, default16:9): output aspect ratio for generationimage_size(string, default2k): output image size presetmax_attempts(int, default3): maximum generation attempts for meeting layout consistencylayout_threshold(float, default0.75): minimum layout similarity score to accept result
Environment Variable
Dependency 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.
API Configuration
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.
- VLM call:
sn-image-recognize(Step 1 & 3) - LLM call:
sn-text-optimize(Step 2) - Image generation call:
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.
Architecture: Main Agent + Worker Agent
This skill uses a two-tier agent architecture:
- Main Agent: receives user request, normalizes parameters, sends preflight, invokes Worker Agent, and sends final text/image to user
- Worker Agent: executes fixed 3-step pipeline and returns structured JSON
Responsibility Boundaries:
- Worker Agent does not send any user-visible message directly
- Main Agent sends all user-facing responses
- Worker Agent last message must be and only be the JSON string defined in Return Contract
- Worker Agent executes VLM/LLM/image calls directly; no nested subagent for these low-level calls
Workflow
Main Agent Workflow
- Extract
reference_image,target_content,output_mode(defaultfriendly),aspect_ratio(default16:9),image_size(default2k),max_attempts(default3), andlayout_threshold(default0.75) - Validate required inputs:
reference_imageis provided and resolvabletarget_contentis non-empty
- Send preflight message:
"Using sn-image-imitate skill to generate a style-consistent image, please wait..." - Start Worker Agent with full normalized parameters and working directory
- On Worker result:
status=ok: send final summary and generated image- `sta
よくある質問
参考画像をピクセル単位で完全にコピーしますか?
いいえ。完全な複製ではなく、スタイルと構図が合うことを目指します。
動画も扱えますか?
いいえ。単一の静止画だけを扱います。
参考画像の一部だけを編集できますか?
いいえ。参考画像の領域を編集するのではなく、新しい画像を作ります。
詳細
作者による元の説明
Generates a new image that imitates the style of a reference image while updating content based on user intent. Uses a three-stage pipeline: image annotation (long caption), caption rewriting, and image generation. Use when user asks to "imitate style", "保持这个风格重画", "按这张图风格生成", or "style transfer with new content".
人気
- GitHubのスター
- 6.0k
- ランキング
- #14461
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
sn-code-video
6.0kCanvas、SVG、Three.js、Remotionでコードから動画を作り、フレームごとに確認してMP4で書き出す方法をエージェントに教えます。
sn-image-base
6.0k他のSenseNovaスキルのために、SenseNovaのサービスを使って画像生成、画像内容の認識、テキストの最適化を行う基本ツールを提供します。
sn-image-doctor
6.0kSenseNova-Skillsの設定がインストールされ、Pythonパッケージがあり、必要なAPIキーがそろっているかを確認し、不足しているキーをファイルに保存します。
sn-image-resume
6.0k履歴書のテキストを、デザインされたポートフォリオ風の履歴書画像に変換します。スタイルの選択肢も任意で指定できます。