test-gen
Skill2 starsChanged 5 months agoMITView on GitHub
Generate unit tests for changed or untested code, matching the project's existing test style. Use when the user asks to write tests, add test coverage, says "test this", "generate unit tests", "cover the changes with tests", or "what's untested".
10 other projects use a version of this.
Adopted by
Most recently taken up by
- AllThingsSmitty/proven-skillstheir own version, first seen Oct 6, 2026
- SethGammon/Citadeltheir own version, first seen Sep 20, 2026
- EvildoerXiaoyy/reasonix-skillstheir own version, first seen Jun 23, 2026
- ZaneL1u/test-generate-skillstheir own version, first seen Jun 18, 2026
- thijsvos/Claude_Skillstheir own version, first seen May 14, 2026
- ilhankilic/yaratai-skilltheir own version, first seen Apr 14, 2026
Used with
Projects with it also use review.
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.
SentrySkillreview
Fixture review skill.
Also in 3 projects that use this
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- SethGammon/Citadel★ 922same name
- EvildoerXiaoyy/reasonix-skills★ 4same name
- kronus-tech/kronus★ 4same name
- chidekina/aria-superpowers★ 2same name
- liogogogo/claude-code-enhancement★ 2same name
- AllThingsSmitty/proven-skills★ 1same name
- ilhankilic/yaratai-skill★ 1same name
- thijsvos/Claude_Skills★ 1same name
- 354685856-sn/claude-code-skills★ 0same name
- ZaneL1u/test-generate-skills★ 0same name
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 repository68 other files it gives its agents.
- a11ySkill
- api-docsSkill
- audit-logSkill
- benchmarkSkill
- bisectSkill
- cacheSkill
- changelogSkill
- cherry-pickSkill
- ci-setupSkill
- codeownersSkill
- commit-messageSkill
- connection-poolSkill
- contributingSkill
- coverageSkill
- db-migrateSkill
- dead-codeSkill
- debugSkill
- depsSkill
- diagramSkill
- dockerizeSkill
- docstringSkill
- e2eSkill
- env-exampleSkill
- error-handlingSkill
- explainSkill
- feature-flagSkill
- flaky-testSkill
- gitignoreSkill
- graceful-shutdownSkill
- graphqlSkill
- healthcheckSkill
- i18nSkill
- idempotencySkill
- licenseSkill
- lint-fixSkill
- loggingSkill
- migrateSkill
- mockSkill
- onboardSkill
- optimizeSkill
- paginationSkill
- pr-descriptionSkill
- pre-commitSkill
- profileSkill
- prune-branchesSkill
- rate-limitSkill
- readmeSkill
- rebaseSkill
- refactorSkill
- regexSkill
- releaseSkill
- resolve-conflictsSkill
- retrySkill
- review-diffSkill
- scaffoldSkill
- secrets-scanSkill
- security-headersSkill
- seedSkill
- soft-deleteSkill
- sqlSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
Focus on what changed: Test new and modified functions/branches.
- Distinctive: line 31
Use existing fixtures, factories, or mocks where the project already provides them.
- Distinctive: line 33
If you cannot determine the framework with confidence, ask which one to use rather than guessing.
- Distinctive: line 34
After writing, print the exact command to run the new tests.
“Common” is measured: kept by at least 6 in 10 of the 6 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
Changed code (working tree + staged)
!git diff HEAD --stat 2>/dev/null || echo "No git changes detected"
!git diff HEAD 2>/dev/null | head -400
Detected test setup
!ls package.json pyproject.toml Cargo.toml go.mod pom.xml build.gradle 2>/dev/null
!find . -type d \( -name node_modules -o -name .git -o -name dist -o -name build \) -prune -o -type f \( -name '*.test.*' -o -name '*.spec.*' -o -name 'test_*.py' -o -name '*_test.go' -o -name '*_test.rs' \) -print 2>/dev/null | head -15
Instructions
Generate unit tests for the changed code shown above (or for $ARGUMENTS if a file/path was provided).
Rules
- Detect the framework first. Infer the test runner and style from the detected setup and an existing test file (Jest/Vitest for JS/TS, pytest for Python,
go testfor Go,cargo testfor Rust, JUnit for Java). Match the existing imports, assertion style, file naming, and directory layout exactly — do not introduce a new framework. - Focus on what changed. Test new and modified functions/branches. Do not regenerate tests for unrelated existing code.
- Cover meaningfully: the happy path, at least one edge case (empty/null/boundary), and error handling where the code can throw. Skip trivial getters.
- Name tests descriptively — state the behavior under test, not the function name (e.g.
returns 0 for an empty cart, nottest_total). - Use existing fixtures, factories, or mocks where the project already provides them. Read a neighboring test file before inventing helpers.
- Place tests in the conventional location for this project. State the file path before each test block.
- If you cannot determine the framework with confidence, ask which one to use rather than guessing.
- After writing, print the exact command to run the new tests.
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.

