write-tests
Skill1 starsChanged 7 months agoMITView on GitHub
Write unit, integration, component, and end-to-end tests for code. Use when the user asks to "write tests", "add tests", "add test coverage", or "create test cases" for functions, services, components, CLIs, or user flows.
33 other projects use a version of this.
Adopted by
Most recently taken up by
- dzhng/skillstheir own version, first seen Oct 4, 2026
- dzhng/jevgreptheir own version, first seen Oct 2, 2026
- dzhng/duet-agenttheir own version, first seen Oct 2, 2026
- aprameyak/coding-skillstheir own version, first seen Oct 2, 2026
- getsentry/sentry-javascripttheir own version, first seen Sep 27, 2026
- NarekManukyan/flutter-mobx-kittheir own version, first seen Sep 17, 2026
Used with
Projects with it also use audit-choices, close-spec 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.
dzhngSkillaudit-choices
Audit the choices an implementing agent made, not its diff — a pure decision audit that traces the session's history into a choices ledger, changes no code, and never blocks an unsupervised run. Working code still embeds architecture the user never chose; surface it because future work inherits it. Use when the user wants to review the decisions the AI made on their behalf, before merging or committing AI-implemented work, when integrating a delegated subagent's pass, or when a fix "works" but might be a point fix.
Also in 3 projects that use this
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 3 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 3 projects that use this
Halcyon666Skillwrite-skills
Creates high-quality Agent Skills (SKILL.md files) that follow the open Agent Skills specification. Use when asked to create a skill, write a SKILL.md, package agent instructions, build a reusable capability, or turn a workflow into a shareable skill. Produces spec-compliant, concise, well-structured skills optimized for agent discovery and execution.
Also in 3 projects that use this
isLinXuSkilleval-skills
AI Agent Skill unit testing framework. A framework-agnostic toolkit for discovering, scaffolding, selecting, evaluating, and reporting on AI skills. Use this skill to assess skill quality before production, compare candidate skills on the same benchmark, enforce quality gates in CI/CD, and generate human-readable evaluation reports.
Also in 3 projects that use this
TrecekSkillaudit-tests
Audit the test suite for useless tests, consolidation opportunities, over-mocking, weak assertions, and other test quality issues. Use when user says "audit tests", "audit test suite", "review tests", or "test quality check". Generates an improvement plan in temp/ with explanations for each proposed change.
Also in 3 projects that use this
- +6 more from dzhng
Other versions33 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 33
- getsentry/sentry-javascript★ 8.8ksame name
- huggingface/OpenEnv★ 2.6ksame name
- dzhng/jevgrep★ 2.3ksame name
- NeoLabHQ/context-engineering-kit★ 1.7ksame name
- dzhng/skills★ 978same name
- microsoft/semantic-link-labs★ 584same name
- atherio-danp/cde-dotnetcc★ 109same name
- getsentry/abacus★ 77same name
- alamops/skills★ 52same name
- dzhng/duet-agent★ 46same name
23 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 repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- architectSkill
- arenaSkill
- autopilotSkill
- blast-radiusSkill
- brainstormSkill
- clarifySkill
- code-reviewSkill
- debug-errorSkill
- diagram-designSkill
- explain-codeSkill
- java-coderSkill
- owasp-securitySkill
- pdfSkill
- pretty-mermaidSkill
- refactor-codeSkill
- reflectSkill
- skill-hunterSkill
- teachSkill
- technical-writingSkill
- test-coverageSkill
- typesafe-aiSkill
- typescript-coderSkill
- unslopSkill
- wrongSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. 0 are common, 15 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 31 edited versions we read keep these.
15
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 9
Write the appropriate unit, integration, component, and end-to-end tests: $ARGUMENTS
- Distinctive: line 13
Follow these steps in order:
- Distinctive: line 33
Follow repository coverage thresholds and use coverage to identify consequential gaps rather than gaming a universal percentage
- Distinctive: line 41
Test cohesive units through the smallest stable public or package boundary.
- Very specific: line 43
Follow the AAA pattern (Arrange / Act / Assert) — use blank lines to separate phases, never write // Arrange comments
- Distinctive: line 44
Use descriptive test names that explain the scenario being tested
- Distinctive: line 45
Keep each test focused on one behaviour.
- Distinctive: line 48
Test real interactions among application-owned components and controlled dependencies such as in-process APIs, test databases, sandboxes, …
- Distinctive: line 49
Do not contact production or uncontrolled live third-party services by default
- Distinctive: line 50
Verify data flow across meaningful layer boundaries
- Distinctive: line 55
Keep critical cross-boundary flows in E2E tests and lower-level edge cases in faster tests
- Distinctive: line 60
Avoid over-mocking — if a mock replicates production logic, use a real object instead
- Distinctive: line 61
Use factories or builders for complex test data.
- Distinctive: line 62
Ensure tests are isolated — no shared mutable state between cases
- Distinctive: line 65
Async code: use the framework's async test utilities.
- Distinctive: line 67
UI: test rendered output, keyboard navigation, and ARIA semantics where relevant
“Common” is measured: kept by at least 6 in 10 of the 31 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
Write the appropriate unit, integration, component, and end-to-end tests: $ARGUMENTS
Process
Follow these steps in order:
- Understand the project's test conventions
- Identify the language, runtime, package boundary, and every test runner relevant to the requested tests
- Inspect dependencies, imports, runner configuration, package scripts, setup files, CI commands, and representative existing tests
- Load every matching language and runner reference that exists:
references/junit.mdreferences/typescript.mdreferences/vitest.mdreferences/jest.mdreferences/node-test.mdreferences/bun-test.mdreferences/playwright.md
- In monorepos and migrations, determine runner ownership per package and test file; do not assume one runner governs the repository
- Repository conventions and installed-version behavior override greenfield defaults
- Analyse the code under test
- Identify the public interface and critical business logic
- Map dependencies and external interactions
- Note error conditions, edge cases, and validation rules
- Follow repository coverage thresholds and use coverage to identify consequential gaps rather than gaming a universal percentage
- Plan the test strategy
- Decide which levels are needed: unit, integration, end-to-end
- List what to mock or stub, and why
- Prioritise business-critical paths first
- Write unit tests
- Test cohesive units through the smallest stable public or package boundary; tests do not need to map one-to-one to functions or methods
- Cover relevant happy paths, edge cases, boundary conditions, and error/exception paths
- Follow the AAA pattern (Arrange / Act / Assert) — use blank lines to separate phases, never write
// Arrangecomments - Use descriptive test names that explain the scenario being tested
- Keep each test focused on one behaviour; avoid assertions on unrelated state
- Write integration tests
- Test real interactions among application-owned components and controlled dependencies such as in-process APIs, test databases, sandboxes, or contract servers
- Do not contact production or uncontrolled live third-party services by default
- Verify data flow across meaningful layer boundaries
- Cover failure modes and partial failures, not just the happy path
- Write component or end-to-end tests when needed
- Exercise observable user behavior through framework-supported test APIs
- Keep critical cross-boundary flows in E2E tests and lower-level edge cases in faster tests
- Preserve accessibility, isolation, cleanup, and supported runtime/browser coverage
- Mocking and test data
- Mock external dependencies to keep unit tests fast and deterministic
- Avoid over-mocking — if a mock replicates production logic, use a real object instead
- Use factories or builders for complex test data; keep setup out of assertion code
- Ensure tests are isolated — no shared mutable state between cases
- Apply applicable specialist concerns
- Async code: use the framework's async test utilities; test both resolution and rejection
- Security: cover auth checks, input validation, and access control boundaries
- UI: test rendered output, keyboard navigation, and ARIA semantics where relevant
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.

