一键导入
test-plan
Use when creating test plans from implementation and design documents. Provides test plan structure, test case tracking, and coverage guidelines.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when creating test plans from implementation and design documents. Provides test plan structure, test case tracking, and coverage guidelines.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Execute QraftBox release operations end-to-end using Taskfile tasks, including GitHub Release and npm publish. Use when users ask to release, publish a version, or run post-merge release operations.
Use when writing TypeScript code that interacts with dependencies, handles credentials, executes child processes, or manages configuration. Provides Shai-Hulud supply chain attack countermeasures at the code level including safe dependency usage, credential handling, subprocess hardening, and runtime integrity patterns.
Use when installing, updating, or auditing npm dependencies with Bun. Provides Shai-Hulud supply chain attack countermeasures including bunfig.toml hardening, lockfile verification, trustedDependencies management, and CI/CD pipeline security.
Use when creating, publishing, or maintaining npm packages with Bun. Provides Shai-Hulud supply chain attack countermeasures including npm token management, 2FA enforcement, provenance signing, trusted publishing via GitHub Actions, and pre-publish security checklists.
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
Use when creating or organizing design documents. Provides directory structure, file naming, and content guidelines for design specs and references.
| name | test-plan |
| description | Use when creating test plans from implementation and design documents. Provides test plan structure, test case tracking, and coverage guidelines. |
| allowed-tools | Read, Write, Glob, Grep |
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 |