Agent skill

spec-driven-development

Use when starting any component or feature. Runs the full spec-driven development cycle: specify → plan → interface → test → implement → update docs.

Stars 1
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/yoooonghyun/agent-skills/tree/main/.claude/skills/spec-driven-development

SKILL.md

You are beginning a spec-driven development cycle for the requested feature or component. Follow each step in order. Do not proceed to the next step without completing the current one.

Prerequisites — Template Files

Before starting, check that the following template files exist in the skill directory (.claude/skills/sdd/):

  • spec_template.md
  • plan_template.md

If either file is missing, download it from:

https://raw.githubusercontent.com/yoooonghyun/agent-skills/main/.claude/skills/sdd/<filename>

Use the WebFetch tool to retrieve the raw content and write it to the correct path before proceeding.

Step 1 — Specify

Understand the requested feature or component from the user's description and any relevant existing code or docs. If the request leaves a required behavior genuinely ambiguous — something that cannot be inferred from context — ask for clarification before writing the spec. Do not ask about things that can be determined by reading the codebase.

Create a versioned specification document at:

.sdd/specs/<feature>-v<N>.md

Increment N if a spec for this feature already exists. Use ./spec_template.md as the base.

Fill in all sections: user scenarios with acceptance criteria, functional requirements, edge cases, and success criteria. Base the spec on the user's request; do not add behavior the user did not ask for.

Do not proceed if any required behavior is still unresolved. State the blocker and stop.

Step 2 — Plan

Based on the spec document from Step 1, create a versioned implementation plan at:

.sdd/plans/<feature>-v<N>.md

Use the same version number as the corresponding spec document. Use ./plan_template.md as the base.

Fill in the summary, technical context, and implementation checklist. The checklist is the living record of progress — update it during every subsequent step. Present the plan and get confirmation before moving to the next step.

Step 3 — Interface

Define public contracts (types, interfaces, function signatures, API schemas, etc.) based on the spec document. Use the conventions of the project's language and ecosystem. Rules:

  • Every field or parameter must trace back to a requirement in the spec document
  • Do not add properties or behaviors not present in the spec
  • Use the appropriate type constructs for the language (e.g., union types, enums, ADTs, schemas)

Step 4 — Create Testing

Write tests against the interface before writing any implementation. Tests must cover:

  • A spec-compliant happy path
  • Missing optional fields (must not error)
  • An invalid or missing required field (must log a warning and return a safe fallback)

Do not write implementation code in this step.

Step 5 — Implement

Write the implementation to pass the tests. Rules:

  • Any behavior not covered by the spec must not be added
  • Reuse shared utilities instead of inlining logic in components
  • If a required behavior cannot be expressed by the spec, stop and raise it as a spec-level change

Step 6 — Update Docs

After implementation is complete:

  • Update the versioned plan document with any deviations made during implementation
  • If .sdd/design.md does not exist, create it by analyzing the current project structure, architecture, key design decisions, and conventions. It should serve as a high-level design reference for the project.
  • If new patterns or decisions were introduced, reflect them in .sdd/design.md

Expand your agent's capabilities with these related and highly-rated skills.

mattpocock/skills

migrate-to-shoehorn

Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.

111,310 9,758
Explore
mattpocock/skills

git-guardrails-claude-code

Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.

111,310 9,758
Explore
mattpocock/skills

obsidian-vault

Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.

111,310 9,758
Explore
mattpocock/skills

scaffold-exercises

Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.

111,310 9,758
Explore
mattpocock/skills

setup-pre-commit

Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.

111,310 9,758
Explore
mattpocock/skills

edit-article

Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.

111,310 9,758
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results