Agent skill
test-spec
Generate test specifications from PBIs and acceptance criteria. Use when creating test specs, defining test strategy, or planning QA coverage. Triggers on keywords like "test spec", "test specification", "qa spec", "test strategy", "what to test".
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/test-spec
SKILL.md
Test Specification
Generate comprehensive test specifications from requirements.
When to Use
- PBI ready for QA planning
- Need test coverage strategy
- Defining test scope
Pre-Workflow
Activate Skills
- Activate
qa-engineerskill for test specification best practices
Quick Reference
Workflow
- Read PBI file and user stories
- Extract acceptance criteria and identify test scope
- Define test strategy (unit / integration / E2E)
- Identify test scenarios (positive/negative/boundary/edge)
- Find code evidence (see below)
- Create test spec artifact using template
- Save to
team-artifacts/test-specs/ - Suggest next:
/test-cases {testspec}
Test Categories
| Category | Purpose |
|---|---|
| Positive | Happy path verification |
| Negative | Error handling, invalid inputs |
| Boundary | Edge values, limits |
| Integration | Component interaction |
| Security | Auth, injection, XSS |
Output
- Path:
team-artifacts/test-specs/{YYMMDD}-testspec-{feature}.md - ID Pattern:
TC-{MOD}-{NNN}(module-based, not date-based)- Rationale: Test cases are tied to modules/services, enabling easier filtering and traceability
Spec Structure
- Overview
- Test Scope
- Test Categories
- Test Scenarios (high-level)
- Coverage Requirements
- Test Data Needs
Find Code Evidence
Before writing test scenarios, search the codebase for supporting evidence:
- Search for validation logic - find validators, constraints, rules
- Find error messages - locate user-facing error strings
- Locate entity constraints - property attributes, DB constraints
- Map evidence to files - reference as
{file}:{line}in each test case
This step grounds test scenarios in actual implementation and prevents speculative tests.
Module Code Mapping
| Service | Code |
|---|---|
| TextSnippet | TXT |
| ExampleApp | EXP |
| Accounts | ACC |
| Common | COM |
Related
- Role Skill:
qa-engineer - Command:
/test-spec - Input:
/storyoutput - Next Step:
/test-cases
Example
/test-spec team-artifacts/pbis/260119-pbi-dark-mode-toggle.md
Creates: team-artifacts/test-specs/260119-testspec-dark-mode-toggle.md
IMPORTANT Task Planning Notes
- Always plan and break many small todo tasks
- Always add a final review todo task to review the works done at the end to find any fix or enhancement needed
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?