test-writer
Skill1 starsChanged 5 months agoMITView on GitHub
Backfill real pytest coverage for an existing Python module — behavior not implementation, the edge cases that actually break, no assertion-free tests and no mock theater. Use to add tests to code that already works but is under-tested. Trigger phrases "write tests for X", "add tests", "cover this module".
29 other projects use a version of this.
Adopted by
Most recently taken up by
- krystaleicher/claude-skillstheir own version, first seen Nov 16, 2026
- seankoji-com/.agentstheir own version, first seen Nov 8, 2026
- Devolutions/IronRDPtheir own version, first seen Nov 1, 2026
- WST2002/claude-code-skillstheir own version, first seen Oct 17, 2026
- anchildress1/awesome-aitheir own version, first seen Oct 13, 2026
- krishnamallam/upboxtheir own version, first seen Oct 11, 2026
Used with
Projects with it also use changelog-writer, readme-generator and 4 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.
zbruhnkeSkillchangelog-writer
Maintain CHANGELOG.md with properly categorized entries. Use after implementing features, fixing bugs, or making any notable changes. Follows Keep a Changelog format.
Also in 5 projects that use this
glinckerSkillreadme-generator
Generates comprehensive README.md files for software projects by analyzing codebase structure
Also in 4 projects that use this
JohnJBorenSkilldebugger
Systematic debugging workflows, root cause analysis, and troubleshooting patterns
Also in 3 projects that use this
nimbalystSkillprd-writer
Create structured Product Requirements Documents (PRDs) with prioritized requirements. Use when writing product specs, feature requirements, or project briefs.
Also in 3 projects that use this
GoogleSkillcode-reviewer
Also in 4 projects that use this
ElasticSkillaccessibility
Accessibility guidance for Kibana. Use this skill when working with or reviewing EUI components, resolving a11y-related (@elastic/eui) ESLint issues, and ensuring proper use of ARIA attributes, focus management, keyboard interactions, and accessible naming conventions.
Also in 3 projects that use this
Other versions29 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 29
- leonardomso/33-js-concepts★ 67ksame name
- Devolutions/IronRDP★ 3.3ksame name
- poshan0126/dotclaude★ 871same name
- TheDecipherist/claude-code-mastery-project-starter-kit★ 337same name
- hamzafarooq/claude-code-starter★ 145same name
- anchildress1/awesome-ai★ 67same name
- anchildress1/awesome-github-copilot★ 67same name
- nimbalyst/skills★ 28same name
- Twigpine/openclaude-skills★ 19same name
- jeremymcs/skills★ 8same name
19 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 repository16 other files it gives its agents.
- catchupSkill
- claude-mdSkill
- context-budgetSkill
- db-querySkill
- debug-fixSkill
- eval-agentSkill
- explainSkill
- fix-issueSkill
- incident-ruleSkill
- pr-reviewSkill
- refactorSkill
- secrets-checkSkill
- setup-projectSkill
- shipSkill
- tddSkill
- trace-agentSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 28 edited versions we read keep these.
1
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
- Very specific: line 12
Write tests that would actually catch a regression, not tests that just execute lines.
- Distinctive: line 23
Enumerate cases: before writing any:
“Common” is measured: kept by at least 6 in 10 of the 28 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
Trigger: "write tests for X" / "add tests" / "cover this module"
Standing rules: ../_conventions.md.
Write tests that would actually catch a regression, not tests that just execute
lines. Test behavior and contracts, not internals. Never write assert True and
never assert only that a mock was called without checking its arguments.
Steps
- Read the target and its contract. What are the public functions/classes? For each: inputs, outputs, side effects, and the documented or implied behavior. Note what's a real boundary (network, filesystem, clock, LLM API, DB) vs pure logic.
- Enumerate cases before writing any:
- Happy path — the normal expected use.
- Edge cases — empty input,
None, zero, boundary values, empty collection, duplicates, unicode. - Error cases — invalid input raises the right exception; failure paths.
- For AI code: a refusal/truncated response, malformed JSON from the model, a tool-call error.
- Write pytest tests. One assertion per test, Arrange-Act-Assert, names that
describe behavior (
test_returns_empty_list_when_no_suppliers_match). Usepytest.mark.parametrizefor the same behavior across inputs. Use fixtures for shared setup. - Mock only at boundaries. Real implementations everywhere possible. Mock the network/LLM/DB/clock/randomness only — and when you mock, assert on the arguments passed, not just call count. No mocking of the code under test.
- Run them.
pytest path/to/test_x.py. All pass. Then deliberately break the source once to confirm a test actually fails (a test that can't fail is worthless) — then restore. - Report (terse): cases covered · tests added · run result. Name any behavior you could NOT test and why (e.g. needs a live key) — honestly, don't fake it.
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.

