with one click
specify
// Use when generating or updating project specification documents in `spec/` from source code. Triggers on `/specify` or when spec docs need to reflect codebase changes.
// Use when generating or updating project specification documents in `spec/` from source code. Triggers on `/specify` or when spec docs need to reflect codebase changes.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | specify |
| description | Use when generating or updating project specification documents in `spec/` from source code. Triggers on `/specify` or when spec docs need to reflect codebase changes. |
Generate or incrementally update project specification documents from the codebase into spec/.
digraph specify_flow {
"spec/ exists with docs?" [shape=diamond];
"Full specify" [shape=box];
"Check git diff (last 3 commits)" [shape=box];
"Meaningful changes?" [shape=diamond];
"Delta update spec/" [shape=box];
"Report: no changes" [shape=box];
"Check staleness" [shape=diamond];
"Ask user: refactor entire spec?" [shape=box];
"Done" [shape=doublecircle];
"spec/ exists with docs?" -> "Full specify" [label="no or empty"];
"spec/ exists with docs?" -> "Check git diff (last 3 commits)" [label="yes"];
"Full specify" -> "Check staleness";
"Check git diff (last 3 commits)" -> "Meaningful changes?";
"Meaningful changes?" -> "Delta update spec/" [label="yes"];
"Meaningful changes?" -> "Report: no changes" [label="no"];
"Delta update spec/" -> "Check staleness";
"Report: no changes" -> "Check staleness";
"Check staleness" -> "Ask user: refactor entire spec?" [label="most docs stale"];
"Check staleness" -> "Done" [label="fresh enough"];
"Ask user: refactor entire spec?" -> "Full specify" [label="yes"];
"Ask user: refactor entire spec?" -> "Done" [label="no"];
}
AI-reimplementable fidelity. Every spec must be detailed enough that another AI agent, given only the spec folder, can re-implement the entire project from scratch without reading the original source code.
Output directory is spec. All generated documents live under spec/ — not docs/, not specs/, not any other name.
Delta-only when possible. If spec/ already contains detailed documentation, do NOT regenerate from scratch. Use git diff to detect changes and update only affected documents.
Preserve manual edits. When updating an existing spec file, preserve manually written sections. Only update content that corresponds to changed source code.
This skill depends on the everything-claude-code plugin:
/plugin marketplace add https://github.com/affaan-m/everything-claude-code
/plugin install everything-claude-code@everything-claude-code
.py, .html, .js, .ts, .tsx, .jsx, .java, .sh, .go, .rs, .php, .rb, .cs, .kt, .swift, .sql, .yaml, .yml.everything-claude-code:plan to draft a plan before your actions.Run when spec/ does not exist or is empty.
Inventory the codebase
Map architecture and behavior
Generate spec/ set (small, focused files)
spec/README.md — navigation index for all generated specs.spec/architecture.md — system structure, boundaries, and flow.spec/modules.md — module catalog with purpose and ownership by path.spec/runtime.md — setup, scripts, execution model, env/config.spec/data-model.md — storage schemas, entities, and relationships.spec/integrations.md — third-party APIs/services and interaction contracts.spec/operations.md — deploy/runbook, health checks, failure/rollback paths.spec/implementation-guide.md — end-to-end rebuild blueprint.spec/modules/<path-safe-module-name>.md — one file per significant module or tightly related module group.Per-module documentation requirements For each documented module, include:
Coverage validation
spec/modules.md mapping every discovered source module to a documentation target.Staleness and provenance
Final summary
spec.Run when spec/ exists with detailed documentation.
Detect Changes (git diff, last 3 commits)
git diff HEAD~3..HEAD --name-status
.md, .gitignore, lock files, config files that don't affect behavior).git diff HEAD --name-status.If no meaningful source changes are found, report this and stop.
Map Changes to Spec Files
For each changed source file:
spec/modules/ (follows <path-safe-module-name>.md naming).architecture.md, data-model.md, integrations.md, etc.).Read and Analyze Affected Specs
For each spec file that needs updating:
Update Specs (delta only)
Apply targeted updates:
spec/modules/*.md.spec/modules/<module-name>.md following per-module documentation requirements.architecture.md, data-model.md, integrations.md, or operations.md if affected.spec/modules.md if modules were added or removed.spec/README.md if new spec files were added or removed.Final Summary
Report:
After completing either mode, compare spec freshness against the project:
Get the newest modification time among spec files: find spec -name '*.md' -exec stat -f '%m' {} \; | sort -rn | head -1
Get the newest modification time among source files (exclude spec/, node_modules/, .git/): find . -name '*.ts' -o -name '*.py' -o -name '*.go' ... | xargs stat -f '%m' | sort -rn | head -1
If most spec documents are significantly older than the newest source files (e.g., >7 days gap), ask the user:
Most spec documents haven't been updated in a while compared to recent source changes. Would you like me to refactor the entire spec from scratch?
The specification must provide enough architectural, interface, and behavioral detail for full-project reconstruction without reading the original code — whether generated fresh or updated incrementally.