tdd-guide

tdd-guide is a cursor rule for Cursor 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 for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit 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.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/ulises-jeremias/agent-toolkit/tdd-guide
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.

Clone the repo
git clone --depth 1 https://github.com/ulises-jeremias/agent-toolkit

Made for: Cursor.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tdd-guide

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.01240 $0.01240
Opus 5.5 $0.00496 $0.00496
Sonnet 5.5 $0.00248 $0.00248
Haiku 4.5 $0.00124 $0.00124

Measured 1mo ago against content hash 66eb522a2a23, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (19 stars, last pushed today), licensed MIT. It adds 1,240 tokens to every session, about $0.0050 per session on Opus 5.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

always-on

Spec-driven Spring Boot 4 — global guardrails that compensate for Windsurf's lack of a pre-tool-use hook.

loiane/specs-driven-development-spring-angular · 24 tokens

production-code

Production code rule — TDD precondition + Spring Boot 4 conventions.

loiane/specs-driven-development-spring-angular · 0 tokens

exploratory-charter

Write, run, and debrief exploratory testing charters against Katalon True Platform/TestOps when there is no script to follow. Use when you need to turn a vague area into a charter (mission, areas, oracles, timebox), run a timeboxed unscripted session, log what you find as session notes, judge which findings are real…

katalon-labs/true-skills · 150 tokens

test-estimation

Estimate testing effort, duration, and resourcing for a Katalon True Platform/TestOps cycle. Use when the question is how long testing will take, how many testers it needs, whether the scope fits the sprint window, or what a scope change costs in person-hours. Sizes design, manual execution, automated execution and…

katalon-labs/true-skills · 194 tokens

incremental-verify

Verify each behavior before building the next. One test, one implementation, one commit. No bulk-writing tests for behavior that does not yet exist.

rohitg00/pro-workflow · 352 tokens

upload-report

Run automation and upload or verify Katalon Platform reports for Katalon Studio/KRE, JUnit XML, and Playwright reports. Use when you need to combine Katalon MCP project/result discovery with Katalon CLI execution, Katalon Report Uploader, or @katalon/playwright-reporter; configure report folders, report types…

katalon-labs/true-skills · 128 tokens