/draft:testing-strategyfrom draft
Designs test strategies and test plans with coverage targets. Analyzes codebase, discovers existing tests, and tailors testing pyramid to architecture.
Ships in draft. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are designing a testing strategy and test plan for this project or track.
A good testing strategy matches the architecture. Not every project needs the same pyramid.
Before starting, capture the current git state:
git branch --show-current # Current branch name
git rev-parse --short HEAD # Current commit hash
Store this for the report header. The strategy is scoped to this specific branch/commit.
ls draft/ 2>/dev/null
If draft/ doesn't exist, this skill can still run standalone with reduced context.
Read and follow the base procedure in core/shared/draft-context-loading.md.
/draft:testing-strategy — Project-wide strategy (default if no active track)/draft:testing-strategy track <id> — Track-scoped strategy/draft:testing-strategy module <name> — Module-scoped strategyIdentify component types:
Discover existing tests:
find . -name "*test*" -o -name "*spec*" | head -50
Identify: test frameworks, test directories, existing coverage config, test runners.
Assess current coverage: Check for existing coverage reports or configuration:
ls coverage/ .nyc_output/ htmlcov/ .coverage 2>/dev/null
Read project context:
draft/tech-stack.md — Test frameworks, testing conventionsdraft/workflow.md — TDD preferences (strict/flexible/none)draft/.ai-context.md — INVARIANTS section (critical paths), module boundaries, concurrency modeldraft/guardrails.md — Anti-patterns that need test coveragedraft/product.md — Critical user flows that demand E2E testsTailor to the project architecture:
┌─────────┐
│ E2E │ Few, critical paths only
├─────────┤
│ Integr. │ Service boundaries, DB, APIs
├─────────┤
│ Unit │ Business logic, utilities
└─────────┘
Adjust the pyramid shape per architecture. A microservices backend may need a wider integration band. A UI-heavy app may need more E2E. A library may be almost entirely unit tests.
| Component Type | Unit | Integration | E2E | Focus |
|---|---|---|---|---|
| API endpoints | Input validation, handlers | DB queries, auth | Critical flows | Contract testing |
| Data pipelines | Transform logic | Source/sink connections | Full pipeline | Data integrity |
| Frontend | Component rendering, hooks | API integration | User journeys | Visual regression |
| Infrastructure | Config validation | Resource provisioning | Deployment | Drift detection |
| Libraries | Public API surface | Cross-module | Consumer scenarios | Backward compat |
| CLI tools | Argument parsing, logic | File I/O, system calls | Full workflows | Exit codes, output |
Set realistic targets based on component criticality:
Coverage alone is insufficient. Include guidance on:
Compare current state to targets:
Present as a gap matrix:
| Module | Current Tests | Target | Gap | Risk | Priority |
|---|---|---|---|---|---|
| ... | ... | ... | ... | ... | ... |
Priority test cases to write, ordered by impact:
For each priority test, specify:
MANDATORY: Include YAML frontmatter with git metadata. Follow core/shared/git-report-metadata.md.
Include the report header table immediately after frontmatter:
| Field | Value |
|-------|-------|
| **Branch** | `{LOCAL_BRANCH}` → `{REMOTE/BRANCH}` |
| **Commit** | `{SHORT_SHA}` — {COMMIT_MESSAGE} |
| **Generated** | {ISO_TIMESTAMP} |
| **Synced To** | `{FULL_SHA}` |
Save to:
draft/testing-strategy.mddraft/tracks/<id>/testing-strategy.md/draft:implement (before TDD cycle)/draft:decompose (after module definition), /draft:init (after setup)/draft:coverage (measurement against targets set here)/draft:bughunt findings as regression test candidatesIf no test infrastructure found: Recommend test framework based on tech-stack.md, include setup steps needed before tests can be written
If no draft context: Generate generic strategy, suggest running /draft:init for better results
If conflicting test patterns found: Document both patterns, recommend consolidation as a tech-debt item
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub drafthq/draft --plugin draft33 skills in this plugin
/adrCreate and manage Architecture Decision Records. Documents significant technical decisions with context, alternatives, and consequences. Also supports evaluate (assess proposals) and design (system design) modes./assist-reviewReviewing someone else's PR for handoff/sign-off. Isolates structural changes from trivial edits, flags HLD/LLD drift and guardrail violations, points the reviewer at what to scrutinize. Use when prepping to review another engineer's work — NOT for first-pass self-review (use review / quick-review)./bughuntPerforms an exhaustive 14-dimension bug hunt across the codebase using Draft context (architecture, tech-stack, product) for false-positive elimination. Generates a severity-ranked report with code evidence, data flow traces, and suggested fixes. Optionally writes regression tests. Use when the user asks to find bugs, audit code for defects, scan for vulnerabilities, or says 'hunt bugs', 'find bugs', or 'code audit'.Other plugins' skills for the same job