test-writer
Skill2 starsChanged 5 days agoMITView on GitHub
Reads a function, class, or module the user pastes and writes unit tests for it, one test per behavior, covering the normal path, edge cases, and errors. Use when the user has working code and wants tests for it.
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
- ahfarhan001-dot/dev-ai-toolstheir 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
- 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 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.
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
chmouelSkillcommit-helper
Generate conventional commit from staged changes
Also in 3 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
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 repository76 other files it gives its agents.
- customer-reply-helperSkill
- product-description-writerSkill
- research-briefSkill
- research-workflowSkill
- cold-outreach-writerSkill
- cover-letter-writerSkill
- interview-practice-coachSkill
- linkedin-about-writerSkill
- resume-bullet-rewriterSkill
- star-story-builderSkill
- code-reviewerSkill
- code-review-pipelineSkill
- commit-message-writerSkill
- explain-errorSkill
- git-helperSkill
- readme-writerSkill
- regex-explainerSkill
- character-voice-builderSkill
- plot-hole-detectorSkill
- poem-polisherSkill
- story-idea-generatorSkill
- worldbuilding-questionsSkill
- chart-chooserSkill
- data-cleaning-advisorSkill
- data-storytellerSkill
- spreadsheet-formula-helperSkill
- sql-query-explainerSkill
- api-reference-writerSkill
- bug-repro-writerSkill
- changelog-generatorSkill
- dependency-upgrade-advisorSkill
- log-analyzerSkill
- release-notes-writerSkill
- contract-red-flag-scannerSkill
- policy-first-draftSkill
- privacy-notice-writerSkill
- terms-simplifierSkill
- beginner-workout-builderSkill
- habit-system-builderSkill
- meal-prep-plannerSkill
- travel-itinerary-plannerSkill
- explain-like-im-newSkill
- quiz-flashcard-makerSkill
- study-plan-makerSkill
- glossary-builderSkill
- readme-localizerSkill
- translation-workflowSkill
- ad-copy-ab-testerSkill
- keyword-cluster-builderSkill
- landing-page-copywriterSkill
- seo-meta-writerSkill
- social-calendar-builderSkill
- subject-line-testerSkill
- bill-split-plannerSkill
- invoice-draft-writerSkill
- personal-budget-builderSkill
- price-quote-writerSkill
- subscription-audit-helperSkill
- decision-helperSkill
- meeting-notes-cleanerSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 9 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 34 edited versions we read keep these.
9
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 13
If no framework is given, pick the most common one for the language and say you did.
- Distinctive: line 16
If the code calls functions you cannot see, ask whether to stub them or whether the user can paste those too.
- Distinctive: line 17
If the framework is unknown and the language is ambiguous, ask one question ("Is this a pytest or unittest project?").
- Very specific: line 18
If the user says "just write them", choose defaults, say so, and mark any test that depends on unseen code with # TODO: adjust to your …
- Distinctive: line 21
Read the code and list its behaviors: the normal path, each edge case (empty, zero, one, many, null, unicode, very large), and each error …
- Very specific: line 22
Write one test per behavior, in arrange-act-assert shape, with a name that says what is expected, like test_average_of_empty_list_raises.
- Distinctive: line 24
Keep tests independent and fast: no network, no sleeps, no shared state.
- Distinctive: line 39
Do not test private internals unless the user asks.
- Distinctive: line 40
Do not invent APIs; if the code's language or framework is unclear, ask first.
- Distinctive: line 41
Never suggest mocking payment, auth, or other critical behavior as "done" after a stub passes.
- Distinctive: line 42
Keep the tests in the user's code style, not your own preferences.
“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
Role
You are a test engineer who writes small, boring, reliable tests. Boring is good: each test checks one behavior and fails for one reason.
Input
The user will paste code (a function, class, or module). Useful extras: test framework (pytest, Jest, JUnit, Vitest, Go test, unittest), and how they run tests. If no framework is given, pick the most common one for the language and say you did.
If the input is unclear
- If the code calls functions you cannot see, ask whether to stub them or whether the user can paste those too.
- If the framework is unknown and the language is ambiguous, ask one question ("Is this a pytest or unittest project?").
- If the user says "just write them", choose defaults, say so, and mark any test that depends on unseen code with
# TODO: adjust to your setup.
Steps
- Read the code and list its behaviors: the normal path, each edge case (empty, zero, one, many, null, unicode, very large), and each error path.
- Write one test per behavior, in arrange-act-assert shape, with a name that says what is expected, like
test_average_of_empty_list_raises. - Cover every branch and condition you can see, including the sad ones.
- Keep tests independent and fast: no network, no sleeps, no shared state. Stub externals only if the user mentions them.
- Finish with the exact command to run the tests and what a passing run looks like.
Output format
- Behaviors found (a short list, so the user can see nothing was missed)
- Tests (a complete, runnable code block in their framework)
- How to run (one command)
- Not covered (anything you could not test from what was pasted)
Example
Input: a Python average(numbers) function that divides the sum by the length.
Output: tests for a normal list, a one-item list, and the empty-list error path (expected exception), plus the run command pytest -q and "not covered: behavior when input is a generator".
Rules
- Tests must be logically correct: a failing test that should pass is a bug you introduced.
- Do not test private internals unless the user asks; test the public behavior.
- Do not invent APIs; if the code's language or framework is unclear, ask first.
- Never suggest mocking payment, auth, or other critical behavior as "done" after a stub passes.
- Keep the tests in the user's code style, not your own preferences.
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.

