testing-strategy
Skill0 starsChanged 6 months agoApache-2.0View on GitHub
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).
37 other projects use a version of this.
Adopted by
Most recently taken up by
- HMBSbige/skillstheir own version, first seen Oct 3, 2026
- vospr/context-engineering-templatetheir own version, first seen Oct 1, 2026
- lgzarturo/codeconductortheir own version, first seen Sep 30, 2026
- Cure-Consulting-Group/ProductEngineeringSkillstheir own version, first seen Sep 28, 2026
- komluk/scaffoldingtheir own version, first seen Sep 28, 2026
- Ygohel18/skillstheir own version, first seen Sep 27, 2026
Used with
Projects with it also use react-patterns, observability and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
benshapyroSkillreact-patterns
Modern React patterns for TypeScript applications including hooks, state management, and component composition. Use when building React components, managing state, or implementing React best practices.
Also in 4 projects that use this
OpenAISkillobservability
Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.
Also in 5 projects that use this
Microsoft AzureSkillgit-workflow
Squad branching model: dev-first workflow with insiders preview channel
Also in 6 projects that use this
MicrosoftSkillerror-handling
统一错误处理系统。在添加 API 端点、修改错误处理、添加前端 API 调用、编写错误相关测试时使用。
Also in 3 projects that use this
CloudAI-XSkilldatabase-design
Designs database schemas, indexing strategies, query optimization, and migration patterns for SQL and NoSQL databases. Use when designing tables, optimizing queries, fixing N+1 problems, planning migrations, or when asked about database performance, normalization, ORMs, or data modeling.
Also in 3 projects that use this
OpenAISkillverification-before-completion
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
Also in 6 projects that use this
- +4 more from openai
Other versions37 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 37
- anthropics/knowledge-work-plugins★ 26ksame name
- irahardianto/awesome-agv★ 157same name
- AnastasiyaW/codex-claude-code-config★ 153same name
- zakariaf/Flutter-Skills★ 52same name
- shinpr/agentic-code★ 49same name
- addxai/enterprise-harness-engineering★ 44same name
- drafthq/draft★ 40same name
- Hack23/European-Parliament-MCP-Server★ 28same name
- suhailkakar/the-skills★ 26same name
- komluk/scaffolding★ 15same name
27 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository65 other files it gives its agents.
- a11y-auditSkill
- i18n-reviewSkill
- interaction-designSkill
- journey-mappingSkill
- ml-workflowSkill
- pipeline-designSkill
- schema-evaluationSkill
- api-designSkill
- codebase-contextSkill
- distributed-patternsSkill
- schema-designSkill
- design-system-architectureSkill
- motion-designSkill
- visual-auditSkill
- adr-templateSkill
- changelog-designSkill
- documentation-planSkill
- crypto-reviewSkill
- pqc-readinessSkill
- protocol-analysisSkill
- e2e-testingSkill
- pattern-analysisSkill
- finance-close-checklistSkill
- finance-controls-auditSkill
- finance-journal-entriesSkill
- finance-reconciliationSkill
- finance-tax-researchSkill
- finance-variance-analysisSkill
- audit-trail-designSkill
- compliance-reviewSkill
- data-classificationSkill
- growth-engineeringSkill
- messaging-strategySkill
- monetization-designSkill
- cost-analysisSkill
- deployment-planSkill
- finops-analysisSkill
- observability-designSkill
- ai-evaluationSkill
- prompt-engineeringSkill
- rag-architectureSkill
- device-integrationSkill
- navigation-designSkill
- platform-auditSkill
- formal-specSkill
- invariant-analysisSkill
- competitive-analysisSkill
- enterprise-search-strategySkill
- library-evaluationSkill
- technology-radarSkill
- embedded-architectureSkill
- fleet-managementSkill
- protocol-designSkill
- edge-case-enumerationSkill
- failure-mode-analysisSkill
- threat-modelSkill
- analytics-designSkill
- impact-estimationSkill
- mvp-scopingSkill
- caching-strategySkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 33 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
Does not cover codebase pattern auditing or convention enforcement — hand off to pattern-analysis.
- Distinctive: line 29
Does not cover architectural decisions about system boundaries — hand off to architect department.
- Distinctive: line 41
No user-provided values are used in commands or file paths.
- Distinctive: line 56
Test framework (Jest, Vitest, Playwright, Cypress, etc.)
- Distinctive: line 57
Test runner and configuration
- Very specific: line 99
Location: Follow existing convention (co-located __tests__/, top-level tests/, or .test.ts suffix)
- Distinctive: line 133
If pattern inconsistencies are discovered in test file structure or naming conventions, hand off to pattern-analysis for a full codebase …
- Distinctive: line 134
If test boundaries reveal unclear architectural boundaries or service decomposition issues, hand off to architect department for structural …
“Common” is measured: kept by at least 6 in 10 of the 33 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Testing Strategy
Purpose
Design comprehensive test strategies with test pyramid coverage, test file structure, and quality gates.
Scope Constraints
- Covers test plan design, pyramid layering, coverage targets, and CI quality gates.
- Does not cover codebase pattern auditing or convention enforcement — hand off to pattern-analysis.
- Does not cover architectural decisions about system boundaries — hand off to architect department.
Inputs
- Feature description and scope
- Existing test infrastructure (framework, runner, coverage tools)
- CI/CD pipeline details (if relevant)
- Existing test conventions in the codebase
- Coverage targets or requirements (if any)
Input Sanitization
No user-provided values are used in commands or file paths. All inputs are treated as read-only analysis targets.
Procedure
Progress Checklist
- Step 1: Audit existing test infrastructure
- Step 2: Identify testable units
- Step 3: Design test pyramid
- Step 4: Write test specifications
- Step 5: Define coverage targets
- Step 6: Plan quality gates
Step 1: Audit Existing Test Infrastructure
- Test framework (Jest, Vitest, Playwright, Cypress, etc.)
- Test runner and configuration
- Coverage tools (Istanbul, c8, etc.)
- CI integration (GitHub Actions, etc.)
- Existing test patterns (file location, naming, describe/it structure)
- Existing mocking patterns (jest.mock, vi.mock, MSW, etc.)
Step 2: Identify Testable Units
From the feature, extract:
- Pure functions and utilities — deterministic, no side effects, easiest to test
- Data transformations — input/output mapping, validation logic
- API handlers/endpoints — request/response contracts, error handling
- UI components — render output, interaction behavior, state changes
- Integration points — database queries, external API calls, file I/O
- Business logic — rules, calculations, conditional flows
Step 3: Design the Test Pyramid
/ 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
/--------------------\- Unit tests (base): Fast, isolated, test one thing. Target 80%+ of total test count.
- Integration tests (middle): Cross-boundary tests. Database interactions, API contracts, service-to-service.
- E2E tests (top): Critical user paths only. Expensive to write and maintain, keep count low.
Step 4: Write Test Specifications
For each layer, specify:
| Layer | Test File | Test Cases | Mocks Needed | Priority |
| Unit | ... | ... | ... | ... |
| Integration | ... | ... | ... | ... |
| E2E | ... | ... | ... | ... |
For each test case:
- Location: Follow existing convention (co-located
__tests__/, top-leveltests/, or.test.tssuffix) - Description:
describe('ModuleName', () => { it('should ...') })format - Key assertions: What exactly are we verifying?
- Mock strategy: What to mock (external deps), what to keep real (internal logic)
- Edge cases: Boundary values, empty inputs, error conditions
Step 5: Define Coverage Targets
- Line coverage: Pragmatic target (70-90%, not 100%)
- Branch coverage: Focus on critical paths and business logic branches
- Not worth testing: Glue code, framework boilerplate, simple pass-through, type-only files
- Must test: Business rules, data transformations, error handling, security-sensitive code
Step 6: Plan Quality Gates
- Pre-commit:
- Lint (ESLint, Biome)
- Type check (tsc --noEmit)
- Affected unit tests (if tooling supports)
- CI pipeline:
- Full test suite
- Coverage threshold check
- Build verification
- Manual review checklist:
- New business logic has unit tests
- Error paths are tested
- No snapshot tests for logic (only for stable UI)
- Mocks don't hide real bugs
- Test descriptions read as documentation
Compaction 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.
Handoff
- If pattern inconsistencies are discovered in test file structure or naming conventions, hand off to pattern-analysis for a full codebase convention audit.
- If test boundaries reveal unclear architectural boundaries or service decomposition issues, hand off to architect department for structural analysis.
Output Format
Test Pyramid Summary
| Layer | Count | Run Time | Mock Strategy |
| Unit | ... | ... | ... |
| Integration | ... | ... | ... |
| E2E | ... | ... | ... |
Test Specifications
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)Coverage Targets
| 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 |
Quality Gate Checklist
- Pre-commit hooks configured
- CI runs full test suite
- Coverage thresholds enforced
- New code has corresponding tests
Quality Checks
- Every business logic function has a unit test spec
- Critical user paths have integration tests
- At least 1 E2E test for the main happy-path flow
- Mock strategy documented and doesn't hide real bugs
- Test file locations follow existing project conventions
- Edge cases and error paths included in test specs
- Coverage targets are pragmatic (not aspirational 100%)
Evolution Notes
<!-- Observations appended after each use -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

