test-writer
Skill338 starsChanged 5 months agoMITView on GitHub
Write tests that catch bugs, with explicit assertions, realistic data, and proper structure. Use when asked to write, add, improve, or expand tests, or to raise coverage. Writes test files and runs them to confirm they assert real behavior.
24 other projects use a version of this.
Adopted by
Most recently taken up by
- anchildress1/awesome-aitheir own version, first seen Sep 16, 2026
- RealDougEubanks/ClaudeMarketplacetheir own version, first seen Sep 10, 2026
- TSS-Blue-AI-Lab/ai-lab-agent-skillstheir own version, first seen Aug 6, 2026
- lexicalninja/my-little-scrum-teamtheir own version, first seen Jul 26, 2026
- osouthgate/agent-plustheir own version, first seen Jul 3, 2026
- eugnmueller-87/claude-blueprinttheir own version, first seen Jul 2, 2026
Used with
Projects with it also use code-reviewer.
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.
GoogleSkillcode-reviewer
Also in 5 projects that use this
Other versions24 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 24
- hamzafarooq/claude-code-starter★ 145same name
- anchildress1/awesome-ai★ 66same name
- nimbalyst/skills★ 28same name
- TSS-Blue-AI-Lab/ai-lab-agent-skills★ 25same name
- Twigpine/openclaude-skills★ 19same name
- jeremymcs/skills★ 8same name
- xcrrr/claude-skills★ 6same name
- AskExe/exe-build-skills★ 4same name
- osouthgate/agent-plus★ 4same name
- zebbern/termstack★ 4same name
14 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 repository26 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- global-claude-md/CLAUDE.mdCLAUDE.md
- accessibilitySkill
- api-conventionsSkill
- code-reviewSkill
- create-serviceSkill
- css-structureSkill
- debuggerSkill
- dependency-vettingSkill
- design-reviewSkill
- dev-pitfallsSkill
- dockerSkill
- docker-swarmSkill
- mcp-builderSkill
- mdd-workflowSkill
- mongodb-backupsSkill
- mongodb-replica-setsSkill
- mongodb-rulesSkill
- nginxSkill
- nodejsSkill
- responsive-cssSkill
- schema-source-of-truthSkill
- tui-builderSkill
- wafSkill
- web-architectureSkill
- web-performanceSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 24 edited versions we read keep these.
3
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 17
Every test has explicit assertions.
- Distinctive: line 18
Test behavior, not implementation details.
- Very specific: line 20
Use realistic test data, never test / asdf.
- Distinctive: line 78
Run the tests. A new test should fail against code that doesn't satisfy it and pass once it does.
“Common” is measured: kept by at least 6 in 10 of the 24 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
Test Writer
You write tests that catch bugs, not tests that pass. A test that can't fail isn't a test.
Principles
- Every test has explicit assertions. "Page loads" is not a test.
- Test behavior, not implementation details.
- Cover the happy path, the error cases, and the edge cases.
- Use realistic test data, never
test/asdf. - Tests are independent. No shared mutable state between them.
Structure
describe('[Feature]', () => {
describe('[Scenario]', () => {
it('should [expected behavior] when [condition]', async () => {
// Arrange — set up test data
// Act — perform the action
// Assert — verify SPECIFIC outcomes
});
});
});Assertions
// GOOD — explicit, specific
expect(result.status).toBe(200);
expect(result.body.user.email).toBe('ada@example.com');
await expect(page.locator('h1')).toContainText('Welcome');
// BAD — passes even when broken
expect(result).toBeTruthy(); // too vague
await page.goto('/dashboard'); // no assertion at allData-layer tests (this codebase)
The data layer has rules that test data must respect, or the test passes while masking the exact bug that bites in production.
- Seed real
ObjectIdvalues, not string ids. The single most common production bug here is a string-vs-ObjectId_idmismatch that silently returns nothing. A test seeded with string ids passes and hides it. Use actualObjectIdtypes in fixtures. - Exercise the data adapter (StrictDB or native), not a hand-rolled driver mock. Tests go through the same
adapters/boundary the handlers use. Mock at the network or data boundary, not by reimplementing the driver. - Test the round trip. Where data is serialized (JSON in, JSON out), assert that types survive it, since that round trip is where
_idmismatches and code-66 upsert errors appear.
Unit tests (Vitest)
Each test verifies:
- Return value matches expected.
- Side effects occurred, or provably didn't.
- Error cases throw the proper error.
- Edge cases: null, empty, max values, and for ids, wrong-type ids.
E2E tests (Playwright)
Each test verifies:
- Correct URL after navigation.
- Key elements are present.
- Correct data is displayed.
- Error states show the proper message.
Before finishing
Run the tests. A new test should fail against code that doesn't satisfy it and pass once it does. If a test passes the moment you write it without the behavior existing, it isn't asserting anything, fix the assertion.
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.

