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 jnMetaCode/skillet --skill test-writinggit clone --depth 1 https://github.com/jnMetaCode/skilletWrote 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/jnmetacode/skillet/test-writing)<a href="https://agentmods.dev/skills/jnmetacode/skillet/test-writing"><img src="https://agentmods.dev/badge/skills/jnmetacode/skillet/test-writing.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.1 | $0.00043 | $0.00526 |
| Opus 5 | $0.00022 | $0.00263 |
| Sonnet 5 | $0.00009 | $0.00105 |
| Haiku 4.5 | $0.00004 | $0.00053 |
Grade A, and why
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 8d 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.
What it actually says
test-writing
A test's value is the bug it catches later. Test behavior through the public surface, not implementation details — a good test survives a refactor; a bad one breaks with it.
Procedure
- Match the house style first: open 2–3 existing test files; copy their runner, naming, setup helpers and assertion idioms exactly.
- One behavior per test, named as a claim:
install skips a broken entry and installs the rest— readable as a spec when the suite prints. - Choose cases from the code's branches, not from imagination. Read the
function: every
if, every early return, everycatchis a candidate. Priority order:- the happy path (one test, not five variations)
- each error/edge branch (empty input, missing file, duplicate, too-long, zero/negative, unicode)
- the bug you just fixed (regression test that fails without the fix — verify it actually fails by stashing the fix once)
- Real objects over mocks. Mock only true boundaries (network, clock,
randomness). If a test needs four mocks, the unit is wrong — test one level
higher. For clock/randomness, inject (
now,seed) rather than patching globals. - Make failure diagnosable: assert on specific values, not just
truthiness; add a message when the assertion isn't self-explanatory
(
assert.ok(hit1 >= 0.88, 'ranking change regressed recall')). - Independence: each test builds its own state (tmp dirs via
mkdtemp, fresh fixtures) and cleans up. Order-dependence is a flake factory.
Anti-patterns
- Asserting a function was called instead of what it did.
- Snapshot tests for logic (they assert "nothing changed", not "it's correct").
- Testing private helpers directly — route through the public API.
- A test that can't fail (asserting the mock you just configured).
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.
- 8d ago First seen · 45 lines · 43 tokens per session scan A e7ec70cf8a48
test-writing is a skill published in the GitHub repository jnMetaCode/skillet (1 stars, last pushed 2mo ago), licensed MIT. It adds 43 tokens to every session and 526 once invoked, about $0.0002 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-31.
Other skills, from other repositories
llm-evaluator
Evaluate LLM outputs systematically using LLM-as-judge, human evaluation frameworks, and regression testing. Use when assessing model quality, comparing models, or preventing quality regression.
test-writer
How to write pytest tests for modules in this workspace. Load whenever you are about to write or extend tests.
testing-llm
LLM and AI testing patterns — mock responses, evaluation with DeepEval/RAGAS, structured output validation, and agentic test patterns (generator, healer, planner). Use when testing AI features, validating LLM outputs, or building evaluation pipelines.
golden-dataset
Golden dataset lifecycle patterns for curation, versioning, quality validation, and CI integration. Use when building evaluation datasets, managing dataset versions, validating quality scores, or integrating golden tests into pipelines.
testing-patterns
Redirect — testing-patterns was split into 5 focused sub-skills. Use when looking for testing-patterns, writing tests, or test automation. Redirects to testing-unit, testing-e2e, testing-integration, testing-llm, or testing-perf.
deepeval
Use when discussing or working with DeepEval (the python AI evaluation framework).