write-tests
Skill1 starsChanged 37 days agoMITView on GitHub
Writes scoped, style-matched tests for one file or function, or tests for PRD acceptance criteria (`FR-3/AC-2`) at the lowest tier that can observe each, E2E only where needed. Triggers: 'write tests for X', 'generate unit tests', 'e2e test for FR-3/AC-2'.
76 other projects use a version of this.
Adopted by
Most recently taken up by
- Doist/todoist-aitheir own version, first seen Nov 9, 2026
- CheckPickerUpper/skillstheir own version, first seen Nov 8, 2026
- Doist/todoist-clitheir own version, first seen Nov 8, 2026
- aniketshukla1/sdlc-kittheir own version, first seen Nov 8, 2026
- helmut-hoffer-von-ankershoffen/heinzeltheir own version, first seen Nov 8, 2026
- unlockers-ai/unlockers-skills-librarytheir own version, first seen Nov 8, 2026
Used with
Projects with it also use close-spec, design-with-images and 10 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.
dzhngSkillclose-spec
When a spec under specs/<feature>/ is done shipping (a write-spec build, or any planned task that produced a spec), archive it to specs/done/ and rewrite it from a build-plan into a durable rationale — the why, the principles, the invariants — pointing back to the real code for the how. Use when implementation has landed and the plan no longer matches what shipped, or the user says a feature/spec is finished. Pairs with [write-spec](../write-spec/SKILL.md) (the plan this closes) and [review](../review/SKILL.md) (run before closing).
Also in 5 projects that use this
dzhngSkilldesign-with-images
Explore UI and visual design with image generation, then iterate the real implementation against the user-selected concept. Use when brainstorming visual directions, offering mockup variants, or implementing an approved generated design; do not stop at the mockups or the first code approximation.
Also in 5 projects that use this
transitive-bullshitSkillcompare-screenshots
Compare screenshots against the intended design, distinguishing approved references from historical baselines. Use for iterative implementation matching, before/after visual review, objective image telemetry, or checking a lone capture for flat, empty, or badly framed content.
Also in 5 projects that use this
LucasMatuszewskiSkillaudit-agents
Audit and maintain agent configuration files (.claude/agents, AGENTS.md, CLAUDE.md, agent-memory). Checks for duplicates, outdated info, naming conflicts, wrong technical facts, and files over 200 lines. Fixes all issues and commits.
Also in 5 projects that use this
wolverin0Skillaudit-decisions
Standardize remediation decisions, baseline-policy entries, and legal-review banners for accepted, deferred, or policy-blocked audit findings.
Also in 4 projects that use this
rhnfzlSkillexplore-unknowns
Walk the user through mapping the unknowns of a task before, during, and after they build it, and hand them a four-quadrant map (settled ground, open decisions, taste, and landmines) they keep. Reach for this eagerly whenever a request is ambiguous or underspecified, the codebase or domain is unfamiliar, the user will "know it when they see it", a reference implementation must be understood before porting, a build-queue or architecture-changing task is about to start, a mid-build deviation needs capturing, or a finished change needs buy-in or verified understanding before merge. Trigger even when the skill is not named: "do a blindspot pass", "find my unknown unknowns", "interview me about this change", "brainstorm the approach for a task I am about to build", "help me scope this", "what am I missing here", "plan this before I build", "I know nothing about X in this codebase". When a territory profile is present it reads memory and the graph first and feeds the map into the build pipeline; without one it degrades to a plain general map. Not for trivial or mechanical tasks with clear acceptance criteria, single-fact lookups, pure debugging of a known symptom, or pure code review, those have their own tools. Do not use it to run the build itself; the map is the deliverable and implementation remains a separate task, whether it has not started or is already underway.
Also in 5 projects that use this
- +5 more from dzhng
Other versions76 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 76
- remix-run/remix★ 33ksame name
- elie222/inbox-zero★ 13ksame name
- getsentry/sentry-javascript★ 8.8ksame name
- dzhng/jevgrep★ 3.2ksame name
- meta-pytorch/OpenEnv★ 2.8ksame name
- huggingface/OpenEnv★ 2.8ksame name
- JamieMason/syncpack★ 2.1ksame name
- dzhng/skills★ 1.5ksame name
- clice-io/clice★ 1.4ksame name
- ryokun6/ryos★ 1.3ksame name
66 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 repository23 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- harness-auditSkill
- skill-benchSkill
- ask-biginSkill
- bigin-harness-setupSkill
- contract-syncSkill
- debug-workflowSkill
- discovery-workflowSkill
- epic-workflowSkill
- flutter-figma-handoffSkill
- go-scaffoldSkill
- knowledge-distillSkill
- model-routerSkill
- napkinSkill
- next-scaffoldSkill
- nodejs-scaffoldSkill
- nuxt-marketing-scaffoldSkill
- nuxt-scaffoldSkill
- nuxt-ui-figma-handoffSkill
- project-scaffoldSkill
- session-handoffSkill
- sprint-distillSkill
- task-workflowSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 6 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 71 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Write tests for the unit named in the request.
- Distinctive: line 29
Scope it: Only test the unit specified.
- Distinctive: line 41
No unnecessary mocking: If the unit under test has no I/O (no DB, no network, no filesystem), do not mock anything — call it directly.
- Very specific: line 53
One assertion concern per test case: Prefer table-driven tests (Go) or describe/it with one behavior per it (TS) over one giant test with …
- Distinctive: line 58
Test framework/library internals (e.g.
- Distinctive: line 60
Add snapshot tests unless explicitly asked.
- Very specific: line 62
Leave TODO or skipped tests without flagging them explicitly.
- Very specific: line 69
Read references/acceptance-to-e2e.md before writing anything on this path — it carries the resolution table, every refusal case, the …
- Very specific: line 77
Stop rather than invent: No PRD, an absent ID, or a Status: withdrawn requirement (statuses are requirement-level.
- Distinctive: line 83
Pick the lowest tier that can observe each criterion: Write an E2E spec only for a criterion that needs the running system.
“Common” is measured: kept by at least 6 in 10 of the 71 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
write-tests
Authoring new test code only — not running an existing suite ("run the tests"), and not general testing-strategy questions.
Two paths, routed on what the request names:
| The request names | Path |
| a file, function, component, or module | the unit path below — the seven steps |
a PRD requirement or criterion ID (FR-3, FR-3/AC-2), or a Given/When/Then criterion quoted inline | the acceptance-criterion → E2E path at the end of this file |
Unit path
Write tests for the unit named in the request. Before writing any test code:
- Find the style reference. Locate the nearest existing test file for this
package/module (sibling
*_test.goor*.test.ts). Match its structure, naming, and assertion style exactly. Do not invent a new pattern. If the repo has a scoped.claude/rules/testing.mdin context, follow it too. - Scope it. Only test the unit specified. Do not expand to cover unrelated functions "while you're in there."
- List edge cases before coding. Print a short bullet list of the cases
you intend to cover (nil/empty input, boundary values, error paths,
concurrency if relevant) and wait for confirmation if the list is longer
than 5 items. When running as a spawned implementer (a subagent such as
worker, with no user to answer), never wait: proceed with the list and include it in your return so the caller can review it. If edge cases were given in the request, use those as the minimum required set — add more only if obviously missing. - No unnecessary mocking. If the unit under test has no I/O (no DB, no network, no filesystem), do not mock anything — call it directly. Only mock at actual I/O boundaries.
- TDD order for anything with business logic (not pure CRUD/plumbing): a. Write the test(s) first. b. Run them and show they fail for the RIGHT reason (not a compile error or missing import). c. Only then write/modify the implementation. d. Run the tests again and iterate until green — don't hand back failing or unrun tests.
- One assertion concern per test case. Prefer table-driven tests (Go)
or
describe/itwith one behavior perit(TS) over one giant test with many unrelated assertions. - Stop conditions — do NOT:
- Test framework/library internals (e.g. "Vue re-renders on state change") — only test the unit's own logic.
- Add snapshot tests unless explicitly asked.
- Generate tests for generated code (openapi types, mocks).
- Leave
TODOor skipped tests without flagging them explicitly.
Report back with: which cases were covered, which were deliberately excluded and why, and the final test run output.
Acceptance-criterion → E2E path
Read references/acceptance-to-e2e.md before writing anything on this path — it carries the
resolution table, every refusal case, the per-profile style discovery, and the run-reporting
rule. The essentials:
docs/product/prd.mdis a fixed, read-only contract. ResolveFR-n/AC-mby reading it; never write it, amend it, or renumber an ID. Quote the criterion into the spec verbatim, never paraphrased, and name its ID there — the same citation style asepic-workflow's step 2.FR-nwith no/AC-mmeans every active criterion under that requirement.- Stop rather than invent. No PRD, an absent ID, or a
Status: withdrawnrequirement (statuses are requirement-level; criteria have none) or criterion → say which, and stop. Never reconstruct a criterion from a requirement title. - Find the repo's own E2E tree; never install one. "The repo's existing E2E style" means the
target repo's, discovered from its
.claude/rules/testing.mdand its existing specs. If the repo has no E2E tier, report that, name the nearest tier it does have, and stop — no Playwright, no Cypress, no inventede2e/directory. - Pick the lowest tier that can observe each criterion. Write an E2E spec only for a criterion that needs the running system; a criterion a unit, component or API/integration test can observe gets that test instead, in the repo's own tier and style. Never one E2E spec per criterion by default: the suite stays small and journey-shaped.
- Never claim green on a spec you did not run. The unit path's TDD order (step 5) does not transfer intact: an E2E spec usually cannot be driven red-then-green locally. Attempt the run, then report its true state — passed, failed, or not run with what running it needs.
- Then report as the unit path does: criteria covered by ID, each with the tier chosen and a one-line reason, criteria deliberately excluded and why, and the run output or the explicit statement that it was not run.
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.

