spec
The spec command initiates specification-driven development by gathering requirements through targeted clarification questions about project objectives, features, technical constraints, and boundaries. It then generates a comprehensive SPEC.md document covering objective, commands, project structure, code style, testing strategy, and operational boundaries. Use this when starting new projects to establish clear requirements and development guidelines before implementation begins.
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/addyosmani/agent-skills/HEAD/.claude/commands/spec.md -o ~/.claude/commands/spec.mdspec.md
Invoke the agent-skills:spec-driven-development skill. Begin by understanding what the user wants to build. Ask clarifying questions about: 1. The objective and target users 2. Core features and acceptance criteria 3. Tech stack preferences and constraints 4. Known boundaries (what to always do, ask first about, and never do) Then generate a structured spec covering all six core areas: objective, commands, project structure, code style, testing strategy, and boundaries. If the request bundles several independently testable capabilities, first propose a capability map (module ids, dependency direction, build order) per the skill's Phase 0 and get it approved, then spec each module in dependency order. Save the spec as SPEC.md in the project root and confirm with the user before proceeding.
Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.
Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.
Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.
Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.
Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch.
Senior code reviewer that evaluates changes across five dimensions — correctness, readability, architecture, security, and performance. Use for thorough code review before merge.
Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.
Simplify code for clarity and maintainability — reduce complexity without changing behavior