test-author
Skill0 starsChanged 5 months agoMITView on GitHub
Write meaningful automated tests for existing code — tests that assert real behavior and cover the risky paths, not filler that only inflates coverage. Use this whenever the user asks to "write tests", "add unit tests", "add test coverage", "test this function/module", set up a test suite, or asks "how do I test this?"; or when they've just written code and want it covered — even if they don't name a test framework.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- hams-ollo/zen-agent-skillstheir own version, first seen Oct 20, 2026
- jpicklyk/task-orchestratortheir own version, first seen Oct 17, 2026
- Thalisu/SKILLStheir own version, first seen Oct 1, 2026
- emtcmca/guildproof-skillstheir own version, first seen Sep 19, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- jpicklyk/task-orchestrator★ 214same name
- hams-ollo/zen-agent-skills★ 2same name
- Thalisu/SKILLS★ 1same name
- emtcmca/guildproof-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 repository10 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- code-reviewerSkill
- commit-and-prSkill
- competitive-analysisSkill
- debuggerSkill
- prd-writerSkill
- repo-polisherSkill
- security-reviewSkill
- tech-design-docSkill
- user-storiesSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
5
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 20
Understand the contract: Read the code under test and determine what it promises: inputs, outputs, side effects, error conditions.
- Very specific: line 32
Make each test independent and deterministic: No shared mutable state, no reliance on test order, no real network/clock/filesystem unless …
- Distinctive: line 48
Don't chase 100% coverage with trivial tests.
- Distinctive: line 49
Don't assert on incidental details (log strings, exact float equality, dict ordering) that will break spuriously.
- Distinctive: line 50
If the code is hard to test, that's a design signal — say so and suggest the seam (dependency injection, pure function extraction) rather …
- Distinctive: line 51
Prefer a few sharp tests over many shallow ones.
“Common” is measured: kept by at least 6 in 10 of the 4 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 Author
Tests exist to catch regressions and document intended behavior. A test that can't fail is worse than no test, because it gives false confidence. Write tests that would actually break if the code broke.
Process
- Understand the contract. Read the code under test and determine what it promises: inputs, outputs, side effects, error conditions. Test the contract, not the implementation details — tests coupled to internals break on every refactor.
- Pick the framework the project already uses. Match the existing convention (pytest, jest/vitest, go test, cargo test, JUnit, etc.) and file layout. Don't introduce a new framework unless asked.
- Cover the cases that matter, in priority order:
- The happy path (the main thing it's supposed to do)
- Boundaries and edges: empty, zero, one, many, max, null/None, negative, unicode
- Error paths: invalid input, failures, exceptions — assert they're handled as promised
- Known-tricky logic surfaced by reading the code
- Make each test independent and deterministic. No shared mutable state, no reliance on test order, no real network/clock/filesystem unless that's the point — inject or mock those. A flaky test erodes trust in the whole suite.
- Run the tests. Confirm they pass against correct code. Where practical, sanity-check that a test fails if you break the code — that's how you know it has teeth.
What makes a test good
- Named for behavior, not mechanics:
test_rejects_expired_token, nottest_func2. - Arrange–Act–Assert structure, one logical behavior per test.
- Asserts outcomes, not just "it ran without throwing".
- Readable as documentation — someone should learn how the code behaves by reading the tests.
Guardrails
- Don't chase 100% coverage with trivial tests. Coverage is a means, not the goal.
- Don't assert on incidental details (log strings, exact float equality, dict ordering) that will break spuriously.
- If the code is hard to test, that's a design signal — say so and suggest the seam (dependency injection, pure function extraction) rather than writing a tortured test.
- Prefer a few sharp tests over many shallow ones.
Example
Input: "Write tests for this parse_duration('1h30m') helper."
Output: pytest cases covering a normal value (1h30m → 5400s), units alone
(45m, 2h), zero, missing units, garbage input (asserts it raises
ValueError), and whitespace — each named for the behavior it pins down, all
passing, with one deliberately checked to fail if the parser regresses.
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.

