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 agentmods add skills/kazdenc/builder-skills/test-writenpx skills add kazdenc/builder-skills --skill test-writegit clone --depth 1 https://github.com/kazdenc/builder-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/kazdenc/builder-skills/test-write)<a href="https://agentmods.dev/skills/kazdenc/builder-skills/test-write"><img src="https://agentmods.dev/badge/skills/kazdenc/builder-skills/test-write.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00063 | $0.02065 |
| Opus 5 | $0.00032 | $0.01033 |
| Sonnet 5 | $0.00013 | $0.00413 |
| Haiku 4.5 | $0.00006 | $0.00206 |
Grade A, and why
test-write 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 4d 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 — 240 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Write Tests
Generate tests that catch real bugs and survive refactors. Every test should answer: what behavior breaks if this test fails?
Step 1: Read the Code
Before writing any test, understand the code under test. If the user provides a file or function, read it first.
| What to identify | Why it matters | Watch out for |
|---|---|---|
| Inputs | These become your test parameters | Assuming only happy-path inputs |
| Outputs / return values | These are your assertions | Testing internal state instead of outputs |
| Side effects | These need mocking or verification | Missing async side effects, event emissions |
| Edge cases | These are where bugs hide | null, undefined, empty arrays, boundary values, concurrent calls |
| Error paths | These need explicit test coverage | Only testing success cases |
Step 2: Determine Test Type
Match the code to the right kind of test.
| Code under test | Test type | Tools |
|---|---|---|
| Pure function (util, helper, transformer) | Unit test | Vitest |
| React component | Component test | Vitest + @testing-library/react + @testing-library/user-event |
| React hook | Hook test | Vitest + @testing-library/react (renderHook) |
| API route / server handler | Integration test | Vitest + supertest or direct handler invocation |
| Full user flow (multi-page, auth) | E2E test | Playwright |
| Redux / Zustand store | Unit test | Vitest |
Step 3: Write Tests Using the AAA Pattern
Structure every test as Arrange, Act, Assert. This keeps tests readable and intention-revealing.
describe('functionName', () => {
it('should [expected behavior] when [condition]', () => {
// Arrange — set up inputs and dependencies
const input = { name: 'test', value: 42 };
// Act — call the code under test
const result = functionName(input);
// Assert — verify the output
expect(result).toEqual({ processed: true, name: 'test' });
});
});
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.
- 4d ago First seen · 240 lines · 63 tokens per session scan A be575228c2e2
test-write is a skill published in the GitHub repository kazdenc/builder-skills (44 stars, last pushed 5mo ago), licensed MIT. It adds 63 tokens to every session and 2,065 once invoked, about $0.0003 per session on Opus 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-30.
Other skills, from other repositories
saas-testing
SaaS uygulaması için test stratejisi kur. Vitest ile birim test, Playwright ile E2E test, API route testi, webhook mock, Stripe test modu ve CI entegrasyonu. Bu skill'i kullanıcı test, test yazma, E2E, birim test, Playwright, Vitest, coverage veya kalite güvencesi ile ilgili bir şey istediğinde kullan. "Test yaz"…
testing-conventions
Testing conventions covering unit tests, component tests, and E2E tests. Auto-triggers when writing or modifying test files. Uses Vitest for unit/component tests and Playwright for E2E tests.
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.
verify
Build/launch/drive recipe for verifying apps/docs changes at runtime (demos, docs pages, llms.txt).
prd-auto-test-loop
PRD 驱动的自动化测试编排技能。用于把每版 PRD 的测试计划、AI 自测与自修复、测试报告标准化落地;适用于按验收标准拆分 Unit/Integration/E2E、划分自动化与人工边界、生成版本化 TESTPLAN/TESTREPORT 的场景。.
tanstack-start
Record and replay TanStack Start SSR with test-proxy-recorder. Tag server-side fetches (route loaders, server functions, server routes) with the x-test-rcrd-id session header so parallel replay stays correct. Lead with registerProxyFetch (patch global fetch once at the top of src/router.tsx)…