tdd-guide

tdd-guide is a cursor rule for coding agents from ulises-jeremias/agent-toolkit. It costs 1,240 tokens per session, scanned A, original, MIT.

A guide for Test-Driven Development, a method where you write a failing test first, make it pass, and then improve the code. It focuses on tests that describe user-visible behavior.

In plain words
What is it for?
Use it when a task requires test-first development, behavior specifications, test doubles, or coverage before implementation. It is meant to be called when needed, not for every task.
Why use it?
It helps prevent implementation work from skipping important tests or writing tests only after the code is finished.

Cursor rule

Install

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.

agentmods
npx agentmods add rules/ulises-jeremias/agent-toolkit/tdd-guide
Clone the repo
git clone --depth 1 https://github.com/ulises-jeremias/agent-toolkit

Wrote 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.

agentmods badge for tdd-guide

README.md
[![agentmods](https://agentmods.dev/badge/rules/ulises-jeremias/agent-toolkit/tdd-guide.svg)](https://agentmods.dev/rules/ulises-jeremias/agent-toolkit/tdd-guide)
Your own site
<a href="https://agentmods.dev/rules/ulises-jeremias/agent-toolkit/tdd-guide"><img src="https://agentmods.dev/badge/rules/ulises-jeremias/agent-toolkit/tdd-guide.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,240 This file is loaded in full into every session.
When invoked 1,240 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.01240 $0.01240
Opus 5 $0.00620 $0.00620
Sonnet 5 $0.00248 $0.00248
Haiku 4.5 $0.00124 $0.00124

Measured 4d ago against content hash 66eb522a2a23, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tdd-guide 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 4d 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.

plugins/agent-toolkit-agents/rules/tdd-guide.mdc · 103 lines

How it starts

The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.


name: tdd-guide description: Test-Driven Development specialist — enforces red-green-refactor with AAA, test doubles and behavior-first coverage. Use when implementer delegates test-first discipline or task explicitly requires TDD; opt-in via holistic caller — not a daily entry point. tools: Read, Grep, Glob, Bash kind: specialist

You are tdd-guide at agent-toolkit — the opt-in TDD discipline specialist. You enforce the red-green-refactor cycle with independent context, not inline implementation.

Agent vs skill rule — why agent (cite clause)

  • Separate context + focused lifecycle + explicit handoff + different model profile (discipline enforcement): TDD requires sustained independent discipline distinct from implementer's delivery loop; isolating the failing-test-first mindset prevents the implementer from skipping red. Benefits from parallel/independent verification. Decision: KEEP AS SPECIALIST.

When to use vs holistic

  • Use this specialist when task AC requires test-first, coverage-before-code, or behavior-specification via failing test and the implementer delegates per delivery/development-workflow or explicit user request for TDD. Invoked as Assistant → Implementer → TDD Guide (see docs/AGENT_TAXONOMY.md §5).
  • Use implementer directly for trivial fixes, spikes, or when tests follow implementation; do not invoke this specialist mechanically on every task.

Caller / skills / handoff

  • Caller (holistic owner): implementer (canonical) via delivery/task + delivery/development-workflow; assistant routes proportionally. qa-engineer may delegate for test-design review. See capabilities/skills/registry.yaml holistic_owner: implementer (shared capability, this specialist is opt-in technique).
  • Skills used: delivery/development-workflow (TDD guidance), delivery/task (AC), quality/deslop via reviewer during refactor phase.
  • Expected handoff: Returns red (failing test) → green (minimum code) → refactor evidence to implementer; implementer validates build/test loop and hands to reviewer/qa-engineer — never self-approves.

Read the full file on GitHub · 103 lines

Changes

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.

  1. 4d ago First seen · 103 lines · 1,240 tokens per session scan A 66eb522a2a23

Subscribe to this mod's changes

tdd-guide is a cursor rule published in the GitHub repository ulises-jeremias/agent-toolkit (16 stars, last pushed 5d ago), licensed MIT. It adds 1,240 tokens to every session, about $0.0062 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.

Related

Other cursor rules, from other repositories

test-case-to-katalon-studio

Convert Katalon True Platform/TestOps manual test cases into Katalon Studio automation inside a local Studio Test Project checkout. Use when you need to author or extend a .tc test case file and its paired Groovy script under Scripts/, keep test case variable GUIDs consistent with the .ts test suite bindings that read…

katalon-labs/true-skills · 195 tokens

solana-transaction-safety

Safe Solana transaction submission patterns using Helius Sender.

helius-labs/core-ai · 390 tokens

execute-test

Execute Katalon True Platform/TestOps tests when the input is an existing test case, manual test case list, test suite, suite collection, execution request, or "run with AI" instruction. Use when you need to create a manual test run, start Run with AI, poll AI session results, schedule automated suites, read…

katalon-labs/true-skills · 136 tokens

test-maintenance

Maintain and evolve a Katalon True Platform/TestOps regression suite as the application changes. Use when you need to detect which tests broke or became flaky from stability and result history, diagnose whether a case needs repair vs regeneration, repair test assets (update, move, reorganize cases), refresh coverage…

katalon-labs/true-skills · 131 tokens

test-review

Review Katalon True Platform/TestOps test quality and coverage before tests enter the delivery pipeline. Use when you need to check whether a suite is ready to run, review requirement and configuration coverage, assess test-case quality and flakiness/stability, spot weak or unreliable cases, and produce a review…

katalon-labs/true-skills · 126 tokens

cursorrules

You are assisting the Orbital engineering team — 5 backend engineers building a multi-tenant SaaS for logistics operations. TypeScript monorepo using NestJS, PostgreSQL (drizzle-orm), and BullMQ. All engineers use shared conventions.

caioribeiroclw-pixel/pluribus · 829 tokens