claude-anvil / worldsmith
CLAUDE.md2 starsChanged 5 months agoMITView on GitHub
Worldsmith is a Claude Code plugin for documentation-first fiction worldbuilding (the "Silmarillion approach"). There is no build system, test suite, or compiled code. The entire codebase is Markdown files with YAML frontmatter, bash scripts, and JSON hooks. "Development" means editing skills, commands, agents, hooks, and scripts. YAML frontmatter with name, description (trigger phrases for auto-detection), and version. Body is lean methodology with references to detailed docs via ${CLAUDE_PLUGIN_ROOT}. When adding references, verify the target file exists. Orchestrators (spawn specialists via…
In this repository11 other files it gives its agents.
- bookwright/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- crier/CLAUDE.mdCLAUDE.md
- kdp/CLAUDE.mdCLAUDE.md
- locksmith/CLAUDE.mdCLAUDE.md
- mf/CLAUDE.mdCLAUDE.md
- papermill/CLAUDE.mdCLAUDE.md
- pub-pipeline/CLAUDE.mdCLAUDE.md
- repoindex/CLAUDE.mdCLAUDE.md
- research-agent/CLAUDE.mdCLAUDE.md
- vista/CLAUDE.mdCLAUDE.md
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 86
Propagation awareness: Every change has a blast radius.
- Very specific: line 136
When editing propagation-related content, check both references/propagation-awareness.md and hooks/hooks.json
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What This Is
Worldsmith is a Claude Code plugin for documentation-first fiction worldbuilding (the "Silmarillion approach"). There is no build system, test suite, or compiled code. The entire codebase is Markdown files with YAML frontmatter, bash scripts, and JSON hooks. "Development" means editing skills, commands, agents, hooks, and scripts.
Plugin Structure
.claude-plugin/plugin.json # Manifest (name, version, description)
skills/worldsmith-methodology/SKILL.md # Editorial methodology skill
skills/worldsmith-methodology/references/ # Deep reference docs (propagation, doc structure)
skills/prose-craft/SKILL.md # Prose craft rules (show-don't-tell, dialogue, scene structure)
commands/{init-world,change,check,review,draft,revise,iterate,help}.md # 8 slash commands
agents/reviewer.md # Review orchestrator (spawns specialist auditors)
agents/writer.md # Writer orchestrator (spawns specialist writers)
agents/rewriter.md # Rewriter orchestrator (fix-then-verify loop)
agents/iterator.md # Iterator orchestrator (autonomous review-fix loop)
agents/{consistency,craft,voice,structure}-auditor.md # 4 review specialists (read-only)
agents/{lore-writer,scene-writer,character-developer}.md # 3 writing specialists
hooks/hooks.json # SessionStart + PostToolUse + Stop hooks
hooks/scripts/detect-worldsmith-project.sh # Project detection (checks for .worldsmith/ directory)
hooks/scripts/propagation-reminder.sh # PostToolUse propagation reminders
hooks/scripts/check-fiction-cliches.sh # Cliche detection (stock reactions, dead metaphors, emotional labeling, redundant adverbs, fancy dialogue tags)
hooks/scripts/completion-check.sh # Stop hook: propagation verification
hooks/scripts/parse-project-yaml.py # Parse .worldsmith/project.yaml; emits shell env vars consumed by other hooks
scripts/count_patterns.py # Prose pattern counting (reads patterns.md)
scripts/patterns.md # Default pattern definitions (overridable per project)File Format Conventions
Commands (commands/*.md)
YAML frontmatter with description, allowed-tools, and optional argument-hint. Body contains instructions FOR Claude describing rules and awareness, not rigid scripts. Commands reference $ARGUMENTS for user input and ${CLAUDE_PLUGIN_ROOT} for sibling files.
Skills (skills/*/SKILL.md)
Two skills, independently triggered:
- worldsmith-methodology — Editorial methodology: canonical hierarchy, propagation, doc roles, dual workflow. Triggers on doc ecosystem and worldbuilding keywords.
- prose-craft — Sentence-level prose craft: show-don't-tell, dialogue mechanics, scene structure, AI-fiction failure modes. Triggers on fiction writing and editing keywords.
YAML frontmatter with name, description (trigger phrases for auto-detection), and version. Body is lean methodology with references to detailed docs via ${CLAUDE_PLUGIN_ROOT}. When adding references, verify the target file exists.
Agents (agents/*.md)
Four orchestrators and seven specialists. YAML frontmatter with name, description, tools (list), model: inherit, and color. The four orchestrators carry rich descriptions with <example> blocks for auto-delegation; the seven specialists use a one-sentence description with no examples, because the orchestrators dispatch them by hardcoded name and every agent description loads into every session's context (see the root CLAUDE.md agent description policy).
Orchestrators (spawn specialists via Task tool):
- reviewer: Multi-agent editorial review. Reads project context, launches 4 auditors in parallel, cross-verifies critical findings, synthesizes unified report to
.worldsmith/reviews/. - writer: Multi-agent content generation. Plans assignments, launches specialists, integrates output, handles doc propagation.
- rewriter: Multi-agent revision. Reads review findings, dispatches writer specialists to fix, then reviewer specialists to verify. Fix-then-verify feedback loop.
- iterator: Autonomous review-fix-review loop. Composes reviewer and rewriter, drives toward convergence with regression and plateau detection, defers high-stake creative judgments to a single end-of-loop user checkpoint. Writes per-round artifacts to
.worldsmith/iterate/<timestamp>/.
Review specialists (read-only, launched by reviewer):
- consistency-auditor — Timeline, facts, character state, spatial contradictions
- craft-auditor — Prose quality, cliche detection, scene mechanics (has Bash for
count_patterns.py) - voice-auditor — Character voice consistency, dialogue distinctiveness, POV
- structure-auditor — Pacing, tension, scene turns, thematic coherence, arc trajectory
Writing specialists (launched by writer):
- lore-writer — History, mythology, cultures, systems with consequence chains
- scene-writer — Prose scenes with craft discipline (read-only, produces draft in output)
- character-developer — Voice patterns, arc development, relationship mapping
Hooks (hooks/hooks.json)
Three event types:
- SessionStart (command): Runs
detect-worldsmith-project.sh— checks for.worldsmith/directory, readsproject.yamlfor multi-work projects, setsWORLDSMITH_PROJECTenv var and work metadata, outputs doc/work inventory - PostToolUse (command, matcher:
Write|Edit): Two hooks. Propagation reminders fire for any doc or manuscript edit. Cliche detection (stock body reactions, dead metaphors, emotional labeling, redundant adverbs, fancy dialogue tags) fires only for edits inside the manuscript directory (multi-work: paths fromproject.yaml; single-work:chapters/,manuscript/,scenes/,stories/heuristics). Skips README, CLAUDE.md,docs/plans/, and other non-prose files. - Stop (command): Completion verification before session exit
Scripts
scripts/count_patterns.py— Python, reads pattern definitions fromscripts/patterns.md. Projects can override by placingpatterns.mdin.worldsmith/at project root.scripts/patterns.md— Default pattern list (crutch words, filter words, weak verbs, dialogue tags). Plain markdown, self-documenting, editable by Claude or by hand.hooks/scripts/detect-worldsmith-project.sh— Bash, runs on SessionStart.
Core Concepts
Role-based doc ecosystem. The plugin thinks in document roles (timeline authority, lore, systems, characters, style conventions, outline, editorial backlog, themes/anti-cliche, universe bible, exploratory ideas), not hardcoded filenames. Each target project's CLAUDE.md maps roles to its own file structure.
Canonical hierarchy (when sources disagree): canonical tables > timeline authority > system specs > character entries > outline > manuscript.
Dual workflow:
- Canonical changes: docs first, then manuscript, then propagation check
- Exploratory ideas: provisional sections only, no manuscript changes until promoted
Propagation awareness. Every change has a blast radius. Claude traces changes through the doc graph using awareness (not rigid matrices). Details in references/propagation-awareness.md.
Series awareness. Projects can reference related projects (prequels, sequels, shared-world companions) in their CLAUDE.md. Shared world facts propagate across projects; project-local facts don't.
Multi-work projects. A universe can contain multiple works (novel plus short stories, etc.) sharing canonical lore. Configured via .worldsmith/project.yaml. If absent, worldsmith infers a single work (backward compatible).
The cross-language mechanism: detect-worldsmith-project.sh invokes parse-project-yaml.py --env, which emits shell variable assignments (WORLDSMITH_UNIVERSE, WORLDSMITH_LORE_DIR, WORLDSMITH_WORK_COUNT, WORLDSMITH_WORK_N_{NAME,TYPE,MANUSCRIPT,LORE,FILETYPES}) into $CLAUDE_ENV_FILE. Downstream hooks read these env vars to scope behavior to the active work without re-parsing YAML in bash. This is the parent CLAUDE.md's "no regex parsing of structured data" rule made concrete.
Each work can optionally have its own local lore directory for work-specific docs. Conflict hierarchy: shared lore > local lore > manuscript. Commands, orchestrator agents, and hooks all respect work scoping when project.yaml is present.
Development Workflow
Features land via a design → impl → commit pipeline recorded in docs/plans/:
docs/plans/YYYY-MM-DD-<feature>-design.md: rationale, alternatives, chosen approachdocs/plans/YYYY-MM-DD-<feature>-impl.md: step-by-step plan with- [ ]checkboxes per task- Each task in the impl plan becomes one atomic commit with a conventional prefix scoped to this plugin:
feat(worldsmith):,fix(worldsmith):,chore(worldsmith):, ordocs(worldsmith): - The final task in every impl plan bumps the version (see "Version Bumps" in
../CLAUDE.md) and refreshes the Plugin Structure tree above if new files were added
When asked to implement a new feature, write the design and impl plans first, then execute the impl task-by-task. The plans are the historical record: the codebase shows what, the plans show why. Read an existing plan (e.g. 2026-03-10-multi-work-universe-*.md) before adding a new one so the structure stays consistent.
Validation
# Skill frontmatter has name and description
for f in skills/*/SKILL.md; do echo "=== $f ===" && head -5 "$f" && echo; done
# Command frontmatter has description and allowed-tools
for f in commands/*.md; do echo "=== $f ===" && head -5 "$f" && echo; done
# Agent frontmatter has name, description, tools, model
for f in agents/*.md; do echo "=== $f ===" && head -10 "$f" && echo; done
# ${CLAUDE_PLUGIN_ROOT} references point to existing files
grep -roh '\${CLAUDE_PLUGIN_ROOT}/[^`"]*' skills/ commands/ | sort -u | while read ref; do
resolved="${ref/\$\{CLAUDE_PLUGIN_ROOT\}/\.}"
[ -f "$resolved" ] || echo "BROKEN: $ref"
done
# Hook scripts are executable
ls -la hooks/scripts/*.shEditing Guidelines
- Commands provide rules and awareness, not rigid step-by-step scripts — Claude Code is the intelligence layer
- Skills are lean (~2000 words max) with detailed content in
references/ - Review specialists are strictly read-only — only Read/Grep/Glob tools (craft-auditor also gets Bash)
- Orchestrators coordinate specialists via Task tool — don't add Task to specialist tool lists
- Hook prompts are carefully worded to avoid false positives on non-worldbuilding edits
- When editing propagation-related content, check both
references/propagation-awareness.mdandhooks/hooks.json
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

