tdd-cycle

tdd-cycle is a skill for Claude Code from sequenzia/agent-alchemy. It costs 51 tokens per session (5,815 once invoked), scanned A, original, MIT.

A guided Test-Driven Development workflow for taking a feature from failing tests through implementation and refactoring.

In plain words
What is it for?
Use it to develop a feature through verified RED, GREEN, and REFACTOR stages while checking that existing tests do not regress.
Why use it?
It enforces the sequence of writing tests, confirming they fail, making them pass, and improving the code while preserving test results. TDD means writing tests before implementation.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the agent-alchemy-tdd-tools plugin — 5 skills, 3 agents shipped together

Good fit Use it to develop a feature through verified RED, GREEN, and REFACTOR stages while checking that existing tests do not regress.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add sequenzia/agent-alchemy
Claude Code
/plugin install agent-alchemy-tdd-tools

Made for: Claude Code.

Or install agent-alchemy-tdd-tools, the plugin that ships this one along with the rest of its 5 skills, 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 tdd-cycle

README.md
[![agentmods](https://agentmods.dev/badge/skills/sequenzia/agent-alchemy/tdd-cycle.svg)](https://agentmods.dev/skills/sequenzia/agent-alchemy/tdd-cycle)
Your own site
<a href="https://agentmods.dev/skills/sequenzia/agent-alchemy/tdd-cycle"><img src="https://agentmods.dev/badge/skills/sequenzia/agent-alchemy/tdd-cycle.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,815 The whole file, excluding the scripts and references it only reads on demand.
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.00051 $0.05815
Opus 5 $0.00026 $0.02908
Sonnet 5 $0.00010 $0.01163
Haiku 4.5 $0.00005 $0.00581

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

Security

Grade A, and why

tdd-cycle 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.

claude/tdd-tools/skills/tdd-cycle/SKILL.md · 728 lines

How it starts

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

TDD Cycle Skill

Run a full RED-GREEN-REFACTOR Test-Driven Development workflow for a feature. This skill drives the entire TDD lifecycle: understand the feature, write failing tests, confirm they fail (RED), implement minimal code to make them pass (GREEN), then refactor while keeping tests green (REFACTOR).

CRITICAL: Complete ALL 7 phases. The workflow is not complete until Phase 7: Report is finished. After completing each phase, immediately proceed to the next phase without waiting for user prompts.

Core Principles

  1. Tests before implementation -- Write tests first. The tests define what the code should do. Implementation follows from tests, not the other way around.
  2. Minimal implementation -- Write only the code needed to make failing tests pass. No extra features, no premature optimization, no speculative abstractions.
  3. Regression protection -- Existing tests must continue passing at every phase. Zero tolerance for regressions.
  4. Phase gate enforcement -- Each phase must complete and verify before the next begins. RED verification is mandatory. GREEN verification is mandatory.
  5. Behavior over implementation -- Tests verify what code does (inputs, outputs, side effects), not how it does it internally.
  6. Autonomous after plan confirmation -- The user confirms the plan once in Phase 3. After that, the entire RED-GREEN-REFACTOR cycle runs without interruption.

AskUserQuestion is MANDATORY

IMPORTANT: You MUST use the AskUserQuestion tool for ALL questions to the user. Never ask questions through regular text output.

  • Plan confirmation -> AskUserQuestion
  • Framework selection -> AskUserQuestion
  • Clarifying questions -> AskUserQuestion
  • Error recovery options -> AskUserQuestion

Text output should only be used for presenting information, summaries, and progress updates.

NEVER do this (asking via text output):

Should I proceed with this plan?
1. Yes
2. No, modify it

ALWAYS do this (using AskUserQuestion tool):

AskUserQuestion:
  questions:
    - header: "TDD Plan Confirmation"
      question: "Review the TDD plan above. Ready to proceed?"
      options:
        - label: "Proceed"
          description: "Run the full RED-GREEN-REFACTOR cycle autonomously"
        - label: "Modify plan"
          description: "Adjust tests, scope, or approach before starting"
        - label: "Cancel"
          description: "Cancel the TDD workflow"
      multiSelect: false

Read the full file on GitHub · 728 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 728 lines · 51 tokens per session scan A ec6e927b9cc9

Subscribe to this mod's changes

tdd-cycle is a skill published in the GitHub repository sequenzia/agent-alchemy (44 stars, last pushed 3mo ago), licensed MIT. It adds 51 tokens to every session and 5,815 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories

auto-loop

TDD-based autonomous development loop with checkpoint recovery and observability changelog.

claude-world/director-mode-lite · 17 tokens

workflow

Run the complete 5-step development workflow: focus problem → prevent over-development → test-first (TDD) → document → smart commit. Use when starting a new feature, or when the user runs /workflow or asks for the full development flow.

claude-world/director-mode-lite · 52 tokens

test-first

Drive one feature through a strict TDD Red-Green-Refactor cycle with checklists for each phase. Use when implementing new functionality test-first, or when the user runs /test-first.

claude-world/director-mode-lite · 42 tokens

linked-intent-dev

Guide for linked-intent development (LID). Consult for ALL code changes. Walks changes through a mode-aware six-phase workflow (HLD → LLD → EARS → intent-narrowing edge audit → tests-first → code) with mandatory stops between each phase. Bugs walk the arrow like any other change — no short-circuit. Enforces cascade…

jszmajda/lid · 87 tokens

plan

Analyzes architecture, selects patterns, assesses testability, then decomposes work into ordered TDD tasks with exact verification commands and explicit acceptance mapping. Works from an approved spec (zuvo:brainstorm output) or directly from a user-provided description.

greglas75/zuvo · 53 tokens

improving-tests

Improve test design, speed, and coverage with behavior-focused tests, useful seams, characterization tests, TDD, and test refactoring. Use when improving tests, optimizing slow suites, adding coverage, refactoring brittle tests, removing test waste, or working test-first. NOT for fixing production bugs (use…

alexei-led/cc-thingz · 89 tokens