testing-strategy
Skill10 starsChanged 3 months agoMITView on GitHub
Test selection and scope guidance: tiers, marks, batching, cross-module regressions. Loaded by the testing rule module. Triggers: 'which tests should I run', 'test scope', 'test tiers'. NOT for: writing tests (use test-driven-development) or fixing broken tests (use fixing-tests).
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, api-design and 7 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
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 10 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
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.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- documentation-updatesSkill
- spellbook-auditingSkill
- advanced-code-reviewSkill
- adversarial-reviewSkill
- agent2agentSkill
- analyzing-domainsSkill
- analyzing-skill-usageSkill
- assembling-contextSkill
- async-await-patternsSkill
- auditing-green-mirageSkill
- autonomous-modeSkill
- branch-contextSkill
- code-reviewSkill
- creating-issues-and-pull-requestsSkill
- debuggingSkill
- dedupeSkill
- deep-researchSkill
- dehallucinationSkill
- design-explorationSkill
- designing-workflowsSkill
- developSkill
- devils-advocateSkill
- dispatching-parallel-agentsSkill
- distilling-prsSkill
- documenting-projectsSkill
- documenting-toolsSkill
- emotional-stakesSkill
- enforcing-code-qualitySkill
- estimating-ticketsSkill
- executing-plansSkill
- fact-checkingSkill
- finding-dead-codeSkill
- finishing-a-development-branchSkill
- fixing-testsSkill
- fractal-thinkingSkill
- gathering-requirementsSkill
- generating-diagramsSkill
- instruction-engineeringSkill
- isolated-testingSkill
- managing-artifactsSkill
- merging-worktreesSkill
- opportunity-awarenessSkill
- optimizing-instructionsSkill
- polish-repoSkill
- reflexionSkill
- requesting-code-reviewSkill
- resolving-merge-conflictsSkill
- reviewing-design-docsSkill
- reviewing-impl-plansSkill
- reviewing-prsSkill
- rounding-up-worktree-sessionsSkill
- sharpening-promptsSkill
- smart-readingSkill
- test-driven-developmentSkill
- tooling-discoverySkill
- using-git-worktreesSkill
- using-lsp-toolsSkill
- using-skillsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 6 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 33 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Scope Matches Change: - Test selection mirrors the scope of the code change.
- Very specific: line 34
Single file changed: Run only the test file(s) that directly test that module.
- Distinctive: line 36
Multi-file task complete: Run unit tests for all changed files in one command.
- Distinctive: line 37
All tasks in a work unit complete: Run the full suite once.
- Distinctive: line 38
If >5 test files affected: Run the full fast tier rather than listing individually.
- Distinctive: line 40
Batching: Write code for task 1, run targeted tests, write code for task 2, run targeted tests, run full suite once at end.
- Very specific: line 58
If a project lacks marks, infer tiers from --durations=0 (pytest) or equivalent: >5s is slow, >1s is integration, the rest are unit.
- Distinctive: line 62
When the full suite fails after targeted tests passed: check failed test imports against your changed modules, then investigate shared …
“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
<analysis>
Reference for choosing which tests to run based on change scope, and diagnosing cross-module regressions when targeted tests pass but the full suite fails.
</analysis><reflection>
Did I match test scope to change scope, and did I avoid running the full suite when targeted tests would suffice?
</reflection>Testing Strategy
Invariant Principles
- Scope Matches Change - Test selection mirrors the scope of the code change; a single-file change does not justify a full suite run.
- Marks Are Proactive - Tests are marked (slow, gpu, network) at authoring time based on what they require, not how fast they happen to run today.
- Full Suite Runs Once - The complete test suite runs once per work unit completion, not after every incremental change.
Test Tiers
| Tier | Time | What | When |
| Unit | <1s each | Pure logic, no I/O, no external deps | After every change |
| Integration | 1-5s each | Real resources (DB, filesystem, network) | After completing a logical unit of work |
| E2E / Slow | >5s each | Full pipelines, large data, real services | Once per feature branch, before PR |
Selecting What to Run
- Single file changed: Run only the test file(s) that directly test that module.
src/auth/login.pychanged? Runtests/test_login.py. - Shared dependency changed (types, config, utilities): Grep for imports of the changed module across test files. Run all direct consumers.
- Multi-file task complete: Run unit tests for all changed files in one command.
- All tasks in a work unit complete: Run the full suite once.
- If >5 test files affected: Run the full fast tier rather than listing individually.
Batching: Write code for task 1, run targeted tests, write code for task 2, run targeted tests, run full suite once at end.
Writing Tests for Speed
Mock expensive resources in unit tests. Use smallest possible inputs. Never sleep in tests. One assertion focus per test. No fixtures heavier than the test itself.
Test Marks
Apply marks proactively when writing tests. A test that calls a GPU kernel is a GPU test even if it is fast today.
| Mark | Meaning |
slow | >5 seconds. Skip during rapid iteration. |
gpu, hardware | Requires specific hardware. Skip on machines without it. |
network / external | Calls external services. Skip in offline/fast modes. |
integration | Requires multiple components working together. |
smoke | Minimal sanity checks. Run first. |
If a project lacks marks, infer tiers from --durations=0 (pytest) or equivalent: >5s is slow, >1s is integration, the rest are unit.
Cross-Module Regression
When the full suite fails after targeted tests passed: check failed test imports against your changed modules, then investigate shared mutable state, test ordering, or resource contention.
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.

