Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/itaywol/adeptabilitynpx agentmods add skills/itaywol/adeptability/adept-writing-testsWrote 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/itaywol/adeptability/adept-writing-tests)<a href="https://agentmods.dev/skills/itaywol/adeptability/adept-writing-tests"><img src="https://agentmods.dev/badge/skills/itaywol/adeptability/adept-writing-tests.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.00061 | $0.00617 |
| Opus 5 | $0.00030 | $0.00309 |
| Sonnet 5 | $0.00012 | $0.00123 |
| Haiku 4.5 | $0.00006 | $0.00062 |
Grade A, and why
adept-writing-tests 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 7d 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
Writing tests for adept
Defaults
- Table-driven tests with
github.com/stretchr/testify/require. Onet.Run(tc.name, …)per case; name cases for the behavior they pin. - Put unit tests in the same package (
package foo) for white-box access; usepackage foo_testwhen you want to assert only the public surface. - Use
t.TempDir()for any filesystem work — never write into the repo or a shared path. - No network in unit tests. Use
net/http/httptestfor HTTP clients, and the package's interfaces + fakes forgit, the registry, and the LLM provider (see howDepsis wired).
Golden fixtures
Renderers are pinned by golden files in each internal/render/<id>/testdata/. When you
change rendered output on purpose:
- Update the fixture in the same PR.
- Explain why in the commit message.
Never loosen an assertion to make a diff pass — fix the code or update the golden deliberately.
End-to-end tests
cmd/adept/*_test.go build the real binary and drive commands against temp dirs with an
isolated environment:
env := []string{
"PATH=" + os.Getenv("PATH"),
"HOME=" + t.TempDir(), // isolate user config
"ADEPT_LIBRARY=" + libRoot, // isolate the library
}
Guard the slow ones so go test -short skips them:
if testing.Short() { t.Skip("skipping e2e under -short") }
Assert on observable behavior — exit codes, files on disk, stdout/JSON — not internals.
Exit codes: 0 clean · 1 error · 2 drift/dirty or merge conflict.
Run them
go test ./... # fast
go test -race ./... # CI gate
go test -run E2E ./cmd/adept # e2e only
go test -cover ./... # per-package coverage
Coverage gates
Keep ≥80% on internal/render, internal/status, internal/budget, internal/locks, and
internal/canonical. Prefer tests that would actually catch a regression (error paths, edge
cases, round-trips) over coverage-padding happy-path calls.
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.
- 7d ago First seen · 71 lines · 61 tokens per session scan A e6ddc2e7c2dc
adept-writing-tests is a skill published in the GitHub repository itaywol/adeptability (9 stars, last pushed 1mo ago), licensed MIT. It adds 61 tokens to every session and 617 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-31.
Other skills, from other repositories
testing-strategies
Systematic testing for confidence without over-testing — the right test at the right level.
converter-qa
Test harness for validating converter outputs with 284 assertions across all converter muscles.
test-architecture
Test organization, fixtures, factories (factoryboy/faker), test isolation, database cleanup, and test configuration. Use when the user is setting up a test suite, organizing test files, creating test fixtures, or dealing with test isolation issues.
agent-tester
Agent skill for tester - invoke with $agent-tester.
nw-test-organization-conventions
Test directory structure patterns by architecture style, language conventions, naming rules, and fixture placement. Decision tree for selecting test organization strategy.
test-automation
Execute Vitest and Playwright test suites with result collection and failure analysis.