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 saski/arnesto --skill test-doubles-firstgit clone --depth 1 https://github.com/saski/arnestoWrote 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/saski/arnesto/test-doubles-first)<a href="https://agentmods.dev/skills/saski/arnesto/test-doubles-first"><img src="https://agentmods.dev/badge/skills/saski/arnesto/test-doubles-first/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/saski/arnesto/test-doubles-first"><img src="https://agentmods.dev/badge/skills/saski/arnesto/test-doubles-first.svg" alt="Reviewed on agentmods" width="80" 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.00058 | $0.00768 |
| Opus 5.5 | $0.00023 | $0.00307 |
| Sonnet 5.5 | $0.00012 | $0.00154 |
| Haiku 4.5 | $0.00006 | $0.00077 |
Grade A, and why
test-doubles-first 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 2mo 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 — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test Doubles First
Quick Navigation
- Goal
- Default Rule
- Decision Tree
- Naming and Placement
- Style Constraints
- What Can Be Doubled
- Quick PR Smell Check
- Minimal Templates
Goal
Write tests that describe behavior and state, not implementation details. Avoid mock-by-default.
Default Rule
- Prefer state/output assertions first.
- Choose the lightest double that makes the test clear.
- Use mocks only when interaction contract is the behavior under test.
Decision Tree
- Can the test assert state (persisted data, returned value, emitted event)?
- Yes -> use a
Fake(in-memory or lightweight real implementation). - No -> continue.
- Yes -> use a
- Do you need to force a branch (success/failure/timeout) with controlled responses?
- Yes -> use a
Stub. - No -> continue.
- Yes -> use a
- Do you need to observe an outbound effect (email, message, metrics) without prescribing internal construction?
- Yes -> use a
Spy. - No -> continue.
- Yes -> use a
- Do you need to verify interaction contract (never called, called once, call order/protocol)?
- Yes -> use a
Mock, with minimal expectations.
- Yes -> use a
If one test needs many interaction expectations, treat it as a design smell and raise the abstraction of the port.
Naming and Placement
- Names
FakeXxxRepo,InMemoryXxxRepoStubXxxGateway,FailingXxxStub,FixedClockStubSpyXxxPublisher,SpyEmailServiceMockXxxClientonly for contract-driven tests
- Paths (cross-platform style)
- Python:
tests/doubles/ - TypeScript:
test/doubles/or__tests__/doubles/
- Python:
Always use forward slashes in paths.
Style Constraints
- Prefer state/output assertions over
called_withassertions. - For spies, assert only relevant facts (for example count, recipient, subject).
- Keep stubs configurable per scenario; do not build mini-systems.
- Keep fakes honest to domain invariants; add contract tests for real adapters when needed.
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 2mo ago First seen · 81 lines · 58 tokens per session scan A febddf29ef87
test-doubles-first is a skill published in the GitHub repository saski/arnesto (7 stars, last pushed 5d ago), licensed Unlicense. It adds 58 tokens to every session and 768 once invoked, about $0.0002 per session on Opus 5.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-09-03.
test-doubles-first compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| test-doubles-firstsaski/arnesto | Skill | 7 | 5d ago | Unlicense | A | 58 | Claude Code, Codex |
| nemo-automodel-model-onboardingNVIDIA/skills | Skill | 4.2k | today | Apache-2.0 | A | 33 | Claude Code |
| nemo-automodel-recipe-developmentNVIDIA/skills | Skill | 4.2k | today | Apache-2.0 | A | 31 | Claude Code |
| mcore-testingNVIDIA/skills | Skill | 4.2k | today | Apache-2.0 | A | 38 | Claude Code |
| i4h-catheter-navigation-e2eNVIDIA/skills | Skill | 4.2k | today | Apache-2.0 | A | 49 | Claude Code, Codex |
| test-harnessMathews-Tom/armory | Skill | 346 | 7d ago | MIT | A | 65 | Claude Code |
| test-reviewsd0xdev/sd0x-harness | Skill | 196 | 6d ago | MIT | A | 56 | Claude Code |