image-gen
Generate cover images and in-article illustrations for technical articles. Auto image backend: Imagen CLI (Nano Banana 2 / Pro), grok-img, then Codex agent. Triggers: generate images, cover image, article illustrations, visual assets, imagen, nano banana, grok imagine.
DeepseekModel
官方收录技能
质量 良好 · 48
v1.0.0
获取
https://deepseekmodel.com/api/download.php?id=spillwavesolutions-image-gen-skill-md&format=skill
下载 .skill
标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用
.skill 文件中 system_prompt 字段的实际内容。
name image-gen description Generate cover images and in-article illustrations for technical articles. Auto image backend: Imagen CLI (Nano Banana 2 / Pro), grok-img, then Codex agent. Triggers: generate images, cover image, article illustrations, visual assets, imagen, nano banana, grok imagine. Image Gen Article image skill. Not the diagram renderer (that is imagen-diagrams ). When to fire Use this skill when the user wants a cover image, in-article illustration, or visual assets for an article. Do not use this skill to render Mermaid or PlantUML. Send those to imagen-diagrams . Image-engine hint and backend (auto) Use --engine-hint imagen , --engine-hint grok , or --engine-hint codex when a caller has a preferred image engine. The hint chooses a real execution path, not a guessed subcommand. Imagen calls the imagen CLI directly. Grok calls grok-img , the noninteractive xAI image CLI, then normalizes its generated file to the requested output path. Codex starts a Codex agent and asks image_gen to save the requested PNG. Grok and Codex must actually create the file. A prose-only Codex response or a missing grok-img result fails closed, leaves the prompt sidecar, and records the failed attempt. With no hint, auto tries every installed engine in this order and continues after a runtime or authentication failure. imagen CLI if on PATH. Brace policy: imagen-cli-vars (double braces). Then grok-img CLI. Brace policy: grok-imagine (no rewrite). Else codex CLI. Brace policy: grok-imagine (no rewrite). Else fail closed. Write <stem>_imagen.prompt.txt and exit 2. Never invent a PNG. If no worker is installed, keep the prompt sidecar and tell the user to run /image-gen-install . Install the imagen CLI Latest gemini-imagen ( imagen on PATH) plus Nano Banana model pin: python3 skills/image-gen/scripts/install_imagen.py Pins gemini-3.1-flash-image (Nano Banana 2) as the CLI default. Cover images use Nano Banana Pro unless the user asks otherwise. Needs GOOGLE_API_KEY or imagen keys set google YOUR_KEY . Models (Nano Banana, August 2026) Alias Model ID When nano-banana-2 (default) gemini-3.1-flash-image Article diagrams, high-volume art. 0.5K–4K. nano-banana-pro gemini-3-pro-image Covers, in-image text, dense composition. nano-banana-2-lite gemini-3.1-flash-lite-image Drafts and thumbnails. nano-banana gemini-2.5-flash-image Legacy fallback. --kind cover selects Pro. --kind article selects Nano Banana 2. Workflow 1. Analyze the article List 2–4 images (1 cover + 1–3 in-article). One concept per in-article image. 2. Generate the cover Metaphorical, high-impact, 16:9. python3 skills/image-gen/scripts/generate.py \ --kind cover \ --aspect 16:9 \ --output work/images/article_cover.png \ --prompt "A stunning digital art cover image of [metaphor] representing [topic]. Cinematic lighting, professional, high-detail. Style: conceptual 3D render." 3. Generate in-article images Direct, labeled, one concept. python3 skills/image-gen/scripts/generate.py \ --kind article \ --aspect 16:9 \ --output work/images/article_workflow.png \ --prompt "A clean technical diagram showing [concept] with color-coded arrows and clear labels. Style: blueprint, professional." # Prefer the noninteractive grok-img CLI. Configure XAI_API_KEY or run # `grok-img auth login` first. python3 skills/image-gen/scripts/generate.py \ --kind article \ --engine-hint grok \ --aspect 16:9 \ --output work/images/article_workflow.png \ --prompt "A clean technical diagram showing [concept]." 4. Integrate + ALT text Cover immediately after H1. In-article images at section breaks. ALT text 50–125 characters, specific, no "image" / "diagram" alone.  5. Verify PNG exists. Sidecar *.json records engine hint, backend, policy, model, and every attempted engine. Prompt sidecar is kept next to the PNG. Scripts From skills/image-gen/scripts/ : generate.py — write prompt, apply brace policy, call worker, fail closed install_imagen.py — pip install -U gemini-imagen and pin Nano Banana 2 backends.py — PATH detect + brace policy models.py — Nano Banana catalog Compatibility: imagen generate "PROMPT" -o FILE.png still works if imagen is on PATH. Prefer generate.py so grok/codex fallback and fail-closed behavior stay intact. Prompt craft Load references/prompting_guide.md when the prompt is non-trivial. Cover: [Style] cover image of [metaphor] representing [topic], [atmosphere], [composition]. In-article: [Style] showing [one concept], [elements], [labels]. Nano Banana Pro renders in-image text more reliably than Flash. Ask for "clear labels" only when using Pro, or keep labels short. Outputs <stem>.png (or the --output path) <stem>_imagen.prompt.txt (always) <stem>.json sidecar (engine hint, backend, policy, model, attempts) If the worker is missing, only the prompt sidecar is written and the process exits 2.
Agent 识别该技能的关键词,点击任意一个即可复制。
该技能未提供触发词。
下载的 .skill 包内含以下字段。
| 字段 | 说明 |
|---|---|
| format | 格式标识(skill/v1) |
| skill_id | 技能唯一 ID |
| name | 技能名称 |
| version | 版本号 |
| description | 技能描述 |
| category | 所属分类(数组) |
| trigger_words | 触发词列表 |
| tags | 标签列表 |
| source | 来源标识 |
| source_url | 来源链接(本页地址) |
| exported_at | 导出时间(每次下载生成) |
| system_prompt | 系统提示词正文 |
| model_config | 模型参数:provider / model / temperature / max_tokens / top_p |
| examples | 示例 |
| install_guide | 各平台导入说明(Coze / Dify / Claude / 自定义框架) |