Agent skill
specsafe-spec
Generate detailed specification from PRD. Fleshes out requirements and scenarios.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/specsafe-spec
SKILL.md
Flesh out a detailed specification from the initial PRD (SPEC stage refinement).
When to use:
- PRD is drafted but needs detailed requirements
- Need to define acceptance criteria and scenarios
- Preparing to move to TEST stage
Input: The spec ID (e.g., SPEC-20260211-001)
Steps
-
Read the spec file
Load
specs/active/<spec-id>.mdand review:- Current Purpose and Scope sections
- Existing requirements (if any)
- Tech stack decisions
- Current stage (must be SPEC)
-
Expand requirements
For each requirement in the PRD:
- Assign unique requirement ID (e.g., FR-1, NFR-1)
- Define clear acceptance criteria in Given-When-Then format
- Specify priority (P0/P1/P2)
- Add any dependencies or constraints
-
Define scenarios
Create detailed scenarios covering:
- Happy path: Normal operation
- Edge cases: Boundary conditions
- Error cases: Invalid inputs, failures
- Integration: Interaction with other systems
Format each scenario:
## Scenario: [Name] **Given** [precondition] **When** [action] **Then** [expected result] -
Technical approach
Expand the Technical Approach section:
- Architecture decisions
- API contracts (if applicable)
- Data models
- Integration points
-
Test strategy
Define testing approach:
- Unit test coverage targets
- Integration test requirements
- E2E scenarios to cover
- Mock/stub requirements
-
Implementation plan
Create phased implementation plan:
Phase Task Est. Dependencies 1 Setup 30m None 2 Core logic 2h Phase 1 -
Update status
Mark spec as ready for TEST stage if complete:
bashspecsafe spec "<spec-id>" -
Show summary
Display:
- Requirements count by priority
- Scenarios defined
- Estimated total effort
- Next command:
/specsafe:test <id>
Output
After specification:
- ✅ Detailed requirements with acceptance criteria
- ✅ Comprehensive scenarios (happy path + edge cases)
- ✅ Technical approach documented
- ✅ Test strategy defined
- ✅ Implementation plan with estimates
- 📋 Status: SPEC (ready for TEST stage)
- 📋 Prompt: "Ready to generate tests? Run
/specsafe:test <id>"
Guardrails
- Requirements must have clear acceptance criteria
- Scenarios should cover at least: happy path, 2 edge cases, 1 error case
- Estimates should be realistic (use T-shirt sizes or hours)
- Do NOT proceed to TEST stage until requirements are complete
- Review with user if spec is large (>10 requirements) before proceeding
Example
User: /specsafe:spec SPEC-20260211-004
→ Expands PRD into detailed spec
→ Adds 8 requirements (3 P0, 3 P1, 2 P2)
→ Defines 6 scenarios
→ Status: SPEC
→ Next: /specsafe:test SPEC-20260211-004
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?