Turn a concept into an original teaching analogy and render it as a 4:5 social carousel (1080×1350 PNG per slide plus a PDF for LinkedIn).
A course lesson explained the repository pattern like this:
Think of a repository like a librarian. You don't need to know where books are shelved or how the catalog system works. You simply ask the librarian for a book by title, and they handle all the details. Your business logic asks the repository for data, and the repository handles whether that data comes from SQLite, PostgreSQL, or a simple dictionary in memory.
A student replied:
simile is so helpful! hope there will be more of this in the rest of the course 😉
This tool makes more of them.
uv sync && uv run playwright install chromium # or: just setup
uv run similes list
uv run similes render rust-ownership-book --theme noir --cta "Join the Rust cohort"Create new similes with the /simile Claude Code skill (.claude/skills/simile/) inside this repo, or from any MCP client:
uvx --from git+https://github.com/bbelderbos/similes python -m playwright install chromium # once
claude mcp add similes -- uvx --from git+https://github.com/bbelderbos/similes similes-mcpThe server offers a simile prompt (the interview, drafting and critic flow) and four tools: list_looks, genre_voice, validate_simile and render_simile. Images in MCP mode must be absolute paths.
To use it:
- Start the prompt with a concept. In Claude Code:
/similes:simile Rust ownership. In Claude Desktop: picksimilefrom the + menu. - Answer the interview questions, one at a time.
- Approve a draft. Claude validates and renders it; the PNGs and PDF go to
~/Downloads/similes/<slug>/(created if missing;%USERPROFILE%\Downloads\simileson Windows). - Ask for changes in plain words ("make it noir", "add a CTA: Join the cohort") and Claude re-renders.
Common tasks are in the Justfile (just lists them: check, render, render-all, gallery, mcp, deploy).
similes list [--library PATH] shows slug, genre and concept for every simile.
similes render SLUG [options] writes <out>/<slug>/<slug>-<look>-NN.png and <slug>-<look>.pdf.
| Option | Default | |
|---|---|---|
--theme |
the genre's look | any of the 16 looks below |
--cta |
none | Text for an extra final slide |
--library |
library |
Folder with <slug>.toml files |
--out |
out |
Output root |
Render exits with an error if any slide's text overflows; shorten the copy.
library/<slug>.toml, validated on load. See library/rust-ownership-book.toml for a full example with code.
| Field | Notes |
|---|---|
concept, audience, aha, source_world |
Required |
simile |
Required, max 20 words |
hook |
Required, max 15 words |
breaks_down |
Required, max 25 words |
takeaway |
Required, max 12 words |
genre |
plain, noir, fable, heist, expedition. Each defaults to the look with the same name |
[[mapping]] |
3 to 5 rows: source, target (max 4 words each), detail (max 12), optional code |
lang |
en (default) or es for slide labels |
code_lang |
Pygments lexer for code, default python |
image |
Optional photo path relative to library/, shown on the hook and simile slides |
tags |
Optional |
Hook, mapping and takeaway slides of rust-ownership-book in each look. Regenerate with uv run python scripts/gallery.py [slug].
plain
noir
paper
blueprint
terminal
fable
heist
expedition
chalkboard
newsprint
swiss
riso
bauhaus
neon
brutalist
botanical
Fonts are bundled in src/similes/fonts/ (SIL Open Font License, see LICENSES.txt) and inlined at render time, so rendering works offline. Refetch with uv run python scripts/fetch_fonts.py.
The skill instructions live in src/similes/prompts/simile.md (shared by the skill and the MCP prompt). The rubric, voice rules and cliché list are in src/similes/prompts/rubric.md; genre voices in src/similes/genres/.
site/ is a static page served by Cloudflare Pages (project similes, direct upload, no git integration) at similes.belderbos.dev, falling back to similes.pages.dev.
wrangler pages deploy site --project-name similes --branch mainThe custom domain is attached to the Pages project and needs a proxied CNAME similes → similes.pages.dev in the belderbos.dev zone. Images in site/img/ are copies: re-copy from docs/looks/ and out/ when the gallery or example carousel changes.
MIT. Bundled fonts are under the SIL Open Font License (src/similes/fonts/LICENSES.txt).















