/scaffolding:testing-strategyfrom scaffolding
Guides test strategy with test pyramid, coverage targets, and TDD enforcement. Useful when planning tests, writing test code, or reviewing coverage.
Ships in scaffolding. 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.
Comprehensive testing guidelines including test pyramid, coverage targets, and test patterns.
For new behavior and bug fixes, the failing test comes first. No production code without a test that demanded it.
| Step | Do | Gate |
|---|---|---|
| 1. Red | Write one small test for the next behavior; run it | It fails for the expected reason (not a typo/import error) |
| 2. Green | Write the least code that passes | All tests pass; no extra behavior |
| 3. Refactor | Clean names, duplication, structure | Tests stay green; no new behavior |
Rules:
systematic-debugging for root-causing).Evidence of compliance in a report: the failing test output, then the passing
output. Proving the final result is verification-before-completion's job.
/\
/ \ E2E Tests (10%)
/----\ - Critical user flows
/ \ - Slow, expensive
/--------\ Integration Tests (20%)
/ \ - API tests, DB tests
/------------\ - Medium speed
/ \ Unit Tests (70%)
/----------------\ - Fast, isolated
- Business logic
| Type | Percentage | Focus |
|---|---|---|
| Unit | 70% | Business logic, utilities |
| Integration | 20% | API, database, services |
| E2E | 10% | Critical user journeys |
| Metric | Minimum | Target |
|---|---|---|
| Line coverage | 70% | 80% |
| Branch coverage | 60% | 70% |
| Critical paths | 90% | 100% |
Arrange - Set up test data and mocks
Act - Execute the method under test
Assert - Verify the expected outcome
{Method}_{Scenario}_{ExpectedResult}
CreateUser_ValidData_ReturnsUserId
CreateUser_DuplicateEmail_ThrowsConflict
CalculateTotal_EmptyCart_ReturnsZero
| Category | Purpose | Example |
|---|---|---|
| Happy path | Normal operation | Valid user creation |
| Edge case | Boundary conditions | Empty input, max length |
| Error case | Failure scenarios | Invalid data, not found |
| Strategy | Use Case |
|---|---|
| Fixtures | Static test data |
| Factories | Dynamic test data |
| Builders | Complex objects |
| Seeders | Database state |
| Type | Purpose |
|---|---|
| Stub | Return canned responses |
| Mock | Verify interactions |
| Spy | Record calls, pass through |
| Fake | Simplified implementation |
tests/
├── unit/
│ ├── services/
│ └── utils/
├── integration/
│ ├── api/
│ └── db/
├── e2e/
├── fixtures/
└── conftest.py / setup.ts
{module}_test.py or {module}.test.ts| Gate | Requirement |
|---|---|
| Unit tests | 100% pass |
| Coverage | > 70% |
| Integration | 100% pass |
| E2E (critical) | 100% pass |
| Type | Purpose |
|---|---|
| Load | Expected traffic |
| Stress | Breaking point |
| Soak | Memory leaks |
| Spike | Sudden traffic |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub komluk/scaffolding --plugin scaffolding39 skills in this plugin
/agent-commsSendMessage recipient validation and worktreePath safety (CWE-59). TRIGGER when: validating a SendMessage `to:` recipient against the agent whitelist, or a worktreePath from another agent before acting on it. SKIP: routing topology (agent Comms Protocol); git ops (use git-operations); worktree recovery (use worktree-management)./agent-memoryRepo-local file memory under .scaffolding/ (shared/agent/conversation tiers). TRIGGER when: reading or writing .scaffolding/ memory files, or choosing which file tier an insight belongs in. SKIP: vector memory / MCP search and store (use semantic-memory-mcp); distilling conversations (use distill)./api-designRESTful API design standards: resource naming, HTTP methods, status codes, pagination, versioning. TRIGGER when: designing new API endpoints, defining error response shapes, or adding pagination/filtering. SKIP: implementing FastAPI route code (use python-patterns); error-handling internals (use error-handling).Other plugins' skills for the same job