writing-tests
Skill0 starsChanged 4 months agoMITView on GitHub
Enumerates and writes test cases for a change — happy path, edges, boundaries, and error paths — in the project's test framework. Use when adding or improving tests, or when the TDD loop needs to know which cases to write.
39 other projects use a version of this.
Adopted by
Most recently taken up by
- scheron/Dailytheir own version, first seen Nov 8, 2026
- mcp-use/mcp-usetheir own version, first seen Nov 8, 2026
- yuri-xyz/skillstheir own version, first seen Nov 8, 2026
- lox/agent-skillstheir own version, first seen Nov 7, 2026
- JetBrains/intellij-communitytheir own version, first seen Nov 7, 2026
- iliaal/ai-skillstheir own version, first seen Nov 7, 2026
Used with
Projects with it also use reviewing-code, commits and 3 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.
bostonaholicSkillreviewing-code
Code review methodology for evaluating implementation changes. Use when reviewing code changes for quality, design, correctness, and maintainability. Focuses on changes made during implementation using Conventional Comments for clear, actionable feedback.
Also in 4 projects that use this
JetBrainsSkillcommits
Use this skill whenever the user asks to commit changes, write or fix a commit message, amend or rename a commit, or do a workflow that includes committing in the IntelliJ repository. This is a thin repo-specific overlay: use IntelliJ commit format, write full commit messages by default, and keep requested suffixes such as IJ-MR trailers in a final separate paragraph.
Also in 3 projects that use this
OpenAISkillrunning-tests
Guide for running tests in the openai-dotnet repository. Use this when asked to run, debug, or validate tests, or when writing new tests. Explains test modes (Playback, Record, Live), how to identify recorded vs non-recorded tests, environment variable configuration, and what to do when recordings are missing or stale.
Also in 3 projects that use this
VercelSkilltechnical-writing
Write, edit, review, or audit user-facing documentation for the eve repository. Use for changes under docs/, documentation tied to eve APIs or CLI behavior, docs work based on Slack or support feedback, and requests to make eve docs clearer, more natural, or less AI-patterned while verifying claims against current source, tests, CLI help, public releases, and repository conventions.
Also in 3 projects that use this
GoogleSkillimprove-codebase-architecture
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
Also in 3 projects that use this
Other versions39 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 39
- remotion-dev/remotion★ 72ksame name
- PostHog/posthog★ 40ksame name
- JetBrains/intellij-community★ 21ksame name
- quarkusio/quarkus★ 16ksame name
- mcp-use/mcp-use★ 11ksame name
- DetachHead/rebased★ 6.5ksame name
- chattocorp/chatto★ 2.9ksame name
- starkware-libs/cairo★ 1.9ksame name
- bholmesdev/hubble.md★ 1.5ksame name
- amplifthq/openmeld★ 1.4ksame name
29 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 repository11 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- brainstormingSkill
- build-phaseSkill
- code-reviewSkill
- debuggingSkill
- online-researchSkill
- security-reviewSkill
- skill-creatorSkill
- skill-reviewerSkill
- software-developmentSkill
- writing-plansSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 39 edited versions we read keep these.
4
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
Test observable behavior, not implementation.
- Distinctive: line 14
Write those tests in the project's framework, following its conventions.
- Distinctive: line 35
Write the list to the checkpoint file before coding tests.
- Very specific: line 42
Keep tests independent and deterministic (no shared mutable state, no real clock/network/random — use test doubles at the seams).
- Distinctive: line 47
Run the tests. In a TDD flow they must fail first for the RIGHT reason, then pass once the code is written.
- Very specific: line 61
Every behavior of the unit has a test across happy/boundary/edge/error.
“Common” is measured: kept by at least 6 in 10 of the 39 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
Writing Tests
Test observable behavior, not implementation. First enumerate the cases that matter, then write them in the project's existing framework and style.
Scope
This skill DOES:
- Enumerate the cases for a unit of behavior (happy / edge / boundary / error).
- Write those tests in the project's framework, following its conventions.
This skill does NOT:
- Implement or refactor the production code → that's
software-development. - Chase a coverage percentage for its own sake → cover behavior and risk.
Workflow
Surface these as TodoWrite items. Checkpoint the case list to
./.claude-skills-work/writing-tests/<unit>/cases.md so it survives interruption.
Step 1 — Identify the unit and its contract
State what the unit should do: inputs, outputs, side effects, and the observable "done" behavior. This is what you test — not private helpers or internal state.
Step 2 — Enumerate cases
For the unit, list cases across these categories (see
references/test-design.md for the techniques):
- Happy path — the main expected behavior(s).
- Boundaries — empty, zero, one, max, off-by-one, first/last.
- Edges — nulls/undefined, unexpected types, duplicates, ordering, unicode.
- Error paths — invalid input, dependency failure/timeout, unauthorized. Write the list to the checkpoint file before coding tests.
Step 3 — Write the tests
- One behavior per test; a clear name that states the expectation ("returns 409 when the email already exists").
- Arrange–Act–Assert; assert on behavior/output, not internal calls, unless the side effect IS the behavior.
- Keep tests independent and deterministic (no shared mutable state, no real clock/network/random — use test doubles at the seams).
- Match the project's framework, file layout, and naming.
Step 4 — Run and confirm
Run the tests. In a TDD flow they must fail first for the RIGHT reason, then pass once the code is written. A test that can't fail tests nothing.
Red flags (stop and correct)
| If you notice… | Do this |
| Testing implementation details / private methods | Test observable behavior instead |
| Only the happy path | Add boundary + error cases before finishing |
| Asserting on mock call counts as the point | Assert on the resulting behavior/output |
| A flaky test (time, network, order) | Inject a test double at the seam; make it deterministic |
| Writing tests to hit a coverage number | Cover behavior and risk, not lines |
| One test asserting many unrelated things | Split into focused tests |
Done when
- Every behavior of the unit has a test across happy/boundary/edge/error.
- Tests are independent, deterministic, clearly named, and run green (or fail correctly first, in TDD).
References (load only when needed)
references/test-design.md— techniques: equivalence partitioning, boundary values, choosing test doubles, and what makes a test valuable.
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.

