.agents/skills/test-plan/SKILL.md
Use when creating test plans from implementation and design documents. Provides test plan structure, test case tracking, and coverage guidelines.
npx skillsauth add tacogips/claude-code-agent test-planInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides guidelines for creating and managing test plans from implementation and design documents.
Apply this skill when:
Test plans bridge the gap between implementation (what was built) and verification (does it work correctly). They provide:
CRITICAL: Due to context limitations, test plans MUST use a divide-and-conquer approach.
IMPORTANT: Test plans and impl-plans do NOT need 1:1 mapping.
| Mapping | When to Use | |---------|-------------| | 1:N (one impl -> multiple test plans) | Large implementations need focused test plans | | N:1 (multiple impls -> one test plan) | Related modules can share integration tests | | 1:1 (one impl -> one test plan) | Well-bounded features with clear test scope |
Recommended granularity:
CRITICAL: Large test plan files cause Claude Code OOM errors.
| Metric | Limit | Reason | |--------|-------|--------| | Line count | MAX 400 lines | Prevents memory issues | | Test cases per plan | MAX 15 | Keeps plans focused | | Modules per plan | MAX 5 | Enables focused testing |
Split a test plan into multiple files when:
BEFORE: session-groups-tests.md (too large)
AFTER:
- session-groups-unit-tests.md (~200 lines)
- session-groups-integration-tests.md (~200 lines)
- session-groups-e2e-tests.md (~150 lines)
IMPORTANT: All test plans MUST be stored under test-plans/.
test-plans/
├── README.md # Index of all test plans
├── PROGRESS.json # Test status tracking (single source of truth)
├── <feature>-unit.md # Unit test plans
├── <feature>-integration.md # Integration test plans
└── <feature>-e2e.md # End-to-end test plans
Each test plan file MUST include:
# <Feature Name> Test Plan
**Status**: Planning | Ready | In Progress | Completed
**Implementation Reference**: impl-plans/<file>.md
**Source Files**: src/<path>/*.ts
**Test Type**: Unit | Integration | E2E
**Created**: YYYY-MM-DD
**Last Updated**: YYYY-MM-DD
## Test Environment
**Runtime**: Bun test
**Mocks Required**: List of mock implementations needed
**Fixtures**: List of test fixtures needed
**Setup/Teardown**: Special requirements
Each test case MUST have:
### TEST-001: <Test Case Name>
**Status**: Not Started | In Progress | Passing | Failing | Skipped
**Priority**: Critical | High | Medium | Low
**Parallelizable**: Yes | No
**Dependencies**: None | TEST-XXX | other-plan:TEST-XXX
**Target**: `src/path/file.ts:functionName`
**Description**:
Brief description of what this test verifies.
**Scenarios**:
1. Happy path: <expected behavior>
2. Edge case: <expected behavior>
3. Error case: <expected behavior>
**Assertions**:
- [ ] Assertion 1
- [ ] Assertion 2
**Test Code Location**: `src/path/file.test.ts`
## Test Status
| Test ID | Name | Status | Priority | Dependencies |
|---------|------|--------|----------|--------------|
| TEST-001 | Basic parsing | Not Started | High | None |
| TEST-002 | Error handling | Not Started | High | TEST-001 |
| TEST-003 | Edge cases | Not Started | Medium | TEST-001 |
## Coverage Targets
| Module | Current | Target | Status |
|--------|---------|--------|--------|
| src/sdk/queue/types.ts | 0% | 90% | Not Started |
| src/sdk/queue/manager.ts | 0% | 85% | Not Started |
## Completion Criteria
- [ ] All test cases implemented
- [ ] All tests passing
- [ ] Coverage targets met
- [ ] No flaky tests
- [ ] Documentation updated
## Progress Log
### Session: YYYY-MM-DD HH:MM
**Tests Completed**: TEST-001, TEST-002
**Tests In Progress**: TEST-003
**Blockers**: None
**Notes**: Discovered edge case requiring additional test
TEST-XXX where XXX is zero-padded (001, 002, etc.)<plan-name>:TEST-XXXSame-plan dependency:
**Dependencies**: TEST-001
**Dependencies**: TEST-001, TEST-002
Cross-plan dependency:
**Dependencies**: session-groups-unit:TEST-001
No dependencies:
**Dependencies**: None
Tests can be parallelized when:
Parallelizable: Yes - Test can run independently Parallelizable: No - Test depends on other tests or shared state
CRITICAL: After creating a test plan, update test-plans/PROGRESS.json.
{
"lastUpdated": "2026-01-09T16:00:00Z",
"summary": {
"totalPlans": 10,
"totalTests": 150,
"passing": 0,
"failing": 0,
"notStarted": 150
},
"plans": {
"feature-unit": {
"status": "Ready",
"testType": "Unit",
"implRef": "impl-plans/feature.md",
"tests": {
"TEST-001": { "status": "Not Started", "priority": "High", "parallelizable": true, "deps": [] },
"TEST-002": { "status": "Not Started", "priority": "High", "parallelizable": false, "deps": ["TEST-001"] }
}
}
}
}
| Status | Meaning |
|--------|---------|
| Not Started | Test not yet implemented |
| In Progress | Test being written |
| Passing | Test implemented and passing |
| Failing | Test implemented but failing |
| Skipped | Test intentionally skipped |
| Priority | Meaning |
|----------|---------|
| Critical | Must pass for release |
| High | Should pass for release |
| Medium | Important but not blocking |
| Low | Nice to have |
*.test.ts adjacent to sourcetest-plans/<feature>-<type>.md| Section | Required | Format | |---------|----------|--------| | Header | Yes | Markdown metadata | | Implementation Reference | Yes | Link + summary | | Test Environment | Yes | Requirements list | | Test Cases | Yes | Structured format with scenarios | | Status Table | Yes | Simple table | | Coverage Targets | Yes | Target percentages | | Completion Criteria | Yes | Checklist | | Progress Log | Yes | Session entries |
development
Use when writing, reviewing, or refactoring TypeScript code. Provides type safety patterns, error handling, project layout, and async programming guidelines.
development
Use when refactoring tests for better maintainability. Provides guidelines for removing duplicates, DRYing fixtures/assertions, restructuring test organization, renaming, and splitting oversized files.
testing
Use when creating test plans from implementation and design documents. Provides test plan structure, test case tracking, and coverage guidelines.
testing
Use this skill when creating or modifying GitHub Actions workflow files (.github/workflows/*.yml). Ensures all actions are pinned by commit SHA, permissions are minimized, script injection is prevented, and other supply chain security best practices are applied.