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-loopnpx skills add ao92265/claude-code-playbook --skill test-loopgit clone --depth 1 https://github.com/ao92265/claude-code-playbookWhat 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.00152 | $0.01261 |
| Opus 5 | $0.00076 | $0.00630 |
| Sonnet 5 | $0.00030 | $0.00252 |
| Haiku 4.5 | $0.00015 | $0.00126 |
Grade A, and why
test-loop 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 3d 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 — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test Loop
One shared skeleton, two modes. Eliminates wrong-approach / buggy-first-pass friction and regression-on-refactor risk by forcing tests-before-code and CI parity before shipping.
Shared skeleton
- Write tests (mode-specific — see below)
- Commit the tests as a baseline, separate from any behavior change
- Change code in small increments
- Keep tests green after every increment
- Full CI parity gate before PR:
tsc -b && npm test && npm run lint
Mode selection
- Bug report, issue number, "fix X is broken" → bugfix mode
- Rename/restructure/extract/split/upgrade with no intended behavior change → refactor mode
- Ambiguous → ask the user which one before writing anything
Mode: bugfix (failing-test-first)
Phase 1 — RED
- Read issue, reproduce bug locally.
- Write a test that captures expected behavior. Test MUST fail.
- Run
tsc -b && npm test— confirm the test fails for the RIGHT reason (not a compile error, not a wrong assertion). - Commit failing test alone:
test: failing case for #N.
Phase 2 — GREEN
- Implement MINIMAL fix. No refactor, no adjacent cleanup.
- After every edit run full CI parity:
tsc -b && npm test && npm run lint - Loop until all three pass. NEVER skip a step.
- 3 failed attempts → STOP, explain blocker, ask user.
Phase 3 — SHIP
- Commit fix separate from test:
fix: <one line> (#N). git branch --show-currentbefore push.gh pr createreferencing issue.
Mode: refactor (characterization-first)
For refactors with no intended behavior change: renaming/restructuring, splitting a god component, extracting a hook/util, deduping logic, migrating styles/theme without altering rendered output, or a contained library/version upgrade.
Not for: bug fixes (use bugfix mode above), feature adds, or a mechanical rename across files already covered by existing tests.
Step 1 — Identify target + capture surface
Ask the user (if not stated) for:
- Target file/dir
- Public surface to preserve: rendered output, network calls, exposed API, side effects
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.
- 3d ago First seen · 118 lines · 152 tokens per session scan A 37b7ddb0156b
test-loop is a skill published in the GitHub repository ao92265/claude-code-playbook (10 stars, last pushed 16d ago), licensed MIT. It adds 152 tokens to every session and 1,261 once invoked, about $0.0008 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
agent-integration
Run all three agent integration phases sequentially: research, write-tests, and implement using E2E-first TDD (unit tests written last). For individual phases, use /agent-integration:research, /agent-integration:write-tests, or /agent-integration:implement. Use when the user says "integrate agent", "add agent…
engram-testing-coverage
TDD and coverage standards for Engram. Trigger: When implementing behavior changes in any package.
code-assist
Guides implementation of code tasks using test-driven development in an Explore, Plan, Code, Commit workflow. Acts as a Technical Implementation Partner and TDD Coach — following existing patterns, avoiding over-engineering, and producing idiomatic, modern code.
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.
css-design-tdd
Test-driven CSS design system modifications. Run checks before/after CSS changes to verify token usage, variable definitions, fallbacks, and consistency. Use when modifying CSS tokens, fixing design inconsistencies, or auditing CSS architecture.
mobiai-mobile-tdd
You MUST use this before writing any implementation code for a mobile feature, bug fix, refactor, or behavior change. Tests come before implementation — no exceptions.