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 rules/kaelsensei/magicaibuilder/tdd-skillgit clone --depth 1 https://github.com/KaelSensei/MagicAIBuilderWrote 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/rules/kaelsensei/magicaibuilder/tdd-skill)<a href="https://agentmods.dev/rules/kaelsensei/magicaibuilder/tdd-skill"><img src="https://agentmods.dev/badge/rules/kaelsensei/magicaibuilder/tdd-skill.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.00642 | $0.00642 |
| Opus 5 | $0.00321 | $0.00321 |
| Sonnet 5 | $0.00128 | $0.00128 |
| Haiku 4.5 | $0.00064 | $0.00064 |
Grade A, and why
tdd-skill 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 — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TDD Skill
TDD follows Kent Beck's short feedback loop. With an AI agent, the Green step is more deliberate: do not ask for intentionally dirty code and plan a cleanup pass. Ask for the smallest production-quality implementation that satisfies the test, then reserve deeper design changes for a separate refining refactor.
Cycle: Red -> Super Green -> Refining Refactoring
1. Red
- State one observable behavior and one reason it matters.
- Add the smallest deterministic test that expresses that behavior.
- Run that focused test and confirm it fails for the expected reason.
The test is the scope boundary. Do not add future enum values, factories, interfaces, abstractions, or error cases that no current test requires.
2. Super Green
Implement only enough behavior to pass the new test and preserve existing tests. The implementation should already be production-clean in its local context:
- Use names, boundaries, and placement that are correct now.
- Keep the diff small and avoid speculative generalization.
- Follow the project's type, error-handling, accessibility, and performance rules.
- Preserve the existing public contract unless the test explicitly changes it.
Super Green does not mean advanced design or skipping the TPP. Progress behavior in small steps: constant -> scalar -> invariant -> conditional -> loop. Clean code and behavioral complexity are separate axes.
3. Refining Refactoring
Refactor only after the focused and regression tests are green. Keep behavior unchanged, make one coherent design improvement at a time, and rerun the tests after each meaningful step. Refactoring may deepen the design, clarify a domain boundary, or remove duplication; it is not a required second pass for code that was deliberately written badly.
Test Boundary
Prefer sociable tests at the stable public boundary: a use case, route handler, store action, or component behavior with real in-process collaborators. Verify observable outcomes rather than private calls or implementation details.
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 · 74 lines · 642 tokens per session scan A ce5f915bf5db
tdd-skill is a cursor rule published in the GitHub repository KaelSensei/MagicAIBuilder (2 stars, last pushed 3d ago), licensed MIT. It adds 642 tokens to every session, about $0.0032 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 cursor rules, from other repositories
tdd-domain
TDD contract for business logic.
server-actions
Server Action, service and tenancy contract.
project
Product, stack and layer contract. Always applies.
ui-design-system
UI, design tokens and mobile-first rules.
performance
Navigation, caching and PWA contract.
prisma-schema
Prisma schema and migration conventions.