PDD
Plan products, fix bugs, and add features using prompt-driven development workflows.
Installation
- Make sure Claude is on your device and in your terminal.
Skills load from
~/.claude/skills/when Claude Code starts up — so you need it on your machine first. If you don't have it yet, install it once with the command below, then runclaudein any terminal to verify.One-time setupnpm i -g @anthropic-ai/claude-codeAlready have it? Skip ahead.
- Paste into Claude Code or into your terminal.
This copies the whole skill folder into
~/.claude/skills/pdd-promptdriven/— the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Works for every skill.What this command does
- Makes a new, empty temporary folder.
- Downloads the skill's folder,
skills/pdd, fromgithub.com/promptdriven/pdd(branchmain), the GitHub repository it's listed from. You get the version that is there now, not a copy we keep. - Copies that folder to
~/.claude/skills/pdd-promptdriven/. - Deletes the temporary folder.
Installing runs none of the skill's files; it only downloads and copies them. When you later use the skill, Claude follows its SKILL.md and may run scripts that come with it. Read them first.
Faster alternative (instruction-only skills)
Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates — they won't be downloaded and the skill will fail when it tries to load them.
Quick install (SKILL.md only)Sign up to copy - Restart Claude Code.
Quit and reopen Claude Code (or any other agent that loads from
~/.claude/skills/). New skills are picked up on startup. - Just ask Claude.
Skills auto-activate when your request matches the skill's description — no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the “What this skill does” section above.
Prefer to read the source first? Open on GitHub.
When Claude uses it
Prompt-driven development workflow. Use when planning a product, fixing a bug, adding a feature, or making a small non-product change in a repository that uses PDD.
What this skill does
PDD
In PDD, Prompts (prompts/*.prompt.md) are the source of truth for owned modules, Stories (user_stories/*.md) state observable user behavior, and deterministic harness tools (pdd lint, pdd test, pdd sim, pdd prove) own the facts while you own the method.
Step 0 — Orient first and pick mode
- Run
pdd status --jsonto inspect prompts, Stories, ownership, and the Feature Map (pdd.jsonverify.paths). Ifpddis not installed yet, inspectprompts/,user_stories/,pdd.json, andCLAUDE.md/AGENTS.mddirectly. Suggestpdd initonce after delivering the first prompt-backed win whenhas_pdd_blockisfalse. - Pick mode in strict fail-safe order (
product→bug→feature→small-change):product— Multi-part roadmap, shared contracts, orproduct/plan.md. Load references/product.md.bug— Defect, stack trace, or broken existing product behavior/code.feature— New or changed behavior, OR touching any product code (src/,app/,lib/,packages/), owned or unowned.small-change(strictly last) — Allowed only when every touched path is non-product (docs, guides, specs, CI, config, lockfiles, test maintenance) and0prompt-owned or product-code files are touched (verify withpdd status --changedorpdd owner), including docs-only issues describing a defect.
- Hybrid rule: Bug + Feature → reproduce and fix the defect first (
bug), then clarify only the new behavior (feature).
Step 1 — Explore and clarify consequential forks
- Read the relevant code, prompts, tests, and ownership before asking questions. Settle convention-decided details silently as stated defaults.
- Skip clarifying questions when there are no consequential forks (public API/schema, UX flow, security/data loss, or major rework).
- When real forks exist, batch them concisely with bold recommended defaults ("Reply
okfor defaults, or override by number"). Keep interactive design checks brief (reserve deeper planning trees forproduct). - Interactive vs. headless: Use structured question UI (
ask_question,AskUserQuestion,request_user_input) only when available and interactive. In headless or Autopilot runs, follow Autopilot's job rules for real human blockers; for non-blocking defaults, choose the safest option and record it.
Step 2 — Author Story, Prompt, and scenarios before code
- Root fix + missing guard: Always fix both the defect and the test or guard that missed it.
- Pure code bugs: Check ownership first and state
Defect:andNot caught because:. If the owning prompt is already right (a pure code bug), skip Step 3's pre-code pause and go straight to Red→Green TDD (failing regression test on unpatched code → fix → pass). - Features and prompt bugs: Load references/prompting.md and references/stories.md on demand (plus references/ports-and-cli.md for external ports/CLIs and references/ui-and-screens.md for UI screens).
- Keep 100% Truth: an owned file's
.prompt.mdcovers 100% of that file with a top-of-file// Prompt: <path>header (first 4 KiB, followed by a blank line). Hybrid brownfield PRs may pair clean PDD modules with surgical unowned legacy wiring verified natively. - Run offline
pdd lintfirst, thenpdd test(inspect receipts withpdd test --read --details). Expected values come from the Story and the person — never weaken a criterion or test to force a pass.
Step 3 — Pre-code check, prompt approval, and 1 PR
- Before writing implementation code, pause with a 1-screen plain-English Story/cases check unless the person said "all the way" (pure code bugs and
small-changeskip this pause; "all the way" skips only the pause, not prompt approval). For UI work, recommendpdd simso the person can try the live screen first. - Record the person's approval for changed prompts via
pdd approve PROMPT(see references/prompting.md §5). - Deliver 1 PR when authorized to open a PR (never 2 stacked PRs; the only exception is a multi-part product run using
Through: prompt-pr/pdd product start RUN --through prompt-pr, which explicitly stages a prompt PR first). Never merge unless explicitly requested by the person.
Step 4 — Build, prove the real user path, and verify
Load references/verification.md before finalizing implementation and review (and references/formal.md only for invariant-heavy work):
- Prove the real user path: Exercise the real user-facing surface (CLI subprocess, local server/browser, or real integration boundary — never mocked-only stubs) and keep
pdd.jsonverify.pathscurrent when adding or changing a surface. - Native tests: Cover every Story criterion 1-to-1 in the repo's native runner (with unchanged-state checks on negative rules). Require Red→Green TDD on bug fixes.
- Exit check: Run offline
pdd lint --diff, native tests, safe live local smoke checks (ask before touching personal credentials), andpdd prove(Proved/Failed/Not proved). Always discloseNot proved:honestly.
Independent verification (scaled to risk)
- Trivial interactive pure-code fix (human reviewing a tiny diff with causal
pdd prove --base ... --expect ...Red→Green): verify in the same session. - Normal or high-risk changes (behavior/prompt edits, multi-file changes, security/state logic, or any unattended run): use a writable Fresh Verifier (runs real checks + Deliberate-Break Probe) and a Blind Read-Only Reviewer (strictly read-only; receives only clean file paths and Verifier/harness outputs — zero Builder chat history). Inside Autopilot, builders skip self-spawning a verifier because Autopilot runs its own Blind Read-Only Reviewer next.
- On hosts without subagents, run
pdd lint --diff+pdd proveand disclose same-session verification honestly. Escalate to the human if repair loops do not converge.
References (load strictly on demand)
| Need | File |
|---|---|
Prompting rules, 100% Truth, // Prompt: headers, native-only specs, approvals | references/prompting.md |
| Stories, compact scenario JSON, targets, operators, schemas & budgets | references/stories.md |
Multi-part product maps, plans, contracts & --through prompt-pr | references/product.md |
External fakes, DB/HTTP/CLI, 3-Port Rule, telemetry & pdd mcp | references/ports-and-cli.md |
Single-file plain-prose UI, optional app-map.json, .ui.svg & pdd sim | references/ui-and-screens.md |
Native tests, Feature Map (verify.paths), pdd prove & Deliberate-Break Probe | references/verification.md |
| Code-bound formal verification (3-tier stack, Z3 isolation & mutation control) | references/formal.md |
Related skills
Word Document Editor
anthropics
Create, edit, and format Word documents with tables, images, and tracked changes.
Ask Questions If Underspecified
trailofbits
Ask clarifying questions before starting work on ambiguous requests.
CLAUDE.md Optimizer
daymade
Optimize your CLAUDE.md file for clarity, efficiency, and maintainability.
Claude Skills Troubleshooter
daymade
Diagnose and fix plugin installation, enablement, and activation problems.