04-spec — Claude Code skill: what it does, how to install
04-spec writes spec.md, the contract for a single feature, from a request, a PRD or review notes. Or rewrites a spec that already exists.
MIT ★ 571 updated 2026-10-29
/plugin marketplace add ai-driven-dev/framework
/plugin install aidd-pm@aidd-frameworkWhat 04-spec does
Two modes share one output file. build drafts a spec starting from a request or a PRD path. refine takes an existing spec plus review findings and reworks the document. Both stop at spec.md and nothing else gets generated.
The skill never opens your source tree. It records intent, not implementation, so acceptance criteria stay few and no solution gets prescribed. Open questions are flagged rather than filled in. Ask it which module breaks and you get nothing back, because it does not read the repository.
Locked specs are off limits. A validated spec counts as immutable, and refine will not touch it — check the file's status first if you expect edits to a contract the team already signed off.
What it helps with
- draft a feature contract from a short request
- turn an existing PRD into a spec without retelling the document
- rework a spec against review findings
- flag open questions instead of guessing
- keep requirements solution-agnostic
Example prompts for the agent
- Run
04-specinbuildmode ondocs/request-export.md - Refine
specs/export/spec.mdusing the review findings - Go through
specs/export/spec.mdand mark every gap, guess nothing
How to install 04-spec
1Plugin marketplace
/plugin marketplace add ai-driven-dev/framework/plugin install aidd-pm@aidd-frameworkThis installs the whole aidd-pm plugin with all its skills
2Skills CLI (Vercel)
npx skills add ai-driven-dev/framework --skill 04-spec -a claude-code3Manually: put the files in place
~/.claude/skills/04-spec/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/04-spec/
1Skills CLI (Vercel)
npx skills add ai-driven-dev/framework --skill 04-spec -a codex2Manually: put the files in place
.agents/skills/04-spec/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ai-driven-dev/framework --skill 04-spec -a cursor2Manually: put the files in place
.cursor/skills/04-spec/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ai-driven-dev/framework plugins/aidd-pm/skills/04-spec2Manually: put the files in place
.github/skills/04-spec/SKILL.md1Skills CLI (Vercel)
npx skills add ai-driven-dev/framework --skill 04-spec -a gemini-cli2Platform CLI
gemini skills install https://github.com/ai-driven-dev/framework --path plugins/aidd-pm/skills/04-specManually: put the files in place
.devin/skills/04-spec/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ai-driven-dev/framework --skill 04-spec -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about 04-spec
How do I install 04-spec in Claude Code?
Add the marketplace with /plugin marketplace add ai-driven-dev/framework, then install the plugin: /plugin install aidd-pm@aidd-framework.
What does 04-spec do?
It produces spec.md from a request or PRD in build mode, and rewrites an existing spec to address review findings in refine mode. No code is written and the repository is never explored.
Can it change a spec that is already approved?
No. Once validated, a spec is immutable, so refine only works on a version that is not locked.
Source text
SKILL.md · MIT
--- name: 04-spec description: Generate or refine a spec, a feature's immutable contract, from a request, a PRD, or review findings. Use when the user wants to draft or refine a spec. Not for writing code, a full PRD, or changing a locked spec. argument-hint: request | prd | spec --- # Spec ```mermaid flowchart LR request([request or PRD path]) --> build --> done([spec.md]) target([spec path + findings]) --> refine --> done ``` ## Actions Run the flow above. Read only the next action file. | Action | Does | | ------ | -------------------------------------------------- | | build | draft a fresh spec from a request or PRD | | refine | rewrite an existing spec to address findings | ## Transversal rules - Never invent; mark every gap instead of guessing. - Never explore the codebase. - Hold intent, never implementation: solution-agnostic, no how, few acceptance criteria. - Immutable once validated: never rewrite a locked spec.
© AI-Driven Dev · MIT · ai-driven-dev/framework