test-writer
Skill0 starsChanged 5 days agoMITView on GitHub
Write focused unit tests for a function or file — naming, edge cases, and what not to test. Use when the user asks for tests, or before refactoring code that has no test coverage.
37 other projects use a version of this.
Adopted by
Most recently taken up by
- aixisstudio/claude-skillstheir own version, first seen Nov 29, 2026
- andiupn/claude-code-startertheir own version, first seen Nov 29, 2026
- divik-09/claude-skills-collectiontheir own version, first seen Nov 29, 2026
- nafiz530/SkillShelf-Labstheir own version, first seen Nov 29, 2026
- DmitryTokyo/agent-kittheir own version, first seen Nov 22, 2026
- maurodesouza/skillstheir own version, first seen Nov 22, 2026
Used with
Projects with it also use debug-fix, changelog-writer 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.
zebbernSkilldebug-fix
Find and fix a bug or issue — from any source (GitHub issue, error message, user report, or observed behavior)
Also in 4 projects that use this
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
tekumaraSkillapi-design-review
Reviews REST API design by inventorying routes, finding overlapping functionality, comparing payloads and pagination, and checking resource naming, URL structure, identifiers, errors, idempotency, and timestamps. Use when asked to review API routes, compare endpoints, find redundant or superseding operations, assess contract consistency, or run a REST API design review.
Also in 3 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
nimbalystSkillprd-writer
Create structured Product Requirements Documents (PRDs) with prioritized requirements. Use when writing product specs, feature requirements, or project briefs.
Also in 4 projects that use this
JohnJBorenSkilldebugger
Systematic debugging workflows, root cause analysis, and troubleshooting patterns
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
- leonardomso/33-js-concepts★ 67ksame name
- Devolutions/IronRDP★ 3.4ksame name
- poshan0126/dotclaude★ 871same name
- TheDecipherist/claude-code-mastery-project-starter-kit★ 337same name
- hamzafarooq/claude-code-starter★ 145same name
- anchildress1/awesome-ai★ 68same name
- anchildress1/awesome-github-copilot★ 68same name
- nimbalyst/skills★ 28same name
- Twigpine/openclaude-skills★ 19same name
- jeremymcs/skills★ 8same 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 repository3 other files it gives its agents.
- code-reviewSkill
- commit-helperSkill
- readme-writerSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 7 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 34 edited versions we read keep these.
7
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 8
Write small, focused unit tests that catch real bugs.
- Very specific: line 22
Don't test the language or the library (for example, that sorted() sorts).
- Distinctive: line 23
Don't test a private helper through the public function twice — test it once, directly.
- Distinctive: line 24
Don't write tests for code that is about to be deleted.
- Very specific: line 28
Use the project's existing test style.
- Distinctive: line 30
Keep setup tiny — build test data inside the test, not in a shared fixture, unless three or more tests need the same data.
- Distinctive: line 34
Never change the code under test to make a test pass.
- Distinctive: line 35
Every test must be able to fail.
- Distinctive: line 36
Keep tests fast. No network, no real files outside a temp folder, no sleeping.
“Common” is measured: kept by at least 6 in 10 of the 34 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
Write small, focused unit tests that catch real bugs. Tests should be easy to read and quick to run.
How to work
- Read the code first. Understand what the function does, what it takes in, and what it returns. If the code is unclear, say so before writing tests.
- Pick the cases that matter:
- The happy path — the normal input the function is written for.
- Edge cases — empty input, zero, the biggest or smallest allowed value, a missing file.
- Error cases — bad input, wrong types, things that should raise an error or return one.
- One behaviour per test. A test that checks three things at once hides which one broke.
- Name tests after the behaviour, not the function:
test_returns_empty_list_when_no_notes_foundbeatstest_find_notes_3.
What NOT to test
- Don't test the language or the library (for example, that
sorted()sorts). - Don't test a private helper through the public function twice — test it once, directly.
- Don't write tests for code that is about to be deleted.
Output format
- Use the project's existing test style. If there is no test file yet, use plain
assertstatements in a file namedtest_<module>.py. - Group tests by the function they cover, with a short comment above each group.
- Keep setup tiny — build test data inside the test, not in a shared fixture, unless three or more tests need the same data.
Rules
- Never change the code under test to make a test pass. If the code is wrong, say so.
- Every test must be able to fail. A test that always passes is not a test — read it once more after writing it and check.
- Keep tests fast. No network, no real files outside a temp folder, no sleeping.
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.

