Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add khasky/awesome-agent-skills --skill awesome-test-writinggit clone --depth 1 https://github.com/khasky/awesome-agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/khasky/awesome-agent-skills/awesome-test-writing)<a href="https://agentmods.dev/skills/khasky/awesome-agent-skills/awesome-test-writing"><img src="https://agentmods.dev/badge/skills/khasky/awesome-agent-skills/awesome-test-writing/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/khasky/awesome-agent-skills/awesome-test-writing"><img src="https://agentmods.dev/badge/skills/khasky/awesome-agent-skills/awesome-test-writing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Privilege Escalation · line 41 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00049 | $0.02453 |
| Opus 5.5 | $0.00020 | $0.00981 |
| Sonnet 5.5 | $0.00010 | $0.00491 |
| Haiku 4.5 | $0.00005 | $0.00245 |
Grade A, and why
awesome-test-writing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test Writing
Write tests that fail when the behavior breaks and stay green through refactors. The deliverable is not coverage — it is a tripwire: for every realistic way the code under test could regress, at least one test goes red. A test that cannot fail against broken code is documentation wearing a test's costume.
When to Activate
- "Write tests for X", "add coverage", "this module has no tests".
- A bug fix needs its regression test (awesome-bug-fix hands off here).
- A review or audit finding says "needs a test" (awesome-code-review, awesome-security-audit, awesome-dependency-audit).
- Legacy code needs a safety net before a refactor (characterization tests).
Do not activate to review test quality in a diff (awesome-code-review Phase 4 owns that) or to find the root cause of a failure (awesome-bug-fix).
Work Process
- Discover the incumbent setup first — runner, assertion style, fixture/factory conventions, file placement, naming pattern. New tests match the repo's existing shape; never introduce a second test framework or a parallel convention. No runner at all → propose the ecosystem default and wait for approval (it is a new dependency).
- Read the code under test end to end — public seams, inputs, outputs, side effects, error paths. The seam you test through must be one a caller actually uses; needing to export a private function to test it is a design signal to report, not to work around.
- Choose placement by the lowest level that can catch the defect — pure logic gets unit tests; wiring, queries, and contracts get integration tests; only critical user flows get E2E. A bug that a unit test can catch, caught only by an E2E suite, costs 100× per run forever.
- Agree the seams before writing a line of test code — write down which seams the tests will run against (the public entry points, the boundaries you will observe through) and put that list to the user. Nothing gets tested at an unconfirmed seam. You cannot test everything, and agreeing the seams up front is what puts the effort on the critical paths and the complex logic instead of spreading it evenly over every edge case; it also surfaces the disagreement while it is still cheap, rather than after twenty tests exist at the wrong level. Where the shape of the interface is itself the question (how deep the module is, where the seam belongs), the vocabulary is in
awesome-architecture-audit/references/design-vocabulary.md; without that skill installed, agreeing the seam list still binds and only the shared words are missing. - Design the case list before writing code — happy path, boundaries (empty, one, many, max), error paths (invalid input, dependency failure, timeout), and the bug class this code invites (off-by-one in pagination, timezone in date math, race in check-then-act). A guard, catch, fallback or normalization exists because some input once needed it: find that input and make it a case. Reading the code finds the cases, never their answers: each expected value comes from the contract (docs, types, what the caller needs), because a value copied from what the code returns today turns its bug into the test's expectation. For each state or enum value, check it against each consumer with two lists: the values the definition declares, and the branches that actually handle them, with line numbers; a value in the first list and not the second is an untested (often unhandled) case. Write the list down; each case becomes one test with one behavioral focus.
- Write behavior-first — assert observable outcomes through the public seam (return value, state change, emitted event, recorded call), never internals (private fields, call order of helpers). Test name states scenario and expectation ("rejects expired token with 401", not "test token 2").
- Prove every test can fail — run the new test against intentionally broken code (revert the fix, flip the branch, break the constant) and watch it go red, then restore and watch it go green. A regression test is proven both ways: fails without the fix, passes with it. A test that has never failed has proven nothing.
- Run the suite and report — full relevant scope, exit code read, flaky behavior reported (a test passing only on re-run is a defect, not a pass — quarantine and report, never silently retry to green). Report the new tests as passed, failed, errored and skipped, separately: a setup error, a missing fixture, or a skip for a missing dependency is not a pass, and a new test that was skipped proves nothing.
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago Changed 2c1e23d8ee62
- 17d ago Changed · +4 lines 920282521913
- 1mo ago Changed · -73 tokens per session ed99da47b272
- 1mo ago Changed 5db885764d91
- 1mo ago Changed 42c6e3eed912
- 1mo ago Changed · +2 lines · -12 tokens per session 737432ae457d
- 1mo ago First seen · 70 lines · 134 tokens per session scan A 7d31d06557ef
awesome-test-writing is a skill published in the GitHub repository khasky/awesome-agent-skills (21 stars, last pushed 7d ago), licensed MIT. It adds 49 tokens to every session and 2,453 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
aif-test
Run unit, integration, e2e and UI tests with coverage analysis, build verification, visual regression and QA reports.
aif-web-testing
Test web apps with Playwright, Vitest and k6: E2E, unit, integration, load, security, visual and a11y.
browser-testing-with-devtools
Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be…
testing-setup
Analyze and create a testing strategy for Android apps - install testing libraries, set up test infrastructure, create harnesses for unit tests, UI tests, screenshot tests, and end-to-end tests.
test-runner
For a code change, pick the right test tier by change surface, run apc test with baseline diff, and report only NEW reds vs baseline back to the task's acceptance criterion. Separates envblocked from SUT red so a broken machine never fails the code.
designing-tests
Designs and implements testing strategies for any codebase. Use when adding tests, improving coverage, setting up testing infrastructure, debugging test failures, or when asked about unit tests, integration tests, or E2E testing.