once-upon-a-stack
/once-upon-a-stack
Use when the user asks to build, write or rewrite a book, picture book, storybook or children's-book explanation of any topic (a codebase or repo, your company's architecture, React internals, Kubernetes, TCP, a concept), wants a visual, illustrated or interactive explainer of how a system or codebase works (for onboarding, learning or teaching someone else), asks to add to or change a book in the library, or wants a topic explained deeply as a story to keep and reread.
- Author
- AndrewLawendy ↗
- Repository
- once-upon-a-stack ↗
- Licence
- MIT
- Last repository change
- 13.11.2026
Assessment and security
- Files in this package
- 104
- Scripts
- 2
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 13.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 2 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/build.py, scripts/check.mjs
What it does and when to use it
Use when the user asks to build, write or rewrite a book, picture book, storybook or children's-book explanation of any topic (a codebase or repo, your company's architecture, React internals, Kubernetes, TCP, a concept), wants a visual, illustrated or interactive explainer of how a system or codebase works (for onboarding, learning or teaching someone else), asks to add to or change a book in the library, or wants a topic explained deeply as a story to keep and reread.
Original author description
Use when the user asks to build, write or rewrite a book, picture book, storybook or children's-book explanation of any topic (a codebase or repo, your company's architecture, React internals, Kubernetes, TCP, a concept), wants a visual, illustrated or interactive explainer of how a system or codebase works (for onboarding, learning or teaching someone else), asks to add to or change a book in the library, or wants a topic explained deeply as a story to keep and reread.
How it works
- If your agent can't do something
- Check the tools
- Find the library
- Build a new book
- Progress
- Rewrite
- Requirements every book meets
- Common mistakes
SKILL.md preview
---
name: once-upon-a-stack
description: Use when the user asks to build, write or rewrite a book, picture book, storybook or children's-book explanation of any topic (a codebase or repo, your company's architecture, React internals, Kubernetes, TCP, a concept), wants a visual, illustrated or interactive explainer of how a system or codebase works (for onboarding, learning or teaching someone else), asks to add to or change a book in the library, or wants a topic explained deeply as a story to keep and reread.
compatibility: Works with any agent that reads Agent Skills. Needs Python 3, Node.js 22+ and a Chromium-based browser (Chrome, Chromium, Edge or Brave).
---
# Once Upon a Stack
A book explains one topic deeply as a children's story with real engineering underneath. It is one self-contained offline HTML file in `<library>/<slug>--<topic>/index.html`, listed on the shelf at `<library>/index.html`. Reading it needs no agent and no network. It changes only when the user asks for a rewrite.
The folder always says what the book is about, in kebab case: the story name, a double hyphen, then the real topic, such as `the-diner-on-long-road--caching`. Below, `<book>` means that folder.
Paths below are relative to this skill's directory.
## If your agent can't do something
- **No subagents:** research the journeys one at a time yourself, writing each dossier before starting the next. For the fact-check, ask the user to run it in a new session with the brief in `references/research.md`, so the checker still didn't write the book.
- **Can't view images:** rely on the check's report, and ask the user to open the screenshots in `.source/check/` and tell you what looks wrong.
## Check the tools
Do this first, every time, before any research. It takes a few seconds.
1. `python3 --version` (on Windows, `python --version`) must print Python 3.
2. `node scripts/check.mjs --preflight` must print `Ready:`. It confirms Node.js 22 or newer and that a Chromium-based browser (Chrome, Chromium, Edge or Brave) launches.
If either fails, stop. Tell the user exactly what's missing and how to get it: Python from python.org, Node.js from nodejs.org, or a browser. If a browser is installed but not found, set `CHROME_PATH` to its executable. Don't start research until both pass.
## Find the library
Do this next, every time. `<library>` is the `library` value in `~/.config/once-upon-a-stack/config.json`. If that file doesn't exist, ask where to keep the books, suggest `~/once-upon-a-shelf`, and save the folder they choose, for example `{"library": "~/once-upon-a-shelf"}`, creating the folders. Ask only once. Don't suggest `~/Library` or `~/library`: on macOS that is a hidden system folder.
## Build a new book
1. **Scope.** Do a quick map pass of the topic: what exists, who talks to whom, and which problem forced each part to exist. Choose a world that does some of the explaining (`references/story.md`) and an art style that suits it (`references/styles.md`).
2. **Table of contents: the only stop.** Show the world, art style, and the chapters from `references/story.md`. Show the cast, one line per character with the one real thing it maps to, such as `Pip: the request`. For each chapter: its goal, what it comes from (the price or the next want), each attempt, why it breaks (marked Verified with its source, or Inferred) and who arrives, and where the goal is met. Also show what's left out and a rough size. Aim for 20-35 pages unless the user asks for more, and offer a bigger version as an option. Give a rough time for each step and in total, per Progress below. Before showing it, check that every character arrives from a break and maps to one real thing, every break is marked Verified with a source or Inferred, and every chapter's "from" works as one sentence ("Because X, the hero now wants Y"). Fix what fails, then show it. Wait for the user's approval. Adjust and re-show until they approve. Approval covers everything through step 8.
3. **Set up** `<library>/<book>/.source/` as described in `references/craft.md`. Save the approved plan in `plan.md` and the chain in `chain.json`. Every later step updates `plan.md`, with its start and finish time, so an interrupted build can resume from it.
4. **Research** each chapter per `references/research.md`, using one subagent per journey in parallel. Each writes its dossier to `.source/facts/`. Read the dossiers yourself and chase anything thin.
5. **Write and draw** the pages per `references/story.md`, `references/craft.md` and `references/styles.md`. Write the story and art yourself, not through subagents, so voice and characters stay consistent.
6. **Build:** `python3 scripts/build.py "<library>/<book>"` (on Windows, `python`). Fix everything it reports.
7. **Check it visually, headless:** `node scripts/check.mjs "<library>/<book>"`. Read the report and look at every screenshot. Fix, rebuild and re-check until clean. Open a visible browser only for something headless can't settle. Then audit the story: walk `chain.json` against the pages and confirm that each break is shown, each character arrives because of the break before it, and each chapter's goal is met with the hero there. Say each chapter boundary aloud as one sentence ("Because X, the hero now wants Y"). If it only works as "and also", it's a side topic: move it to a "Wait, how?" page or the reference pages. Confirm the full picture shows the hero's last trip as a scene.
8. **Fact-check** with a fresh subagent that didn't write the book, using the brief in `references/research.md`. It checks every claim in the story text, the notes and the scene labels against its cited source. Fix or relabel everything it reports, then rebuild and re-check.
9. **Hand over** the path, the open command, and what's weakest: thin chapters, the count of unknowns, and anything the fact-check couldn't settle. Stop there. Publishing or committing needs its own request.
## Progress
At the start of each step, and after each chapter while writing, post one line with the step, what's done and the time left, such as `Step 5 of 9: writing pages (12 of 30 done), about 10 min left.`
Rough times for a 30-40 page book, measured on real runs: research 5-10 min, writing 8-15 min, build and visual check 4-8 min, fact-check 10-15 min and fixes 2-5 min, so 25-45 min in total. Scale with the page count. Without subagents, research takes about this long for each chapter. Once a step has finished, base the time left on how long the steps so far really took.
## Rewrite
- **Whole book:** repeat steps 1-9. Keep the world, cast and art style unless the user asks otherwise.
- **One chapter or topic:** read `plan.md`, `book.json` and that chapter's dossier. Re-research against current sources, update that part of `chain.json`, rewrite only those pages, and add an entry to `rewrites` in `book.json` so the cover shows that chapter's own date. Then build, check and fact-check those pages. No table of contents approval is needed.
- **Resume:** when `.source/plan.md` shows unfinished work, continue from there.
## Requirements every book meets
- **Everything is explained.** Each character, method and step says what problem it solves and what happens without it. Follow every "wait, how?" until it has a source or is logged as unknown.
- **The story is a series of goals, linked by cause and effect.** Each chapter opens on something the hero wants, caused by the chapter before. Each attempt breaks for a real engineering reason, and each break brings the next character. The cast and whole path appear only near the end. The build enforces this from `chain.json`.
- **Whole-topic stories.** The book teaches the topic. Don't build it around one incident from the conversation unless asked.
- **Nothing is stated beyond its evidence.** Verified, inferred and unknown are labeled, and sources are cited. Unknowns go on the "What we don't know yet" page.
- **The real name stays next to the story name.** Use the `[[Hazel|the cache]]` macro for every mention and `{{tag|...}}` tags in every scene. The build fails on an unlabeled name.
- **Motion stays out of the way, and pages fit a laptop screen.** See `references/craft.md`.
## Common mistakes
| Mistake | Instead |
|---|---|
| Answering from a KB, docs summary or memory | Trace it in the primary source. Facts taken from summaries are often wrong once the code or spec is read. |
| Splitting chapters by repo or module | Split by journey, because bugs live between components |
| Explaining the trip without the need | Start from the tempting wrong answer and show why it breaks |
| Opening with a cast page or system map | Characters arrive one by one, and the full picture comes last |
| Checking only that facts are right | Also check that each character is caused by the failure before it |
| The goal is met early and the book turns into a manual | Give each chapter its own goal, caused by the chapter before, so no stretch of pages runs without one. |
| A table of fields, codes or types as a story page | Put it on the reference pages, or a "Wait, how?" page starting from something the hero holds |
| A villain for every problem | Personify only what recurs or seems to have a will of its own |
| Fast, large ambient animation | Slow and small, so it never pulls the eye from the text. |
| Declaring it done from a passing build | Look at the screenshots |
| The writer checking their own facts | A fresh subagent fact-checks. Writers miss their own overstatements. |
| A long scrolling chapter | One idea per page |
Files in this package (104)
- SKILL.md 9 KB
- assets/shelf.html 2 KB
- assets/shell.html 27 KB
- assets/example/book.json 1 KB
- assets/example/chain.json 3 KB
- assets/example/symbols.svg 13 KB
- assets/example/pages/00-cover.html 1 KB
- assets/example/pages/01-goal.html 2 KB
- assets/example/pages/02-baker.html 2 KB
- assets/example/pages/03-long-road.html 3 KB
- assets/example/pages/04-della.html 2 KB
- assets/example/pages/05-hit-miss.html 4 KB
- assets/example/pages/06-old-recipe.html 4 KB
- assets/example/pages/07-sticker.html 4 KB
- assets/example/pages/08-phone-call.html 4 KB
- assets/example/pages/09-right-pie.html 3 KB
- assets/example/pages/10-full-case.html 3 KB
- assets/example/pages/11-random.html 2 KB
- assets/example/pages/12-eddie.html 4 KB
- assets/example/pages/13-noon.html 2 KB
- assets/example/pages/14-rush.html 4 KB
- assets/example/pages/15-longer.html 2 KB
- assets/example/pages/16-tess.html 4 KB
- assets/example/pages/17-noon-pie.html 4 KB
- assets/example/pages/18-full-picture.html 3 KB
- assets/example/pages/19-cast.html 2 KB
- assets/example/pages/20-unknowns.html 2 KB
- assets/example/pages/21-debug.html 2 KB
- assets/example/pages/22-glossary.html 2 KB
- assets/font-licenses/alegreya.txt 4 KB
- assets/font-licenses/alfaslabone.txt 4 KB
- assets/font-licenses/architectsdaughter.txt 4 KB
- assets/font-licenses/bebasneue.txt 4 KB
- assets/font-licenses/bowlbyone.txt 4 KB
- assets/font-licenses/cardo.txt 4 KB
- assets/font-licenses/cinzeldecorative.txt 4 KB
- assets/font-licenses/fontdinerswanky.txt 11 KB
- assets/font-licenses/imfellenglish.txt 4 KB
- assets/font-licenses/josefinsans.txt 4 KB
- assets/font-licenses/librefranklin.txt 4 KB
- assets/font-licenses/pressstart2p.txt 4 KB
- assets/font-licenses/sharetechmono.txt 4 KB
- assets/font-licenses/vt323.txt 4 KB
- assets/styles/blueprint/defs.svg 1 KB
- assets/styles/blueprint/example.svg 6 KB
- assets/styles/blueprint/style.css 2 KB
- assets/styles/blueprint/style.json 1 KB
- assets/styles/blueprint/fonts/architects-daughter-400.woff2 13 KB
- assets/styles/blueprint/fonts/libre-franklin-400.woff2 16 KB
- assets/styles/blueprint/fonts/libre-franklin-400i.woff2 17 KB
- assets/styles/blueprint/fonts/libre-franklin-700.woff2 16 KB
- assets/styles/blueprint/fonts/share-tech-mono-400.woff2 13 KB
- assets/styles/cut-paper/defs.svg 1 KB
- assets/styles/cut-paper/example.svg 3 KB
- assets/styles/cut-paper/style.css 3 KB
- assets/styles/cut-paper/style.json 1 KB
- assets/styles/cut-paper/fonts/alegreya-b.woff2 24 KB
- assets/styles/cut-paper/fonts/alegreya-i.woff2 23 KB
- assets/styles/cut-paper/fonts/alegreya.woff2 22 KB
- assets/styles/cut-paper/fonts/bowlby.woff2 21 KB
- assets/styles/mid-century/defs.svg 1 KB
- assets/styles/mid-century/example.svg 3 KB
- assets/styles/mid-century/style.css 2 KB
- assets/styles/mid-century/style.json 1 KB
- assets/styles/mid-century/fonts/fontdiner-swanky-400.woff2 17 KB
- assets/styles/mid-century/fonts/josefin-sans-400.woff2 12 KB
- assets/styles/mid-century/fonts/josefin-sans-400i.woff2 13 KB
- assets/styles/mid-century/fonts/josefin-sans-700.woff2 12 KB
- assets/styles/pixel-art/defs.svg 1 KB
- assets/styles/pixel-art/example.svg 261 KB
- assets/styles/pixel-art/style.css 3 KB
- assets/styles/pixel-art/style.json 1 KB
- assets/styles/pixel-art/fonts/press-start-2p-400.woff2 12 KB
- assets/styles/pixel-art/fonts/vt323-400.woff2 18 KB
- assets/styles/stained-glass/defs.svg 1 KB
- assets/styles/stained-glass/example.svg 9 KB
- assets/styles/stained-glass/style.css 2 KB
- assets/styles/stained-glass/style.json 1 KB
- assets/styles/stained-glass/fonts/cardo-400.woff2 15 KB
- assets/styles/stained-glass/fonts/cardo-400i.woff2 19 KB
- assets/styles/stained-glass/fonts/cardo-700.woff2 19 KB
- assets/styles/stained-glass/fonts/cinzel-decorative-400.woff2 14 KB
- assets/styles/stained-glass/fonts/cinzel-decorative-700.woff2 15 KB
- assets/styles/vintage-poster/defs.svg 1 KB
- assets/styles/vintage-poster/example.svg 3 KB
- assets/styles/vintage-poster/style.css 2 KB
- assets/styles/vintage-poster/style.json 1 KB
- assets/styles/vintage-poster/fonts/bebas-neue-400.woff2 13 KB
- assets/styles/vintage-poster/fonts/libre-franklin-400.woff2 16 KB
- assets/styles/vintage-poster/fonts/libre-franklin-400i.woff2 17 KB
- assets/styles/vintage-poster/fonts/libre-franklin-700.woff2 16 KB
- assets/styles/woodcut/defs.svg 1 KB
- assets/styles/woodcut/example.svg 13 KB
- assets/styles/woodcut/style.css 2 KB
- assets/styles/woodcut/style.json 1 KB
- assets/styles/woodcut/fonts/alfa-slab-one-400.woff2 19 KB
- assets/styles/woodcut/fonts/im-fell-english-400.woff2 58 KB
- assets/styles/woodcut/fonts/im-fell-english-400i.woff2 56 KB
- references/craft.md 8 KB
- references/research.md 5 KB
- references/story.md 6 KB
- references/styles.md 3 KB
- scripts/build.py 14 KB
- scripts/check.mjs 12 KB
Versions
The database has no other skills named once-upon-a-stack.
Database snapshot: 13.11.2026 · package version 58dadb58868f (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100walkthrough
Use when turning a repo, pull request, plan/design doc, architecture, article, blog post, book, lecture, or transcript into an interactive learning artifact — a self-contained offline walkthrough.html and/or a deployable learning hub. Triggers include "onboarding guide", "walk… - 100explainer-book
1 本の速習資料では収まらない、章立ての学習資料(<topic>-book/01-quickstart.md, 02-….md …)を、読み手のペルソナに合わせて設計・執筆・検証する。章ごとの学習目標と理解度チェックの対応、概念を導入より前に使わない順序、章の読了時間の予算、「未完成なら落ち、答えなら通る」演習、book.json から生成する章の依存図を、verify-book.mjs で検査し、各章の出力・図・HTML は explainer の verify-doc.mjs で検査する。Use when the user asks for a… - 90book-to-movie
Turn a book (PDF, EPUB, text, Word or HTML) into an illustrated, narrated film, one story at a time. Use when someone wants to make a movie, film, animation or video adaptation of a book, novel, story or long document. Pass the path to the book. - 100visual-explainer
Build a clickable, visual explainer that teaches a hard topic from zero — a single self-contained HTML page with chapters, stepped narration and hand-drawn interactive SVG diagrams instead of walls of text. Use when someone asks to learn or teach a subject properly, wants an… - 100library-book-search
Use when the user asks to search Korean library books, book details, library holdings, or whether a Korean public library owns a book via k-skill-proxy Data4Library routes. - 90learning-guide
Use when the user asks to "create a learning guide", "make an interactive tour", "generate onboarding doc", "build a learning module", or any variant of turning an artifact (codebase, planning session, refactor plan, design doc) into an interactive HTML guide. Dispatches to…