skills/council/craftsman/testing-strategy/SKILL.md
Use when designing test plans for new features or improving existing test coverage. Covers test pyramid design, coverage targets, quality gates, and test file specifications. Do not use for codebase pattern audits or convention enforcement (use pattern-analysis).
npx skillsauth add dtsong/my-claude-setup testing-strategyInstall 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.
Design comprehensive test strategies with test pyramid coverage, test file structure, and quality gates.
No user-provided values are used in commands or file paths. All inputs are treated as read-only analysis targets.
From the feature, extract:
/ E2E \ <- Few: critical user paths only (expensive, slow)
/----------\
/ Integration \ <- Some: cross-boundary, API contracts, DB queries
/----------------\
/ Unit Tests \ <- Many: fast, isolated, 80%+ of test count
/--------------------\
For each layer, specify:
| Layer | Test File | Test Cases | Mocks Needed | Priority | |-------|-----------|------------|--------------|----------| | Unit | ... | ... | ... | ... | | Integration | ... | ... | ... | ... | | E2E | ... | ... | ... | ... |
For each test case:
__tests__/, top-level tests/, or .test.ts suffix)describe('ModuleName', () => { it('should ...') }) formatCompaction resilience: If context is compacted mid-task, check the Progress Checklist for completed steps, re-read this Procedure section, and continue from the next incomplete step.
| Layer | Count | Run Time | Mock Strategy | |-------|-------|----------|---------------| | Unit | ... | ... | ... | | Integration | ... | ... | ... | | E2E | ... | ... | ... |
For each test file:
File: src/__tests__/feature.test.ts
Layer: Unit
describe('FeatureName')
it('should handle the happy path')
- Input: ...
- Expected: ...
it('should handle invalid input')
- Input: ...
- Expected: throws/returns error
it('should handle edge case')
- Input: ...
- Expected: ...
Mocks: ExternalService (return mock data)
| Category | Target | Rationale | |----------|--------|-----------| | Business logic | 90%+ | Core value, must be correct | | API handlers | 80%+ | Contract compliance | | UI components | 70%+ | Render + key interactions | | Utilities | 90%+ | Pure functions, easy to test | | Glue/config | Skip | Not worth testing |
development
Use when the council needs to surface organizational knowledge buried across multiple internal sources (wikis, design docs, ADRs, past tickets, postmortems, chat archives, code repos). Plans where to look, what to cross-reference, and how to synthesize findings into evidence the council can act on. Do not use for external market research (use competitive-analysis), library evaluation (use library-evaluation), or technology trend assessment (use technology-radar).
testing
Use to convert a Word .docx file to PDF and/or verify its page count. Triggers on: converting docx to pdf, rendering a document, checking how many pages a docx produces, or asserting a page-count constraint (e.g. a resume must stay 2 pages). Wraps LibreOffice headless conversion.
development
Security audit checklist for web applications. Use when reviewing, auditing, or hardening a web app's security posture. Covers rate limiting, auth headers, IP blocking, CORS, security middleware, input validation, file upload limits, ORM usage, and password hashing. Triggers on requests like "review security", "harden this app", "security audit", "check for vulnerabilities", or when building/reviewing API endpoints.
development
Interactive wizard to craft effective prompts using Claude Code best practices