Nib
Make original editorial illustrations for written content. One image explains
one idea. A recurring avatar — supplied once by the user — is the subject
of every scene and performs the idea (pushes, sorts, steers, builds, holds);
it is never decoration. The methodology is the constant; the avatar and the
look are the parameters.
This is a configurable house style, not a generic image generator. It is
intentionally not a photo, not a logo, not a corporate infographic, not a UI
mockup.
Setup (once)
- A character. The user's own avatar image (a mascot, logo character,
anything — save its path); a bundled one via
--avatar-pack <name> (see
characters/); or build a new one with the user
(references/character-builder.md). The character is the reference on every
generation.
- A backend — one of:
- Codex (free) — a logged-in Codex CLI (
codex login). Generates on the
user's ChatGPT / Codex subscription, no API key. Default when no key is set.
- OpenRouter — an
OPENROUTER_API_KEY (sk-or-…). Exact 16:9, and lets
you pick the model with --model.
Workflow
Read the input.
- A URL → fetch the page and extract the readable article text first
(use your web-fetch / Defuddle capability), then treat it as an article.
- A single idea → one illustration.
- An article / post (or the user's own draft / notes they want
illustrated) → pick the load-bearing moments (a judgment, a flow, a
before/after, a trap, a loop), 4–8 of them. Not one image per paragraph —
the ones that matter. Treat this set as a starting point the user
shapes: show it first, let them drop moments they don't want, add
their own, or ask for more candidates, then illustrate only the
chosen ones. (The desktop app's Article mode exposes the same controls —
per-shot select, add-a-shot, "More ideas", and a parallel "Generate".)
Pick a look for the piece — one of 13 (see references/styles.md):
marker, riso, blueprint, woodcut, pixel, clay, gouache, chalk, diorama,
enamel, felt, manila, phosphor. One look per piece.
For each idea, invent a fresh, concrete physical metaphor in which the
avatar performs the idea (see references/methodology.md). One caught
scene is the default; switch to the explainer register — a hand-drawn
sketch-diagram — only when the user asks ("diagram the flow") or the idea is
itself a traceable structure (references/composition.md, --register explainer).
Generate by calling the engine once per image:
python3 scripts/generate.py \
--idea "trust is built one piece of evidence at a time" \
--style marker \
--avatar /path/to/avatar.png \
--out ./out/trust.png
It builds the full prompt (methodology + look + idea), sends the character as
the reference for consistency, and writes a 16:9 PNG. Useful flags:
--backend auto|openrouter|codex — auto uses the OpenRouter key if set,
else the free Codex lane.
--model <id> — OpenRouter image model (default google/gemini-3.1-flash-image-preview).
--avatar-pack <name> — use a bundled character (see characters/) instead
of --avatar.
--avatar-spec "<text>" — a written description of the character (silhouette,
face, the one accent part) that locks its design. Combine with the image —
it markedly improves consistency.
--accent "<hex|name>" — pin the one accent colour (a brand hex / site
colour); see references/palettes.md.
--register explainer — draw a hand-built sketch-diagram instead of a single
caught scene (references/composition.md).
--transparent — cut the white ground out of the render → transparent PNG
(for slides, stickers, dark UI). Needs rembg (pip install 'rembg[cpu]',
not bundled); without it the opaque render is kept and a hint is printed. Also
available standalone on any image: python3 scripts/cutout.py <image.png>.
--doctor — print backend readiness (which lane will run, and why) and exit.
Review against references/quality-bar.md (white background, one idea,
avatar performing the action, short labels only, not a slide). Regenerate
any that miss.
Report each saved path.
Example prompts
Invoke Nib from your agent like:
Use nib to illustrate: "one fish, many dishes"
Use nib to make illustrations for this article: https://jamesclear.com/feedback-loops
Use nib to build a character with me, then illustrate "the information well"
Use nib to diagram the flow of a RAG pipeline (explainer)
Use nib to turn this post into a 5-image set in chalk: <paste a URL or text>
Notes
- Keep text in the image short; the model can misspell long labels.
- The avatar is the reference on every call — that is what keeps the character
consistent across a whole article.
- For options, generate 2–3 variants of a shot (run the engine a few times with
the same idea) and let the user pick.
- Cost: free on the Codex lane (uses the user's ChatGPT / Codex subscription),
or a few cents per image on OpenRouter (
google/gemini-3.1-flash-image-preview) —
a full post is well under a dollar either way. Run --doctor to see which lane
is ready.
- A written
--avatar-spec (describe the character in words) markedly improves
consistency over the image reference alone — use it whenever you have a description.
- Inspired by xiaohei (小黑)
by helloianneo — this methodology is an adaptation of its hand-drawn editorial
approach, reworded in Nib's own voice.
1---2name: nib3description: Turns an idea or an article into original white-background, hand-drawn editorial illustrations starring a recurring avatar the user owns — one caught scene per idea, in one of several print looks. Use when the user asks to illustrate a post/article/concept with a consistent character, or invokes "nib". Not for generic draw/make-an-image requests.4license: MIT5---67# Nib89Make original editorial illustrations for written content. **One image explains10one idea.** A **recurring avatar** — supplied once by the user — is the subject11of every scene and *performs* the idea (pushes, sorts, steers, builds, holds);12it is never decoration. The methodology is the constant; the **avatar** and the13**look** are the parameters.1415This is a configurable house style, not a generic image generator. It is16intentionally not a photo, not a logo, not a corporate infographic, not a UI17mockup.1819## Setup (once)20211. **A character.** The user's own **avatar image** (a mascot, logo character,22 anything — save its path); a bundled one via `--avatar-pack <name>` (see23 `characters/`); or **build a new one** with the user24 (`references/character-builder.md`). The character is the reference on every25 generation.262. **A backend** — one of:27 - **Codex (free)** — a logged-in Codex CLI (`codex login`). Generates on the28 user's ChatGPT / Codex subscription, no API key. *Default when no key is set.*29 - **OpenRouter** — an `OPENROUTER_API_KEY` (`sk-or-…`). Exact 16:9, and lets30 you pick the model with `--model`.3132## Workflow33341. **Read the input.**35 - A **URL** → fetch the page and extract the readable article text first36 (use your web-fetch / Defuddle capability), then treat it as an article.37 - A single **idea** → one illustration.38 - An **article / post** (or the user's **own draft / notes** they want39 illustrated) → pick the **load-bearing moments** (a judgment, a flow, a40 before/after, a trap, a loop), 4–8 of them. Not one image per paragraph —41 the ones that matter. Treat this set as a **starting point the user42 shapes**: show it first, let them drop moments they don't want, **add43 their own**, or ask for **more candidates**, then illustrate only the44 chosen ones. (The desktop app's Article mode exposes the same controls —45 per-shot select, add-a-shot, "More ideas", and a parallel "Generate".)462. **Pick a look** for the piece — one of **13** (see `references/styles.md`):47 marker, riso, blueprint, woodcut, pixel, clay, gouache, chalk, diorama,48 enamel, felt, manila, phosphor. One look per piece.493. For each idea, **invent a fresh, concrete physical metaphor** in which the50 avatar performs the idea (see `references/methodology.md`). One **caught51 scene** is the default; switch to the **explainer** register — a hand-drawn52 sketch-diagram — only when the user asks ("diagram the flow") or the idea is53 itself a traceable structure (`references/composition.md`, `--register explainer`).544. **Generate** by calling the engine once per image:5556 ```sh57 python3 scripts/generate.py \58 --idea "trust is built one piece of evidence at a time" \59 --style marker \60 --avatar /path/to/avatar.png \61 --out ./out/trust.png62 ```6364 It builds the full prompt (methodology + look + idea), sends the character as65 the reference for consistency, and writes a 16:9 PNG. Useful flags:66 - `--backend auto|openrouter|codex` — `auto` uses the OpenRouter key if set,67 else the free Codex lane.68 - `--model <id>` — OpenRouter image model (default `google/gemini-3.1-flash-image-preview`).69 - `--avatar-pack <name>` — use a bundled character (see `characters/`) instead70 of `--avatar`.71 - `--avatar-spec "<text>"` — a written description of the character (silhouette,72 face, the one accent part) that locks its design. Combine with the image —73 it markedly improves consistency.74 - `--accent "<hex|name>"` — pin the one accent colour (a brand hex / site75 colour); see `references/palettes.md`.76 - `--register explainer` — draw a hand-built sketch-diagram instead of a single77 caught scene (`references/composition.md`).78 - `--transparent` — cut the white ground out of the render → transparent PNG79 (for slides, stickers, dark UI). Needs `rembg` (`pip install 'rembg[cpu]'`,80 not bundled); without it the opaque render is kept and a hint is printed. Also81 available standalone on any image: `python3 scripts/cutout.py <image.png>`.82 - `--doctor` — print backend readiness (which lane will run, and why) and exit.835. **Review** against `references/quality-bar.md` (white background, one idea,84 avatar performing the action, short labels only, not a slide). Regenerate85 any that miss.866. Report each saved path.8788## Example prompts8990Invoke Nib from your agent like:9192- `Use nib to illustrate: "one fish, many dishes"`93- `Use nib to make illustrations for this article: https://jamesclear.com/feedback-loops`94- `Use nib to build a character with me, then illustrate "the information well"`95- `Use nib to diagram the flow of a RAG pipeline (explainer)`96- `Use nib to turn this post into a 5-image set in chalk: <paste a URL or text>`9798## Notes99100- Keep text in the image short; the model can misspell long labels.101- The avatar is the reference on every call — that is what keeps the character102 consistent across a whole article.103- For options, generate 2–3 variants of a shot (run the engine a few times with104 the same idea) and let the user pick.105- Cost: **free** on the Codex lane (uses the user's ChatGPT / Codex subscription),106 or a few cents per image on OpenRouter (`google/gemini-3.1-flash-image-preview`) —107 a full post is well under a dollar either way. Run `--doctor` to see which lane108 is ready.109- A written **`--avatar-spec`** (describe the character in words) markedly improves110 consistency over the image reference alone — use it whenever you have a description.111- Inspired by [xiaohei (小黑)](https://github.com/helloianneo/ian-xiaohei-illustrations)112 by helloianneo — this methodology is an adaptation of its hand-drawn editorial113 approach, reworded in Nib's own voice.