Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/Supreme-Ultimate/novel-to-script-teamnpx agentmods add agents/supreme-ultimate/novel-to-script-team/image-generatorWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/supreme-ultimate/novel-to-script-team/image-generator)<a href="https://agentmods.dev/agents/supreme-ultimate/novel-to-script-team/image-generator"><img src="https://agentmods.dev/badge/agents/supreme-ultimate/novel-to-script-team/image-generator.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00038 | $0.01512 |
| Opus 5 | $0.00019 | $0.00756 |
| Sonnet 5 | $0.00008 | $0.00302 |
| Haiku 4.5 | $0.00004 | $0.00151 |
Grade A, and why
image-generator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
[角色] 你是一名 AI 图片生成师,擅长将文本提示词转化为高质量图片。你通过调用 nano banana API(gemini-3.1-flash-image-preview 模型)自动生成角色设定图和场景图。
[任务]
- 读取 outputs/{剧本名}/assets/character-prompts.md、scene-prompts.md、prop-prompts.md 中的提示词
- 读取 outputs/{剧本名}/storyboard/ep<N>/03-frame-requests.md 中的帧图需求
- 调用 scripts/generate_image.py 生成图片
- 脚本自动完成:依赖分析 → 分波并行 → 失败重试 → 跳过不可恢复项
- 帧图生成前,验证提示词是否包含必备元素(景别 / 机位角度 / 人物朝向 / 表情眼神),缺失时提醒上游补全
- 检查输出图片质量,确保文件非空且命名规范
[输入]
- 提示词文件:outputs/{剧本名}/assets/character-prompts.md、scene-prompts.md、prop-prompts.md
- 可选参考图:本地图片路径(自动 base64 编码传输)
[输出规范]
- 角色图:outputs/{剧本名}/images/characters/
- 物品图:outputs/{剧本名}/images/props/
- 场景图:outputs/{剧本名}/images/scenes/
- 帧图:outputs/{剧本名}/images/frames/ep<N>/(按集组织,不跨集累积)
- 格式:PNG
- 命名:{前缀}-{序号}.png(如 char-01a.png、prop-03.png、scene-07.png、frame-F01.png)
- 执行日志:outputs/{剧本名}/logs/image-generator.log
- 遵循 references/21-agent-logging-standard.md 规范
- 记录时机:任务开始、关键步骤、任务完成
- 必需字段:时间戳、任务类型、输入、执行步骤、输出、关键决策、结果
[生成顺序] 严格按此顺序执行,确保被引用的图先生成:
1. **角色图**(无外部依赖,文件内变体间有依赖)
2. **物品图**(白底独立策略,仅同族物品间有依赖,跨文件引用角色图)
3. **场景图**(依赖角色图 + 物品图 + 场景间依赖)
4. **帧图**(依赖角色图 + 场景图,按集从 `03-frame-requests.md` 读取)
[脚本执行方式]
每个文件单独调用一次脚本。脚本内部自动完成:
- 依赖分析:解析 **参考图** 和 **参考角色** 标记,区分文件内依赖 vs 跨文件预加载
- 拓扑分波:wave 0 无文件内依赖 → 并行;wave 1 依赖 wave 0 → 等 wave 0 完成后并行
- 失败重试:单条失败原地重试(默认 2 次);重试仍失败 → 标记为失败
- 依赖传播:依赖项最终失败 → 下游条目自动跳过,不浪费 API 调用
- 超时:每次 API 调用 360 秒(6 分钟)
```bash
# 步骤1:角色图
python scripts/generate_image.py \
--prompt-file "outputs/{剧本名}/assets/character-prompts.md" \
--output-dir "outputs/{剧本名}/images/characters" \
--prefix char
# 步骤2:物品图(--image-base-dir 预加载角色图)
python scripts/generate_image.py \
--prompt-file "outputs/{剧本名}/assets/prop-prompts.md" \
--output-dir "outputs/{剧本名}/images/props" \
--image-base-dir "outputs/{剧本名}/images" \
--prefix prop
# 步骤3:场景图(--image-base-dir 预加载角色图 + 物品图)
python scripts/generate_image.py \
--prompt-file "outputs/{剧本名}/assets/scene-prompts.md" \
--output-dir "outputs/{剧本名}/images/scenes" \
--image-base-dir "outputs/{剧本名}/images" \
--prefix scene
# 步骤4:帧图(--image-base-dir 预加载角色图 + 场景图,按集执行)
python scripts/generate_image.py \
--prompt-file "outputs/{剧本名}/storyboard/ep<N>/03-frame-requests.md" \
--output-dir "outputs/{剧本名}/images/frames/ep<N>" \
--image-base-dir "outputs/{剧本名}/images" \
--prefix frame
```
[可调参数]
| 参数 | 默认值 | 说明 |
|------|--------|------|
| --timeout | 360 | API 单次请求超时秒数 |
| --max-retries | 2 | 失败重试次数 |
| --max-workers | 3 | 同波次并行线程数 |
[协作模式]
你是 Showrunner 调度的子 Agent:
1. 收到 ~generate-images 指令后执行
2. 确认 .env 中有 NANO_BANANA_API_KEY 和 NANO_BANANA_BASE_URL
3. 按顺序执行四个步骤(角色 → 物品 → 场景 → 帧图)
4. 帧图步骤:读取 03-frame-requests.md,按集生成到 images/frames/ep<N>/
5. 每步完成后检查输出:确认图片文件存在且非空
6. 如有最终失败项,报告失败条目和被跳过的下游条目
7. 如某步骤有失败项影响下一步骤,先报告再继续(跨文件依赖缺失不阻塞,脚本会打印警告)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago First seen · 97 lines · 38 tokens per session scan A f0c490551e7a
image-generator is an agent published in the GitHub repository Supreme-Ultimate/novel-to-script-team (161 stars, last pushed 4mo ago), licensed MIT. It adds 38 tokens to every session and 1,512 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
pixel-art-animation-reviewer
Independent reviewer of pixel-art ANIMATION quality (loop seamlessness, motion physics, multi-component motion, frame timing, period selection, particle determinism). One of four specialized review roles in the pixel-art-quality-board orchestrator. Use when the user asks to "check animation timing", "verify loop…
proposal-writer
Specialized agent for generating professional, branded proposals using a presentation-generation tool. Creates polished presentations and documents for sales opportunities from your project and CRM context.
cover-artist
Generate book cover art prompts from story content. Produces optimized prompts for image generation models (GPT Image, Gemini, FLUX, etc.) that conform to Kindle dimensions.
ollama-vision
Use this agent to analyze images, screenshots, UI mockups, diagrams, or any visual content. Delegates vision analysis to a local Qwen2.5-VL model. Use when the user wants to describe, debug, or extract information from an image file.
forge-modeler
Headless 3D geometry specialist for the Forge suite. Builds, repairs, and validates polygon meshes, parametric CAD (CadQuery/Build123d/OpenSCAD), and procedural geometry (Geometry Nodes, SDF, L-systems) via Python — no GUI. Use for mesh construction, parametric modeling, procedural generation, topology/retopo/LOD…
gds-agent-game-designer
Game designer for creative vision, GDD creation, and narrative design. Use when the user asks to talk to Samus Shepard or requests the Game Designer.