testing-strategy
Skill1 starsChanged 44 days agoMITView on GitHub
Use when a code change needs a testing approach chosen or revised, or when writing or changing nontrivial tests whose falsifiability, boundary, doubles, or regression value needs review, especially for bug fixes lacking regression coverage, stable APIs suited to test-first work, legacy code needing characterization, prototypes or UI/configuration/integration work needing acceptance-style validation, or repositories with explicit strict TDD rules. Choose from contract stability, available test seams, and risk; for strategy-only requests, recommend evidence without implementing changes; skip trivial edits whose required checks are already obvious.
54 other projects use a version of this.
Adopted by
Most recently taken up by
- komluk/scaffoldingtheir own version, first seen Nov 15, 2026
- garrettw/php-arch-skillstheir own version, first seen Nov 14, 2026
- Cure-Consulting-Group/ProductEngineeringSkillstheir own version, first seen Nov 12, 2026
- CsHeng/agent-skillstheir own version, first seen Nov 9, 2026
- jDxve/avengers-kittheir own version, first seen Nov 8, 2026
- nisarth/claude-skills-storetheir own version, first seen Nov 8, 2026
Used with
Projects with it also use api-contract-design, deploy-checklist and 10 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.
MohOneXSkillapi-contract-design
Designs and reviews API contracts (REST, RPC, GraphQL, library interfaces) for evolvability, backward compatibility, and failure semantics. Use when defining new endpoints/interfaces, versioning an API, reviewing a schema, or deciding how breaking changes propagate to clients.
Also in 3 projects that use this
AnthropicSkilldeploy-checklist
Pre-deployment verification checklist. Use when about to ship a release, deploying a change with database migrations or feature flags, verifying CI status and approvals before going to production, or documenting rollback triggers ahead of time.
Also in 4 projects that use this
xenitV1Skillreact-patterns
Modern React patterns and principles. Hooks, composition, performance, TypeScript best practices.
Also in 4 projects that use this
AnthropicSkilltech-debt
Identify, categorize, and prioritize technical debt. Trigger with "tech debt", "technical debt audit", "what should we refactor", "code health", or when the user asks about code quality, refactoring priorities, or maintenance backlog.
Also in 4 projects that use this
MicrosoftSkillerror-handling
统一错误处理系统。在添加 API 端点、修改错误处理、添加前端 API 调用、编写错误相关测试时使用。
Also in 5 projects that use this
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 9 projects that use this
- +4 more from anthropics
- +1 more from microsoft
Other versions54 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 54
- anthropics/knowledge-work-plugins★ 36ksame name
- chthollyphile/folia-major★ 12ksame name
- Community-Access/accessibility-agents★ 409same name
- AnastasiyaW/claude-code-config★ 214same name
- AnastasiyaW/codex-claude-code-config★ 214same name
- irahardianto/awesome-agv★ 157same name
- Blushyes/reef★ 84same name
- shinpr/agentic-code★ 51same name
- addxai/enterprise-harness-engineering★ 44same name
- drafthq/draft★ 40same name
44 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 repository9 other files it gives its agents.
- code-reviewSkill
- csharp-styleSkill
- dotnet-cpu-hot-pathsSkill
- git-conventionsSkill
- security-reviewSkill
- simplifySkill
- systematic-debuggingSkill
- verification-before-completionSkill
- wsl-pwshSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 11 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 44 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Bug fix: Prefer a focused regression test that reproduces the symptom before the fix when practical.
- Distinctive: line 13
Stable API or well-defined behavior: When an executable test is the cheapest clear expression of the contract, prefer test-first …
- Distinctive: line 17
Strict TDD repository: Follow its documented red-green-refactor rules and commands.
- Distinctive: line 23
When implementation is requested and authorized, implement the smallest coherent change.
- Distinctive: line 32
Before retaining a test, name a realistic production defect it would catch.
- Distinctive: line 33
Test externally observable behavior at stable boundaries.
- Distinctive: line 35
Test this code's boundary contract, not the framework's mechanics.
- Distinctive: line 36
Use real collaborators when inexpensive and deterministic.
- Distinctive: line 37
Avoid assertions that only prove mock choreography or private implementation details.
- Distinctive: line 40
Do not absorb unrelated baseline failures, warnings, or test debt into the task.
- Distinctive: line 41
Do not default to the full repository suite when focused and relevant module checks are sufficient.
“Common” is measured: kept by at least 6 in 10 of the 44 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
Choose the testing approach that produces useful evidence without turning one methodology into a ritual.
Select the approach
- Bug fix: Prefer a focused regression test that reproduces the symptom before the fix when practical. For intermittent, environmental, or external failures, use the most reliable controlled reproduction instead.
- Stable API or well-defined behavior: When an executable test is the cheapest clear expression of the contract, prefer test-first development at the narrowest stable public boundary. Otherwise implement first and verify afterward.
- Legacy or poorly understood code: Characterize only behavior that should remain stable around the change. Treat current output as a drift baseline, not a correctness oracle; do not lock in a reported or known defect. For a bug fix, assert the intended behavior separately.
- Exploratory prototype or unsettled interface: Allow a time-boxed implementation spike. Before retaining, merging, or shipping it, identify the behavior that is now contractual and add the smallest durable checks; otherwise keep it explicitly non-production or discard it.
- UI, visual output, configuration, generated artifacts, migrations, or external integrations: Use the strongest fitting evidence, such as rendering, screenshots, schema validation, builds, integration environments, logs, or focused manual acceptance. Automate checks that will remain valuable.
- Strict TDD repository: Follow its documented red-green-refactor rules and commands. Do not infer strict TDD from this skill alone.
Apply the strategy
- Identify the observable behavior, risk, stable test seam, and existing repository commands.
- Establish the pre-change signal appropriate to the selected strategy: a failing regression, a test-first example, a characterization baseline, or an acceptance criterion.
- When implementation is requested and authorized, implement the smallest coherent change. Keep unrelated cleanup outside the behavior-changing step.
- For implementation work, run the focused check, then expand to related module or integration checks in proportion to coupling and risk.
For strategy-only or review requests, do not implement changes. Return the recommended approach, evidence, scope, and any validation that would remain before completion.
When implementation already exists in a dirty worktree, preserve it and apply the selected strategy to the current change. Add a regression or characterization test only when it is the fitting durable signal; otherwise use the selected acceptance, rendering, integration, configuration, or controlled-reproduction evidence. If proving the historical failure is valuable, use an isolated base revision or another non-destructive method; otherwise state that the pre-fix failure was not independently demonstrated.
Keep tests useful
- Before retaining a test, name a realistic production defect it would catch. If none can be named, redesign or remove it. For high-risk behavior, confirm falsifiability with a pre-fix run, targeted revert, or mutation that fails for the intended reason when practical.
- Test externally observable behavior at stable boundaries; do not impose one test per method.
- Test behavior, not source presence or change alone. Exact text is a valid assertion only when it is part of the external contract; otherwise execute the script, configuration, generated artifact, or agent-facing instruction and assert outputs, side effects, schema, exit status, or consumer behavior. Do not assert constants or private structure merely to detect edits.
- Test this code's boundary contract, not the framework's mechanics. Characterize an upstream assumption only when the implementation materially depends on it.
- Use real collaborators when inexpensive and deterministic. Use narrow doubles at slow, nondeterministic, destructive, or external boundaries.
- Avoid assertions that only prove mock choreography or private implementation details.
- Reuse existing test frameworks and seams. Do not add a new framework, harness, public API, or dependency-injection layer solely to test one change unless recurring risk justifies its maintenance.
- Derive expected outcomes from requirements, a real reproduction, a specification, or an independent oracle rather than the implementation under test. Review snapshots instead of accepting updates mechanically.
- Do not absorb unrelated baseline failures, warnings, or test debt into the task. Report them separately unless they block trustworthy validation.
- Do not default to the full repository suite when focused and relevant module checks are sufficient. Run broader gates when repository policy, shared infrastructure, coupling, or release risk warrants them.
At completion, bind each material claim to evidence from the current relevant state, reuse current evidence when that state is unchanged, and state which checks were not run. Use verification-before-completion when it is available; otherwise apply these rules directly.
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.

