Borrowing it
Nothing to install: this file belongs to AlexanderMattTurner/agent-glovebox. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/AlexanderMattTurner/agent-glovebox/main/.claude/skills/writing-tests/SKILL.mdgit clone --depth 1 https://github.com/AlexanderMattTurner/agent-gloveboxWrote 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/alexandermattturner/agent-glovebox/writing-tests)<a href="https://agentmods.dev/skills/alexandermattturner/agent-glovebox/writing-tests"><img src="https://agentmods.dev/badge/skills/alexandermattturner/agent-glovebox/writing-tests/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/alexandermattturner/agent-glovebox/writing-tests"><img src="https://agentmods.dev/badge/skills/alexandermattturner/agent-glovebox/writing-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
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 →
- medium Privilege Escalation · line 28 Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
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.00267 | $0.11328 |
| Opus 5.5 | $0.00107 | $0.04531 |
| Sonnet 5.5 | $0.00053 | $0.02266 |
| Haiku 4.5 | $0.00027 | $0.01133 |
Grade B, and why
writing-tests scanned grade B with 2 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 5d 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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
**Never grep the implementation as a proxy for what it does.** `assert "chmod 0444" in script` passes whether or not that line ever runs, breaks on a harmless rename, and stays green against a broken implementation that Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- **A tool that only needs a remote gets a REAL run against a local server — never a `PATH` stub of itself.** Fake the far side, not the thing under your hand: a stub of `gh`/`curl`/`aws` certifies only your reading of i How it starts
The opening of the file, as written. The whole thing — 273 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing Tests
A test earns its place by going red the moment a real defect returns — not by executing lines for a coverage number. Every rule below serves that.
Test behavior, not source text
Never grep the implementation as a proxy for what it does. assert "chmod 0444" in script passes whether or not that line ever runs, breaks on a harmless rename, and stays green against a broken implementation that still contains the token. Instead drive the real code path and assert the observable outcome: run the function or script with the real dependency where one can run (a real git in a scratch repo, a real file tree, the real parser, a real CLI against a local server), or where it genuinely cannot, under a stub that records how it was called (a fake install, docker, id on PATH) — and check what actually happened: the file written and its mode/owner, the argv+env a binary was exec'd with, the exit code, the bytes on stdout/stderr, the state left on disk.
The only legitimate exceptions parse data, not imperative logic: validating a config artifact the product ships and loads at runtime (a settings.json, an execpolicy.rules) with its real parser, or pinning a cross-file structural contract two files must agree on when no single process can observe both. A grep of imperative source to confirm it "does X" is never an exception.
A workflow under .github/workflows/ is imperative source, and this repository's own CI is where that rule broke down. A test that opens a workflow, a .github/scripts/ file or a git hook and searches its text for a step name, a flag, a marker comment or a regex is the banned shape, whatever it asserts. It is why a CI change costs a test change here: the tests pin the machinery's spelling, so a rename reds a suite that no defect reached. What the ban forbids is a search of TEXT nothing parsed. Three moves are allowed. Each reads a model some parser built. Parse the file with yaml.safe_load and assert on the DATA MODEL — a job's needs list, an if: string, a trigger's keys. Read a # required-check: or # memoize: marker through tests/_helpers.required_check_verdicts. That helper resolves the marker per job, never anywhere in the file. For a run: body, read its ARGV through .github/scripts/_shell_scan.commands. Assert on a command's words. A flag is a word, so a reflow or an added quote leaves the read alone. A rename still reds it. Best of all, drive the script the step runs and assert what it did. Two excuses license no text search: the cross-file-contract exception above, and "no single process can observe a workflow at run time". The parsed model IS that single process. "--flag" in run_body is the tell. "--flag" in command.words is not.
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.
- 5d ago Changed · +2 lines 0ded1cffda9e
- 7d ago Changed · +1 lines 726a67c92a27
- 10d ago Changed 25155f62e703
- 11d ago Changed 347283509589
- 12d ago Changed · +4 lines 8b0baf166bca
- 13d ago Changed · +1 lines d602e973c268
- 14d ago Changed · +2 lines ead89d5da3e6
- 15d ago Changed · +1 lines fe5b97b09608
- 18d ago Changed 3a850b111544
- 20d ago First seen · 262 lines · 267 tokens per session scan B f79b3bb8baac
writing-tests is a skill published in the GitHub repository AlexanderMattTurner/agent-glovebox (68 stars, last pushed today), licensed Apache-2.0. It adds 267 tokens to every session and 11,328 once invoked, about $0.0011 per session on Opus 5.5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
testing
Testing: TDD, E2E, preferred patterns, test-value audits, verification, agent testing.
nw-test-design-mandates
Design mandates for acceptance tests - hexagonal boundary, business language abstraction, user journey completeness, pure function extraction, 3 Pillars (domain language / chained narrative / production composition), and the layered ATD discipline (Universe-bound assertion, layer-dependent PBT mode, two-tier…
nw-spike
Runs a timeboxed PROBE to validate one core assumption, then optionally PROMOTES the probe into a walking skeleton — the first e2e thin slice of the feature, committed and demo-able. Use after DISCUSS when the feature involves a new mechanism, performance requirement, or external integration.
nw-ad-critique-dimensions
Review dimensions for acceptance test quality - happy path bias, GWT compliance, business language purity, coverage completeness, walking skeleton user-centricity, priority validation, observable behavior assertions, traceability coverage, and walking skeleton boundary proof.
nw-bdd-methodology
BDD patterns for acceptance test design - Given-When-Then structure, scenario writing rules, pytest-bdd implementation, anti-patterns, and living documentation.
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.