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 agentmods add skills/ao92265/claude-code-playbook/test-firstnpx skills add ao92265/claude-code-playbook --skill test-firstgit clone --depth 1 https://github.com/ao92265/claude-code-playbookWrote 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/ao92265/claude-code-playbook/test-first)<a href="https://agentmods.dev/skills/ao92265/claude-code-playbook/test-first"><img src="https://agentmods.dev/badge/skills/ao92265/claude-code-playbook/test-first.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 | $0.00081 | $0.00647 |
| Opus 5 | $0.00041 | $0.00324 |
| Sonnet 5 | $0.00016 | $0.00129 |
| Haiku 4.5 | $0.00008 | $0.00065 |
Grade A, and why
test-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 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.
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 — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test-First Development
Enforce the Red-Green-Refactor cycle. Tests define the contract before implementation begins.
Steps
-
Understand the requirement:
- Clarify what the feature/fix should do
- Identify inputs, outputs, edge cases, and error conditions
- Ask clarifying questions if the spec is ambiguous
-
Write failing tests (RED):
- Create test file(s) if they don't exist
- Write test cases that define expected behavior
- Include happy path, edge cases, and error cases
- Tests should be specific and descriptive — test names explain the contract
-
Confirm tests fail for the right reason (NON-NEGOTIABLE):
- Run the test suite:
npm test,pytest,go test, etc. - Verify failures are "function not found" or "wrong return value" — not syntax errors
- If tests fail for the wrong reason, fix the test first
- Never skip this step. Tests that go green on first run are tautological or mocked the behavior under test. A test you never watched fail is theater, not verification.
- Run the test suite:
-
Implement minimum code to pass (GREEN):
- Write the simplest code that makes all tests pass
- Do not optimize or generalize yet
- Do not add code that isn't required by a test
-
Confirm all tests pass:
- Run the full test suite
- All new tests must be green
- All existing tests must still pass (no regressions)
-
Refactor (REFACTOR):
- Clean up implementation while keeping tests green
- Extract helpers, rename variables, simplify logic
- Run tests after each refactoring step
-
Final verification:
- Run full test suite one last time
- Run type checker / linter if applicable
- Show the user the test results and implementation summary
Important
- Never skip the RED step. If you can't write a failing test first, you don't understand the requirement well enough.
- Never write implementation before tests exist. The test defines the contract.
- Keep tests fast. Prefer unit tests over integration tests where possible.
- One behavior per test. Each test should verify exactly one thing.
- Test names are documentation. Use descriptive names:
should_return_404_when_user_not_found.
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 First seen · 67 lines · 81 tokens per session scan A f2ac92fe1d82
test-first is a skill published in the GitHub repository ao92265/claude-code-playbook (10 stars, last pushed 18d ago), licensed MIT. It adds 81 tokens to every session and 647 once invoked, about $0.0004 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
engram-testing-coverage
TDD and coverage standards for Engram. Trigger: When implementing behavior changes in any package.
nunit-testing
Use when writing or modifying tests in NUnit's own test projects, or when making a behavioral change to production code that needs test coverage. Covers test structure, attribute choice, helper visibility, platform guards, and which test projects are real.
tdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
strict-tdd
Strict RED->GREEN->REFACTOR test-driven development with enforcement. Never write production code before a failing test. Atomic commits per TDD cycle.
tdd
This skill should be used when the user wants to implement features or fix bugs using test-driven development. Enforces the RED-GREEN-REFACTOR cycle with vertical slicing, context isolation between test writing and implementation, human checkpoints, and auto-test feedback loops. Uses multi-agent orchestration with the…
conductor-implement
Execute tasks from a track's implementation plan following TDD workflow.