Skip to main content
skill CX Codex

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

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add ai-driven-dev/framework
/plugin install aidd-pm@aidd-framework
Open on GitHub

What 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-spec in build mode on docs/request-export.md
  • Refine specs/export/spec.md using the review findings
  • Go through specs/export/spec.md and mark every gap, guess nothing

How to install 04-spec

1Plugin marketplace

/plugin marketplace add ai-driven-dev/framework
/plugin install aidd-pm@aidd-framework

This 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-code

3Manually: put the files in place

~/.claude/skills/04-spec/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/04-spec/

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

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set80

The whole set →
0-error-handling The 0-error-handling rule gives TypeScript failures one path: a typed exception moves outward and is handled at the command boundary. CX Codex +1 ★ 571repo stars 00-onboard 00-onboard walks a project through AIDD: reads the repo, picks the next step, shows it on screen, then acts on your reply. CX Codex +1 ★ 571repo stars 04-skill-generate 04-skill-generate generates router-based skills across AI tools through structured scoping and validation. Use it to scaffold new skills, turn manual workflows into skills, or refactor existing ones. CX Codex +1 ★ 571repo stars 03-context-generate The 03-context-generate skill routes requests to create skills, rules, agents, commands, or hooks to the matching generator. If you leave out the artifact type, it asks which one you mean. CX Codex +1 ★ 571repo stars resolve-conflict resolve-conflict resolves deterministic Git conflicts during merge, rebase, or cherry-pick. Stops right after staging modified files. CX Codex +1 ★ 571repo stars 0-deps-wiring The 0-deps-wiring rule sets where application dependencies are composed and how the graph is reused. It fits TypeScript projects with command handlers and use cases. CX Codex +1 ★ 571repo stars 01-plan 01-plan turns a request, a ticket or a file into a phased implementation plan: gather the input, read the code, hand back a plan. CX Codex +1 ★ 571repo stars 05-improve 05-improve examines conversation logs, evaluates visible token usage, and suggests targeted refinements without touching your code. CX Codex +1 ★ 571repo stars

Project sponsors

Companies that keep this analytics open