CommunityImagegithub.com

illustrator

Turn a document into chaptered, colour-consistent illustration prompts and render them with Replicate (seedream-5-lite, nano-banana-2 fallback), or render any folder of prompt JSONs. A palette ledger keeps every recurring object the same colour across chapters; a validator must pass and the user must approve the prompt manifest before any image is paid for; a prediction ledger guarantees a timed-out render is resumed, never paid twice. Use when asked to "illustrate this document", "make a picture book from this text", "render these prompts", "generate the illustrations" or "rerun the renders".

What is illustrator?

illustrator is a Claude Code agent skill that turn a document into chaptered, colour-consistent illustration prompts and render them with Replicate (seedream-5-lite, nano-banana-2 fallback), or render any folder of prompt JSONs. A palette ledger keeps every recurring object the same colour across chapters; a validator must pass and the user must approve the prompt manifest before any image is paid for; a prediction ledger guarantees a timed-out render is resumed, never paid twice. Use when asked to "illustrate this document", "make a picture book from this text", "render these prompts", "generate the illustrations" or "rerun the renders".

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/hunzai/hermes-skills/tree/HEAD/skills/illustrator

Installed? Explore more Image skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Illustrator: document → prompts → images

Two entry points. Compose reads a document and authors the prompt tree. Render turns prompt JSONs into images. Builds no PDF (that is publisher).

When to Use

  • "Illustrate this document / research.md", "make a picture book from this" → Compose (all steps).
  • "Render these prompts", "rerun the renders", a folder of prompts/*.json → Render (steps 6–7).
  • A bare topic or URL → run web-research first and point this skill at its research.md.

Quick Reference

bash ${HERMES_SKILL_DIR}/scripts/setup.sh        # once: venv with replicate, requests, python-docx
PY=${HERMES_HOME:-$HOME/.hermes}/venvs/illustrator/bin/python
S=${HERMES_SKILL_DIR}/scripts
$PY $S/read.py <document-or-folder> --out <project>/.ingest
$PY $S/scaffold.py --project <project> --plan <project>/.ingest/plan.json
$PY $S/validate.py <project>
$PY $S/render.py <project> --dry-run             # lists every prompt, zero API calls
$PY $S/render.py <project>                       # renders; skips existing images
$PY $S/art_tools.py style-ref ref.jpg <prompts/*.json>   # one style reference for every render
$PY $S/art_tools.py trim images/a.jpg a.jpg      # cut the plain background (keeps a margin)
$PY $S/art_tools.py crop images/b.jpg b.jpg --box 380,300,2780,1290

Folder contract, payload format and render options: references/contract.md.

Procedure

  1. Read — read.py the document into <project>/.ingest/ (compose in place when it is a research.md project). Read all of corpus.txt.
  2. Chapter — group into titled chapters of ≤ 5 pages (~1800 chars/page), ordered as one flowing narrative. Write outline.md (title, one-line synopsis, transition to the next) and .ingest/plan.json: [{"slug": "...", "title": "...", "scenes": 1|2}], lowest index = cover.
  3. Scaffold — scaffold.py creates NN_<slug>/prompts/, chapter.md stubs, the default colour-pencil design.md (if absent) and palette.json with global_preamble. For another style edit design.md's STYLE_PREAMBLE block and copy it into palette.json.
  4. Author — per chapter: chapter.md prose, then 1–2 consecutive-moment prompts. Register every recurring element in palette.json entities (aliases, color, descriptor) on first appearance and use its exact colour words in every prompt that shows it. Each prompt string starts with global_preamble verbatim.
  5. Validate — validate.py <project> until 'fail': 0; treat warn as revise-unless-accepted.
  6. Approval — show the chapter list with transitions, the palette (element → colour), one manifest line per prompt (chapter / scene / aspect) and the image count. Wait for a yes.
  7. Render — render.py <project>. Report its summary: {ok, skip, err} and every warn: line.

Gates

  • G1 document in — missing extractor or unreadable input → relay read.py's error and stop; never paraphrase a document from memory. URL or bare topic → web-research first.
  • G2 validator clean — never show the manifest while validate.py reports fail > 0.
  • G3 spend approval — no render.py without dry-run proof and an explicit yes to the manifest and count.
  • G4 pay once — after a timeout, crash or Ctrl-C re-run the same command: it resumes the saved prediction from _pending.json at no new cost. Never change the prompt or add --force to get past it.
  • G5 token from Hermes — REPLICATE_API_TOKEN is a declared secret: Hermes asks for it and passes it to the Replicate SDK. A 401/403 stops the batch before anything is paid; ask the user to set it with hermes setup. Never read it from a project file, print it, or pass it on a command line.

Pitfalls

  • Image models miscount objects and misspell text. Ask for no text in images; when an exact count matters, render the scene empty and place the objects with code (see learning-material).
  • Aliases are matched as whole words; avoid generic ones ("water") that collide with unrelated text.
  • A consistent look across many separate pictures comes from one shared style reference (art_tools.py style-ref), not from repeating style words; check every picture for wrong colours, counts and stray objects anyway.
  • --force re-renders and pays again; use it only when the user wants a new image.
  • A prediction still running never triggers the seedream ↔ nano-banana fallback (that would pay twice).

Verification

  • render.py summary shows err: 0, and every prompt has images/<same-stem>.jpg.
  • After trim/crop, open the result: nothing of the subject cut off, no stray paper edge or frame.
  • Open the images: the subject matches the chapter, recurring elements keep their colours, no stray text.
  • _runs.log records the model used for each image (and fellback_from when it fell back).

Related Skills