Story maintenance
This skill should be used when the user asks to validate, reindex, repair registries, check links, check continuity, count words, summarize a story project, import an existing manuscript, export a manuscript, run the story CLI, or perform deterministic maintenance on a Story Skills markdown project.
How to use it
Claude Code
- Run the line below. It pulls the whole folder into
~/.claude/skills/story-maintenance, including the files SKILL.md points to. - Describe your job in plain words. Claude Code follows the skill from there.
npx degit danjdewhurst/story-skills/skills/story-maintenance#main ~/.claude/skills/story-maintenanceFor one project only, change the path to .claude/skills/story-maintenance. This skill also uses manuscript.md, draft.md, synopsis.md, story.md, progress.md, style-sheet.md — copying SKILL.md alone won't be enough. See the folder on GitHub.
Claude (web or desktop app)
- On this page open ⋯ → Download .md.
- Save it as SKILL.md in a folder, zip the folder, then Customize → Skills → + → Create skill → Upload a skill.
- Pick the file and Save. Claude shows the name and description and runs a security scan.
- Check the skill is switched on.
- Start a new chat and describe your job in plain words. The AI follows the skill from there.
ChatGPT or another app
- ChatGPT: make a Project and paste it into Instructions.
- Neither? Paste it at the top of a new chat — it works for that chat.
Not working?
- Check which app you pasted it into — the steps above name the right one.
- Some skills need the paid tier of Claude or ChatGPT.
Paste into Claude, ChatGPT or Cursor.
Source of Story maintenance
Show the full text98 lines
| name | description |
|---|---|
| story-maintenance | This skill should be used when the user asks to validate, reindex, repair registries, check links, check continuity, count words, summarize a story project, import an existing manuscript, export a manuscript, run the story CLI, or perform deterministic maintenance on a Story Skills markdown project. |
Story Maintenance
Overview
Run deterministic maintenance for Story Skills projects. Use the CLI for structure validation, registry rebuilds, word counts, link checks, continuity checks, project reports, next-action reports, schema migration, entity helpers, manuscript import, and manuscript export. The creative skills still own story decisions; this skill handles mechanical consistency.
CLI Access
Prefer the first available command:
story <command>- when the package bin is installedbun run story -- <command>- when working from this repositorynode scripts/story.js <command>- bundled fallback, resolvingscripts/story.jsrelative to this skill folder
If none of these are available, perform the requested maintenance manually using the conventions in story-init.
Run the installed or bundled CLI in place. Do not copy scripts/story.js into the user's story project, and do not create project-local build scripts, generator scripts, or bulk writer scripts to generate story content. Story projects should remain markdown-first, plus explicitly requested exports such as manuscript.md.
Commands
Run commands from the story project root, or pass the story path explicitly.
story validate .
story reindex .
story wordcount . --write
story links .
story continuity .
story prose .
story timeline .
story progress . --log
story compare . --ref draft-1
story compare . --against ../book-draft-1
story series .
story import draft.md --title "Title"
story report .
story report . --actionable
story next .
story doctor .
story migrate .
story add character "Name"
story add matter "Dedication"
story add research "Tidal bore timing" --source "Tide tables 2024" --used-in chapter-03
story add matter "Acknowledgments" --placement back
story rename character old-id "New Name"
story remove promise old-promise
story export . --out manuscript.md
story build . --format markdown
story build . --format epub
story build . --format docx
story build . --format shunn
story build . --format docx --shunn
story knowledge sera-voss --at chapter-04
story add clue "The silver locket" --planted chapter-02 --payoff chapter-05
story synopsis --pages 1
story synopsis --pages 3 --out synopsis.md
Use:
validateafter initialization and at the end of any multi-file editreindexafter adding, removing, or renaming any entity file. It rebuilds the character, location, system, faction, artifact, arc, chapter, scene, question, promise, clue, and glossary registries.story addreindexes itself; a hand-written file does notwordcount --writeafter writing or revising chapterslinksafter changing character relationships, notable locations, arc participants, or chapter referencescontinuityafter drafting or revising a chapter, and whenever the user asks about contradictions, dead characters appearing, unfired setups, or stale state; it deterministically checksdied-inordering, promise/question chapter ordering, Chekhov gaps, POV/cast consistency, andcontinuity/state.mdreferences. It reuses the promise-ordering machinery for the clue ledger (continuity/clues/): payoff before plant is an error, and a completed story with planned or planted clues is an error. The Chekhov warning (a clue or promise planted three or more chapters ago) requiresstatus: planted.story add clue --plantedrecords the chapter and leavesstatus: planned, so setstatus: plantedwhen the clue is on the page. A recorded payoff chapter that is still ahead of the latest chapter suppresses the "no payoff yet" warning. It also checks prop custody — artifacts withdestroyedorloststatus must not be referenced after their destruction chapter (recorded in object-statesince: chapter-NN; later scenes referencing them instate-changesormentionsare errors) — and clock/time plausibility when scenes or chapters carrydate: YYYY-MM-DD/time: HH:MMfrontmatter (time may bedawn,morning,midday,afternoon,evening, ornight; scenetravel-hours: Nasserts minimum travel time). No dates means no time findings. Intentional exceptions go incontinuity/exemptions.md(frontmattertype: exemption-log, entries withpattern+reason); exempted findings are reported as dismissed, not errorscompareafter a revision pass, or when the user asks what changed since a draft:--refreads chapters at a git branch, tag, or commit withgit show(it never writes to the repository), and--againstreads another copy of the project. It reports per-chapter word changes, added and removed chapters, and the share of paragraphs unchanged. See Draft Snapshots in therevision-continuityskill for taking the snapshotprogresswhen the user asks how far along the book is, whether they will make a deadline, or after a writing session: it reports words againststory.mdtarget-words, days left todeadlineand words a day needed, chaptertarget-words, and pace fromprogress.md.--logrecords today's total there (--date YYYY-MM-DDto backfill); only log when the user keeps a log or asks for ittimelinewhen the user asks what happens when, how flashbacks sit against the main line, whose POV dominates, or where a character drops out: it orders dated scenes (and chapters without scene records) bydateandtime, marks entries told after later events, lists undated scenes in reading order, totals chapters and words per POV, and reports each character's chapter presence, longest absence, and absence from the final chapters. It is read-only;continuityowns clock errorsprosewhen the user asks for a prose check or before sharing a draft: per chapter it counts sentence length and spread, filter words and -ly adverbs per 1,000 narration words, plain and said-bookism dialogue tags, echoed words, watch words, and avoided spellings fromstyle-sheet.md(dialect,preferred,watch-words,allow-words); across the manuscript it lists repeated 4-word phrases and similar character first names. Findings are advisory warnings and the command exits 0. See thevoice-styleskill for acting on themserieswhenstory.mdhasfollowsorprecedeslinks to other books; it orders the linked sequels and prequels by chronology and checks shared canon (characters deceased in an earlier book, cast listings, facts relearned across books, name drift, destroyed artifacts). Useinit --follows <path>orinit --precedes <path>to start a linked book, and see theseries-continuityskill for carrying canon acrossimportwhen the user has an existing manuscript or chapter drafts and wants a Story Skills project built from them; follow up by creating character and location files from the printed entity candidates. Directory sources import in natural file-name order (chapter-2beforechapter-10).import --forceinto an existing directory deletes everychapter-NN.mdinchapters/before writing the imported chapters, so confirm with the user before forcing an import over a project with drafted chaptersreportwhen the user asks for project status, inventory, progress, or a quick health summarynextbefore a drafting session to identify the next deterministic actiondoctorwhen the user asks what is stale, broken, or inconsistentmigratewhen a project has an older schema version or missing v2 pathsadd,rename, andremovefor deterministic entity file operations when they fit the requested changeadd matterwhen the user wants a dedication, epigraph, copyright page, acknowledgments, author's note, about-the-author, or also-by page. Pages live inmatter/(indexed inmatter/_index.mdby reindex) withtitle,placement(frontorback),order, andheading(setheading: falsefor a dedication or epigraph). Write the page text directly in the file; unwritten pages are left out of builds andvalidatewarns about them. Never invent acknowledgments, biographical facts, or copyright details: ask the user for themadd researchwhen the story relies on a real-world fact: notes live inresearch/withstatus(open,verified,disputed), whole-citationsources, andused-inchapter ids;validatewarns when a final chapter relies on open or disputed research. See theresearchskillexportonly when the user asks for a combined manuscript at a specific path; it includes front and back matterbuildwhen the user asks to build the book artifact; supports markdown, EPUB, and DOCX outputs indist/, with front and back matter. For EPUB, setcover: path/to/cover.jpg(inside the project) andauthorinstory.mdto embed a cover image and creatorbuild --format shunnwhen the user wants Shunn manuscript-format markdown: title page, contact block, word count, chapter breaks, and double-spaced prose;story build . --format docx --shunnapplies the same Shunn formatting to the DOCX outputknowledgewhen the user asks what a character knew at a given chapter:story knowledge <character-id> --at <chapter-id>lists knowledge-state entries whoselearned-inchapter is at or before that chapter, plus entries withoutlearned-inas pre-existing knowledgeadd cluewhen the user plants a new clue:story add clue "Name" --planted chapter-02 --payoff chapter-05creates the clue ledger entity incontinuity/clues/withstatus: planned; omit--payoffwhen the payoff is not yet known, and setstatus: plantedwhen the clue is on the pagesynopsiswhen the user wants a mechanical synopsis: the first sentence ofstory.md's## Synopsissection, then each arc's Setup, Rising Action, Climax, and Resolution. One page is 500 words and three pages is 1500.story synopsis [--pages 1|3] [--out file]. The output is a scaffold; thesubmissionskill rewrites it into an agent-ready synopsis
Failure Handling
- Treat CLI errors as actionable maintenance findings.
- Fix broken references, missing required files, stale registries, or incorrect word counts when the requested task implies doing so.
- Do not overwrite creative prose or story content merely to satisfy a mechanical check.
- If a validation warning reflects intentional user data, report it rather than silently changing it.
- If
story reindexfails on a corruptplot/_index.md, do not hand-edit story content to work around it: restore the index frontmatter from git, or deleteplot/_index.mdso reindex rebuilds it, then rerun.
| 1 | |
| 2 | name story-maintenance |
| 3 | description This skill should be used when the user asks to validate, reindex, repair registries, check links, check continuity, count words, summarize a story project, import an existing manuscript, export a manuscript, run the story CLI, or perform deterministic maintenance on a Story Skills markdown project. |
| 4 | |
| 5 | |
| 6 | # Story Maintenance |
| 7 | |
| 8 | ## Overview |
| 9 | |
| 10 | Run deterministic maintenance for Story Skills projects. Use the CLI for structure validation, registry rebuilds, word counts, link checks, continuity checks, project reports, next-action reports, schema migration, entity helpers, manuscript import, and manuscript export. The creative skills still own story decisions; this skill handles mechanical consistency. |
| 11 | |
| 12 | ## CLI Access |
| 13 | |
| 14 | Prefer the first available command: |
| 15 | |
| 16 | `story <command>` - when the package bin is installed |
| 17 | `bun run story -- <command>` - when working from this repository |
| 18 | `node scripts/story.js <command>` - bundled fallback, resolving `scripts/story.js` relative to this skill folder |
| 19 | |
| 20 | If none of these are available, perform the requested maintenance manually using the conventions in `story-init`. |
| 21 | |
| 22 | Run the installed or bundled CLI in place. Do not copy `scripts/story.js` into the user's story project, and do not create project-local build scripts, generator scripts, or bulk writer scripts to generate story content. Story projects should remain markdown-first, plus explicitly requested exports such as `manuscript.md`. |
| 23 | |
| 24 | ## Commands |
| 25 | |
| 26 | Run commands from the story project root, or pass the story path explicitly. |
| 27 | |
| 28 | |
| 29 | story validate . |
| 30 | story reindex . |
| 31 | story wordcount . --write |
| 32 | story links . |
| 33 | story continuity . |
| 34 | story prose . |
| 35 | story timeline . |
| 36 | story progress . --log |
| 37 | story compare . --ref draft-1 |
| 38 | story compare . --against ../book-draft-1 |
| 39 | story series . |
| 40 | story import draft.md --title "Title" |
| 41 | story report . |
| 42 | story report . --actionable |
| 43 | story next . |
| 44 | story doctor . |
| 45 | story migrate . |
| 46 | story add character "Name" |
| 47 | story add matter "Dedication" |
| 48 | story add research "Tidal bore timing" --source "Tide tables 2024" --used-in chapter-03 |
| 49 | story add matter "Acknowledgments" --placement back |
| 50 | story rename character old-id "New Name" |
| 51 | story remove promise old-promise |
| 52 | story export . --out manuscript.md |
| 53 | story build . --format markdown |
| 54 | story build . --format epub |
| 55 | story build . --format docx |
| 56 | story build . --format shunn |
| 57 | story build . --format docx --shunn |
| 58 | story knowledge sera-voss --at chapter-04 |
| 59 | story add clue "The silver locket" --planted chapter-02 --payoff chapter-05 |
| 60 | story synopsis --pages 1 |
| 61 | story synopsis --pages 3 --out synopsis.md |
| 62 | |
| 63 | |
| 64 | Use: |
| 65 | |
| 66 | `validate` after initialization and at the end of any multi-file edit |
| 67 | `reindex` after adding, removing, or renaming any entity file. It rebuilds the character, location, system, faction, artifact, arc, chapter, scene, question, promise, clue, and glossary registries. `story add` reindexes itself; a hand-written file does not |
| 68 | `wordcount --write` after writing or revising chapters |
| 69 | `links` after changing character relationships, notable locations, arc participants, or chapter references |
| 70 | `continuity` after drafting or revising a chapter, and whenever the user asks about contradictions, dead characters appearing, unfired setups, or stale state; it deterministically checks `died-in` ordering, promise/question chapter ordering, Chekhov gaps, POV/cast consistency, and `continuity/state.md` references. It reuses the promise-ordering machinery for the clue ledger (`continuity/clues/`): payoff before plant is an error, and a completed story with planned or planted clues is an error. The Chekhov warning (a clue or promise planted three or more chapters ago) requires `status: planted`. `story add clue --planted` records the chapter and leaves `status: planned`, so set `status: planted` when the clue is on the page. A recorded payoff chapter that is still ahead of the latest chapter suppresses the "no payoff yet" warning. It also checks prop custody — artifacts with `destroyed` or `lost` status must not be referenced after their destruction chapter (recorded in object-state `since: chapter-NN`; later scenes referencing them in `state-changes` or `mentions` are errors) — and clock/time plausibility when scenes or chapters carry `date: YYYY-MM-DD` / `time: HH:MM` frontmatter (time may be `dawn`, `morning`, `midday`, `afternoon`, `evening`, or `night`; scene `travel-hours: N` asserts minimum travel time). No dates means no time findings. Intentional exceptions go in `continuity/exemptions.md` (frontmatter `type: exemption-log`, entries with `pattern` + `reason`); exempted findings are reported as dismissed, not errors |
| 71 | `compare` after a revision pass, or when the user asks what changed since a draft: `--ref` reads chapters at a git branch, tag, or commit with `git show` (it never writes to the repository), and `--against` reads another copy of the project. It reports per-chapter word changes, added and removed chapters, and the share of paragraphs unchanged. See Draft Snapshots in the `revision-continuity` skill for taking the snapshot |
| 72 | `progress` when the user asks how far along the book is, whether they will make a deadline, or after a writing session: it reports words against `story.md` `target-words`, days left to `deadline` and words a day needed, chapter `target-words`, and pace from `progress.md`. `--log` records today's total there (`--date YYYY-MM-DD` to backfill); only log when the user keeps a log or asks for it |
| 73 | `timeline` when the user asks what happens when, how flashbacks sit against the main line, whose POV dominates, or where a character drops out: it orders dated scenes (and chapters without scene records) by `date` and `time`, marks entries told after later events, lists undated scenes in reading order, totals chapters and words per POV, and reports each character's chapter presence, longest absence, and absence from the final chapters. It is read-only; `continuity` owns clock errors |
| 74 | `prose` when the user asks for a prose check or before sharing a draft: per chapter it counts sentence length and spread, filter words and -ly adverbs per 1,000 narration words, plain and said-bookism dialogue tags, echoed words, watch words, and avoided spellings from `style-sheet.md` (`dialect`, `preferred`, `watch-words`, `allow-words`); across the manuscript it lists repeated 4-word phrases and similar character first names. Findings are advisory warnings and the command exits 0. See the `voice-style` skill for acting on them |
| 75 | `series` when `story.md` has `follows` or `precedes` links to other books; it orders the linked sequels and prequels by chronology and checks shared canon (characters deceased in an earlier book, cast listings, facts relearned across books, name drift, destroyed artifacts). Use `init --follows <path>` or `init --precedes <path>` to start a linked book, and see the `series-continuity` skill for carrying canon across |
| 76 | `import` when the user has an existing manuscript or chapter drafts and wants a Story Skills project built from them; follow up by creating character and location files from the printed entity candidates. Directory sources import in natural file-name order (`chapter-2` before `chapter-10`). `import --force` into an existing directory deletes every `chapter-NN.md` in `chapters/` before writing the imported chapters, so confirm with the user before forcing an import over a project with drafted chapters |
| 77 | `report` when the user asks for project status, inventory, progress, or a quick health summary |
| 78 | `next` before a drafting session to identify the next deterministic action |
| 79 | `doctor` when the user asks what is stale, broken, or inconsistent |
| 80 | `migrate` when a project has an older schema version or missing v2 paths |
| 81 | `add`, `rename`, and `remove` for deterministic entity file operations when they fit the requested change |
| 82 | `add matter` when the user wants a dedication, epigraph, copyright page, acknowledgments, author's note, about-the-author, or also-by page. Pages live in `matter/` (indexed in `matter/_index.md` by reindex) with `title`, `placement` (`front` or `back`), `order`, and `heading` (set `heading: false` for a dedication or epigraph). Write the page text directly in the file; unwritten pages are left out of builds and `validate` warns about them. Never invent acknowledgments, biographical facts, or copyright details: ask the user for them |
| 83 | `add research` when the story relies on a real-world fact: notes live in `research/` with `status` (`open`, `verified`, `disputed`), whole-citation `sources`, and `used-in` chapter ids; `validate` warns when a final chapter relies on open or disputed research. See the `research` skill |
| 84 | `export` only when the user asks for a combined manuscript at a specific path; it includes front and back matter |
| 85 | `build` when the user asks to build the book artifact; supports markdown, EPUB, and DOCX outputs in `dist/`, with front and back matter. For EPUB, set `cover: path/to/cover.jpg` (inside the project) and `author` in `story.md` to embed a cover image and creator |
| 86 | `build --format shunn` when the user wants Shunn manuscript-format markdown: title page, contact block, word count, chapter breaks, and double-spaced prose; `story build . --format docx --shunn` applies the same Shunn formatting to the DOCX output |
| 87 | `knowledge` when the user asks what a character knew at a given chapter: `story knowledge <character-id> --at <chapter-id>` lists knowledge-state entries whose `learned-in` chapter is at or before that chapter, plus entries without `learned-in` as pre-existing knowledge |
| 88 | `add clue` when the user plants a new clue: `story add clue "Name" --planted chapter-02 --payoff chapter-05` creates the clue ledger entity in `continuity/clues/` with `status: planned`; omit `--payoff` when the payoff is not yet known, and set `status: planted` when the clue is on the page |
| 89 | `synopsis` when the user wants a mechanical synopsis: the first sentence of `story.md`'s `## Synopsis` section, then each arc's Setup, Rising Action, Climax, and Resolution. One page is 500 words and three pages is 1500. `story synopsis [--pages 1|3] [--out file]`. The output is a scaffold; the `submission` skill rewrites it into an agent-ready synopsis |
| 90 | |
| 91 | ## Failure Handling |
| 92 | |
| 93 | Treat CLI errors as actionable maintenance findings. |
| 94 | Fix broken references, missing required files, stale registries, or incorrect word counts when the requested task implies doing so. |
| 95 | Do not overwrite creative prose or story content merely to satisfy a mechanical check. |
| 96 | If a validation warning reflects intentional user data, report it rather than silently changing it. |
| 97 | If `story reindex` fails on a corrupt `plot/_index.md`, do not hand-edit story content to work around it: restore the index frontmatter from git, or delete `plot/_index.md` so reindex rebuilds it, then rerun. |
| 98 |
Discussion
Browse more free Claude skills or everything in Science.