adept-writing-tests

adept-writing-tests is a skill for Claude Code from itaywol/adeptability. It costs 61 tokens per session (617 once invoked), scanned A, original, MIT.

A testing guide for the adept Go codebase, covering table-driven tests, fixtures, end-to-end tests, and isolated temporary environments.

In plain words
What is it for?
Use it when adding or changing Go tests, including unit tests, rendered-output fixtures, and tests that run the real command-line program.
Why use it?
It helps tests follow the repository’s conventions and avoid changing shared files, user settings, or making network calls.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is go test -run E2E ./cmd/adept # e2e only.

Good fit Use it when adding or changing Go tests, including unit tests, rendered-output fixtures, and tests that run the real command-line program.

Compare 6 skills from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/itaywol/adeptability
agentmods
npx agentmods add skills/itaywol/adeptability/adept-writing-tests

Made for: Claude Code.

Wrote 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.

agentmods badge for adept-writing-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/itaywol/adeptability/adept-writing-tests.svg)](https://agentmods.dev/skills/itaywol/adeptability/adept-writing-tests)
Your own site
<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>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 617 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 7d ago against content hash e6ddc2e7c2dc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

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.

.adeptability/base/adept-writing-tests/SKILL.md · 71 lines

What it actually says

Writing tests for adept

Defaults

  • Table-driven tests with github.com/stretchr/testify/require. One t.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; use package foo_test when 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/httptest for HTTP clients, and the package's interfaces + fakes for git, the registry, and the LLM provider (see how Deps is wired).

Golden fixtures

Renderers are pinned by golden files in each internal/render/<id>/testdata/. When you change rendered output on purpose:

  1. Update the fixture in the same PR.
  2. 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.

Changes

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.

  1. 7d ago First seen · 71 lines · 61 tokens per session scan A e6ddc2e7c2dc

Subscribe to this mod's changes

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.