testing
Skill9 starsChanged 8 months agoApache-2.0View on GitHub
Testing workflow and quality standards for writing and running tests. Use when: (1) Writing new tests, (2) Adding a new feature that needs tests, (3) Modifying logic that has existing tests, (4) Before claiming a task is complete.
194 other projects use a version of this, 1 of them edited.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- steerlabs/opensteertheir own version, first seen Nov 8, 2026
- timmo001/notestheir own version, first seen Nov 8, 2026
- codewithmukesh/dotnet-claude-kittheir own version, first seen Nov 8, 2026
- kortix-ai/sunatheir own version, first seen Nov 8, 2026
- microsoft/VSSDK-Analyzerstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use bundle-dependency-prs, update-library-template and 8 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.
MicrosoftSkillbundle-dependency-prs
Fix broken dependency update PRs and aggregate the ones that work into one PR.
Also in 7 projects that use this
MicrosoftSkillupdate-library-template
Merges the latest Library.Template into this repo (at position of HEAD) and resolves conflicts.
Also in 7 projects that use this
zetaloopSkillassign-copilot
Assigns a GitHub issue to the Copilot coding agent, optionally specifying a custom agent. Use this when asked to assign an issue to Copilot or delegate an issue to CCA.
Also in 3 projects that use this
NVIDIA-NeMoSkillbuild-and-dependency
Dev environment setup for Megatron Bridge — container-based development, uv package management, lockfile regeneration, adding dependencies, Slurm container usage, and common build pitfalls.
Also in 3 projects that use this
timmo001Skillchangeset-scope
Keep all scoped code work contained to the user-defined changeset. Use for implementation, fixes, diagnosis, refactoring, cleanup, and review when explicit instructions, named files, diffs, branches, pull requests, or injected work scopes define the boundary.
Also in 3 projects that use this
JetBrainsSkillmodule-dependencies
Add or modify IntelliJ module dependencies in `.iml` files.
Also in 3 projects that use this
Other versions194 projects use a version of this.
Word for word · 2
- iOfficeAI/AionUi★ 34k100% same
- CES-Ltd/TitanX★ 47100% same
Edited · 1
- FerroxLabs/wayland★ 606100% same
Wrote their own version · 191
- modelcontextprotocol/servers★ 92ksame name
- lobehub/lobe-chat★ 84ksame name
- lobehub/lobehub★ 84ksame name
- penpot/penpot★ 62ksame name
- meteor/meteor★ 45ksame name
- garrytan/gbrain★ 32ksame name
- OpenZeppelin/openzeppelin-contracts★ 27ksame name
- tursodatabase/turso★ 25ksame name
- redis/go-redis★ 22ksame name
- desktop/desktop★ 22ksame name
181 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 repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- architectureSkill
- bump-versionSkill
- fix-issuesSkill
- fix-sentrySkill
- i18nSkill
- oss-prSkill
- pr-automationSkill
- pr-fixSkill
- pr-reviewSkill
- pr-shipSkill
- pr-verifySkill
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 172 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 20
Before claiming work is complete
- Distinctive: line 48
Before writing tests, list the riskiest scenarios first:
- Distinctive: line 56
Follow these quality rules:
- Very specific: line 75
Keep each it() focused. More than 3 expect() calls in one test is a signal it is testing too much at once.
- Distinctive: line 79
After writing a test, mentally delete the core logic it targets.
- Distinctive: line 100
When modifying logic, check if existing tests need updating:
- Distinctive: line 106
If a test fails because the behavior changed intentionally, update the test.
- Distinctive: line 110
When testing a module, verify:
“Common” is measured: kept by at least 6 in 10 of the 172 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 Skill
Standards and workflow for writing and running tests. Every feature must be tested.
Announce at start: "I'm using testing skill to ensure proper test coverage."
Trigger Conditions
- Writing new tests for a feature or bug fix
- Adding a new feature (must include tests)
- Modifying logic that has existing tests (must update them)
- Before claiming work is complete
- Before committing code
Framework
Vitest 4 — configured in vitest.config.ts.
Test Structure
tests/
├── unit/ # Individual functions, utilities, components
├── integration/ # IPC, database, service interactions
├── regression/ # Regression test cases
└── e2e/ # End-to-end tests (Playwright, playwright.config.ts)Two Test Environments
| Environment | When | File naming |
node (default) | Main process, utilities, services | *.test.ts |
jsdom | DOM/browser-dependent code | *.dom.test.ts |
Workflow
Step 1: Identify What to Test
Before writing tests, list the riskiest scenarios first:
- What happens when the dependency returns
undefined/ throws? - What happens at boundaries (empty list, max retries, past timestamp)?
- What is most likely to break in production?
Step 2: Write Tests
Follow these quality rules:
1. Describe behavior, not code structure
// Wrong — describes implementation
it('should call repo.getConversation', ...)
// Correct — describes behavior
it('should return cached task without hitting repo on second call', ...)
it('should reject with error when conversation does not exist', ...)2. Every describe block must cover at least one failure path
Happy-path-only tests leave the most dangerous code untested.
3. One behavior per test
Keep each it() focused. More than 3 expect() calls in one test is a signal it is testing too much at once.
4. Self-check
After writing a test, mentally delete the core logic it targets. If the test would still pass, rewrite it — it is not guarding anything.
5. Start from risk, not from coverage gaps
List scenarios most likely to produce bugs. Write those first. Coverage is the outcome, not the starting point.
Step 3: Run Tests
bun run test # Run all tests (REQUIRED before every commit)
bun run test:coverage # Check coverage (before opening a PR)Step 4: Verify Coverage
Coverage target: ≥ 80% for all source files matched by vitest.config.ts → coverage.include (currently src/**/*.{ts,tsx} plus a few scripts).
New source files are automatically included in coverage — no manual config changes needed. If a new file is accidentally excluded by a rule in coverage.exclude, remove it from the exclude list.
Step 5: Update Existing Tests
When modifying logic, check if existing tests need updating:
bun run test -- --reporter=verbose # See which tests pass/fail with namesIf a test fails because the behavior changed intentionally, update the test. If it fails unexpectedly, investigate.
Edge Case Checklist
When testing a module, verify:
null/undefinedinputs handled- Empty arrays/objects handled
- Error thrown by dependencies handled
- Boundary values (0, -1, max, empty string)
- Async operations (timeout, rejection, cancellation)
Quick Checklist
Before submitting code:
- New features have corresponding test cases
- Modified logic has updated tests
bun run testpasses- Tests describe behavior, not implementation
- At least one failure path per describe block
- New source files are not accidentally excluded by
coverage.exclude bun run test:coveragemeets ≥ 80% target
Common Mistakes
| Mistake | Correct |
| Testing implementation details | Test observable behavior |
| Only testing happy path | Must include at least one failure path |
5+ expects in one it() | Split into separate tests |
| Skipping tests for "simple" code | Simple code breaks too — test the risky parts |
| Writing tests after saying "done" | Tests are part of "done", not an afterthought |
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.

