edit-chapter
Invoke this skill before making substantive edits to any file in guide/ — changing content, titles, template references, or canonical terms. Follow this workflow proactively when editing chapters, not
SKILL.md.claude/skills/edit-chapter/SKILL.md
GitHubEdit Chapter
Guided workflow for safely editing a guide chapter. Ensures structural changes propagate to all dependent files.
Before Editing
- Read the entire chapter file
- Note the current H1 title (line 1)
- Note any template paths referenced (lines mentioning
templates/) - Note any canonical terms used ("five-tier context hierarchy", "document cascade")
During Editing
- Maintain prescriptive voice — no hedging phrases (see
.claude/rules/guide-chapter.md) - Preserve required sections: Principles, What the Human Should Do, What the Agent Should Do
- Use RecipeVault for examples (not "Beacon")
- Keep heading hierarchy:
##for major sections,###for subsections - Use fenced code blocks with language identifiers
After Editing
Check each condition and take action if true:
If the H1 title changed:
- Update
README.mdchapter listing (lines 45-93) - Update
CLAUDE.mdif the chapter is referenced there - Update the "Next:" link in the prior chapter's footer
If template references changed:
- Verify each referenced template path exists in
templates/ - If a path was removed or renamed, grep for the old path across the repo
If a canonical term changed:
- Search all
.mdfiles for the old term - Update every occurrence to match the new term
Always (every edit):
- Verify the chapter ends with a
Next:footer linking to the correct successor chapter, unless the file is11-failure-modes.md - The footer must follow this format:
--- Next: [Chapter NN -- Title](NN-slug.md)
If any structural change was made (title, file references, canonical terms):
- Run the
cross-reference-checkskill to verify consistency