cancel-tdd

cancel-tdd is a command for Claude Code from MadeByTokens/claude-code-plugins-madebytokens. It costs 6 tokens per session (344 once invoked), scanned C, original, MIT.

A command that stops an active TDD loop. TDD, or test-driven development, is a process of writing tests and implementation in repeated cycles.

In plain words
What is it for?
Use it when a TDD loop is running and you want to cancel it, then see the completed iterations, generated files, and last result.
Why use it?
It gives you a controlled way to stop the cycle while preserving its recorded work and state.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the bon-cop-bad-cop plugin — 4 commands, 3 agents shipped together

Good fit Use it when a TDD loop is running and you want to cancel it, then see the completed iterations, generated files, and last result.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/madebytokens/claude-code-plugins-madebytokens/cancel-tdd
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/MadeByTokens/claude-code-plugins-madebytokens

Made for: Claude Code.

Or install bon-cop-bad-cop, the plugin that ships this one along with the rest of its 4 commands, 3 agents.

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 cancel-tdd

README.md
[![agentmods](https://agentmods.dev/badge/commands/madebytokens/claude-code-plugins-madebytokens/cancel-tdd/github.svg)](https://agentmods.dev/commands/madebytokens/claude-code-plugins-madebytokens/cancel-tdd)
Your own site
<a href="https://agentmods.dev/commands/madebytokens/claude-code-plugins-madebytokens/cancel-tdd"><img src="https://agentmods.dev/badge/commands/madebytokens/claude-code-plugins-madebytokens/cancel-tdd/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 cancel-tdd

Your own site · 80×15
<a href="https://agentmods.dev/commands/madebytokens/claude-code-plugins-madebytokens/cancel-tdd"><img src="https://agentmods.dev/badge/commands/madebytokens/claude-code-plugins-madebytokens/cancel-tdd.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 344 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00006 $0.00344
Opus 5 $0.00003 $0.00172
Sonnet 5 $0.00001 $0.00069
Haiku 4.5 $0.00001 $0.00034

Measured 9d ago against content hash 40d8ac3e8f00, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade C, and why

cancel-tdd scanned grade C with 1 finding 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 9d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

You can review it or delete it manually (rm -rf .tdd-working).
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

plugins/bon-cop-bad-cop/commands/cancel-tdd.md · 56 lines

What it actually says

/cancel-tdd Command

When the user runs /cancel-tdd, follow these instructions:

Step 1: Check for Active Loop

Try to read .tdd-working/state.json:

  • If file doesn't exist:

    • Display: "No TDD loop state found. Use /tdd-loop to start a new loop."
    • STOP.
  • If file exists but active: false:

    • Display: "TDD loop is not active. It was already completed or cancelled."
    • Display the stopped reason if available: "Reason: "
    • STOP.

Step 2: Cancel the Loop

Update .tdd-working/state.json by setting:

  • active: false
  • completedAt:
  • stoppedReason: "cancelled_by_user"

Keep all other fields unchanged (preserve history, files, etc.).

Step 3: Report Cancellation

Display:

🛑 **TDD Loop Cancelled**

Completed: <iteration> iteration(s)

Generated Files:
  Tests (<count of testFilePaths>):
    <list each test file path>

  Implementation (<count of implFilePaths>):
    <list each impl file path>

Last Phase: <phase>
Last Verdict: <lastVerdict or "None">

Working directory preserved at: .tdd-working/
You can review it or delete it manually (rm -rf .tdd-working).

Note: Files created during the loop remain in your project. Review and modify them as needed.

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. 9d ago First seen · 56 lines · 6 tokens per session scan C 40d8ac3e8f00

Subscribe to this mod's changes

cancel-tdd is a command published in the GitHub repository MadeByTokens/claude-code-plugins-madebytokens (2 stars, last pushed 7mo ago), licensed MIT. It adds 6 tokens to every session and 344 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.