| name | agent-image |
| description | Local-first image generation helper. Use when you need to create or batch-generate images (portraits, mock art, docs images) as part of implementing a feature/spec, or when the user asks for images. |
| license | MIT |
| compatibility | Requires local Ollama and/or local ComfyUI scripts in this repo. |
Agent Image Generation
Generate images locally and reproducibly using the repository pipelines.
When To Use
Use this skill when:
- A spec/task requires images (e.g., kin portraits, NPC portraits, docs screenshots/mock art).
- The user asks you to create images or a batch of images.
- You need deterministic filenames/locations for generated images.
Do NOT use this skill to call remote image APIs unless the user explicitly requests that.
Backend Selection
Default policy:
- Prefer Ollama for quick, single-shot or simple batches.
- Prefer ComfyUI for advanced workflows, specific nodes/models, or higher fidelity/controllability.
If one backend is unavailable, fall back to the other when appropriate.
Output Conventions
Default: choose an output directory appropriate to the current task context.
Common conventions (use when applicable):
- Character/NPC portraits:
assets/portraits/npcs/<slug>.png
- Kin portraits (if generating a full set):
assets/portraits/kins/<slug>.png
- Docs/supporting images:
docs/images/<slug>.png
If the right destination is ambiguous, ask the user (or follow existing nearby patterns in the repo).
Slug rules: lowercase; spaces -> _; strip non-alphanumerics; collapse _.
Overwrite policy: do NOT overwrite existing images unless the user requests overwrite.
Guardrails
- Do not commit generated images unless the user explicitly asks.
- Never commit model weights or local generator state (
tools/ComfyUI, Ollama model store).
- Keep generation local-first. If a remote provider is requested, ask for confirmation and clarify licensing.
Ollama Workflow (Quick)
Prereqs:
- Ollama installed (macOS-first for image generation).
Commands:
pnpm ollama:setup
pnpm ollama:doctor
python3 scripts/ollama/ollama.py generate --job <job.json>
Ad-hoc single image:
python3 scripts/ollama/ollama.py generate \
--name "mallsing" \
--prompt "<your prompt>" \
--out assets/portraits/npcs
Model selection:
python3 scripts/ollama/ollama.py generate \
--model x/flux2-klein \
--job <job.json>
ComfyUI Workflow (Advanced)
Prereqs:
- Local ComfyUI checkout in
tools/ComfyUI (gitignored)
- A checkpoint in
tools/ComfyUI/models/checkpoints/
Commands:
pnpm comfyui:setup
pnpm comfyui:server
pnpm comfyui:doctor
python3 scripts/comfyui/comfyui.py generate --job <job.yaml>
Examples
Single portrait (Ollama):
- Prompt: "A fantasy character profile portrait in watercolor and ink, side profile, no text"
- Output:
assets/portraits/npcs/river_guard.png
Batch generation (Ollama):
- Provide a job config (
.json) with items[] or a source{type=..., path=...}.
- Keep configs data-only; avoid embedding scripts.
High fidelity batch (ComfyUI):
- Use ComfyUI when you need a specific checkpoint, LoRA stack, or a custom workflow.