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/bostonaholic/rpikit/test-driven-developmentnpx skills add bostonaholic/rpikit --skill test-driven-developmentgit clone --depth 1 https://github.com/bostonaholic/rpikitWrote 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/bostonaholic/rpikit/test-driven-development)<a href="https://agentmods.dev/skills/bostonaholic/rpikit/test-driven-development"><img src="https://agentmods.dev/badge/skills/bostonaholic/rpikit/test-driven-development.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.1 | $0.00042 | $0.01275 |
| Opus 5 | $0.00021 | $0.00638 |
| Sonnet 5 | $0.00008 | $0.00255 |
| Haiku 4.5 | $0.00004 | $0.00128 |
Grade A, and why
test-driven-development 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 6d 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 — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test-Driven Development
Write tests first, then implementation. No production code without a failing test.
Purpose
TDD ensures code correctness through disciplined test-first development. Tests written after implementation prove nothing - they pass immediately, providing no evidence the code works correctly. This skill enforces the RED-GREEN-REFACTOR cycle as a non-negotiable practice.
The Iron Law
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST.
If you write code before the test, you must delete it and start over. The test drives the implementation, not the other way around.
The Cycle
RED: Write a Failing Test
Write ONE minimal test that demonstrates the required behavior:
- Test the public interface, not internals
- Never mock what you can use for real
- Name the test to describe the behavior
- Run the test - it MUST fail
Mandatory verification:
Run the test. Confirm it fails for the RIGHT reason:
- Missing function/method (expected)
- Wrong return value (expected)
- NOT: Syntax error
- NOT: Import error
- NOT: Test framework misconfiguration
If the test passes immediately, you've written it wrong or the feature already exists. Investigate before proceeding.
GREEN: Write Minimal Code
Write the SIMPLEST code that makes the test pass:
- No extra features
- No premature optimization
- No "while I'm here" additions
- Just enough to satisfy the test
Mandatory verification:
Run the test. Confirm:
- The new test passes
- All other tests still pass
- No new warnings or errors
REFACTOR: Improve Without Breaking
Improve code quality while keeping tests green:
- Remove duplication
- Improve names
- Extract helpers
- Simplify logic
After each change:
Run all tests. They must still pass.
If any test fails, revert the refactor.
Cycle Example
Requirement: Function that validates email addresses
RED:
Write test: expect(isValidEmail("[email protected]")).toBe(true)
Run test: FAIL - isValidEmail is not defined
Correct failure reason: function doesn't exist yet
GREEN:
Write: function isValidEmail(email) { return true; }
Run test: PASS
All tests pass
RED:
Write test: expect(isValidEmail("invalid")).toBe(false)
Run test: FAIL - Expected false, got true
Correct failure reason: no validation logic yet
GREEN:
Write: function isValidEmail(email) { return email.includes("@"); }
Run test: PASS
All tests pass
REFACTOR:
Extract regex pattern to constant
Run tests: PASS
Continue improving...
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.
- 6d ago First seen · 206 lines · 42 tokens per session scan A abc04e23ad2d
test-driven-development is a skill published in the GitHub repository bostonaholic/rpikit (20 stars, last pushed 5d ago), licensed MIT. It adds 42 tokens to every session and 1,275 once invoked, about $0.0002 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-30.
Other skills, from other repositories
contract
Outcome-driven Cortex function development — declares a behavioral contract before generation begins, enforces evidence-tiered proof before $ship, and defends against the self-oracle evaluation failure mode.
ap-policies
Attach a completion policy gate (shell check or judge-agent rubric) to a session or fan-in group so turn-end only passes when the gate is green, then optionally auto-commit pending human ack. Use when the user says "gate this session on tests passing", "attach a policy", "commit only if tests are green", "judge…
pn-writing-skills
Applies TDD to skill authoring: validation scenarios first, then SKILL.md. Use when creating new skills, editing existing skills, or verifying skills work before deployment.
pn-systematic-debugging
Root cause analysis with triage mode — Phase 0 feedback loop, investigate first, one question max, then isolate, hypothesize, confirm. Outputs TDD fix plan with RED-GREEN cycles; optional GitHub issue via GitHub MCP. Use when debugging a failure or bug.
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code.
pn-discipline-philosophy
Defines engineering discipline: test-first, root-cause before fix, minimal change, measure-before-optimize, review/second look, evidence over guess. Use when implementing features, debugging, planning, or establishing development practices. Aligns with TDD, systematic debugging, and RCA practices (current).