tdd-cycle

tdd-cycle is a skill for Claude Code from anton-abyzov/specweave. It costs 33 tokens per session (2,486 once invoked), scanned A, original, MIT.

A workflow for test-driven development, or TDD: write a failing test, make it pass with code, then improve the code while keeping the tests passing.

In plain words
What is it for?
Use it to implement a feature or fix through the red, green, and refactor phases, either for one test or for a larger test suite.
Why use it?
It gives development work a strict test-first sequence and adds validation points so changes are checked throughout the cycle.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions subagents.

Good fit Use it to implement a feature or fix through the red, green, and refactor phases, either for one test or for a larger test suite.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/anton-abyzov/specweave/tdd-cycle
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.

Any agent
npx skills add anton-abyzov/specweave --skill tdd-cycle
Clone the repo
git clone --depth 1 https://github.com/anton-abyzov/specweave

Made for: Claude Code.

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/anton-abyzov/specweave/tdd-cycle/github.svg)](https://agentmods.dev/skills/anton-abyzov/specweave/tdd-cycle)
Your own site
<a href="https://agentmods.dev/skills/anton-abyzov/specweave/tdd-cycle"><img src="https://agentmods.dev/badge/skills/anton-abyzov/specweave/tdd-cycle/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-cycle

Your own site · 80×15
<a href="https://agentmods.dev/skills/anton-abyzov/specweave/tdd-cycle"><img src="https://agentmods.dev/badge/skills/anton-abyzov/specweave/tdd-cycle.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,486 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00033 $0.02486
Opus 5 $0.00016 $0.01243
Sonnet 5 $0.00007 $0.00497
Haiku 4.5 $0.00003 $0.00249

Measured 5d ago against content hash eb61de07e41f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 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.

skills-optional/tdd-cycle/SKILL.md · 247 lines

How it starts

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

TDD Cycle - Comprehensive Test-Driven Development

Phases

Run the full RED → GREEN → REFACTOR cycle, or one phase at a time with --phase red|green|refactor (--phase all is the default).

Examples

# Full cycle (default)
tdd-cycle "user authentication"

# Single phases
tdd-cycle --phase red "user authentication"
tdd-cycle --phase green "user authentication"
tdd-cycle --phase refactor "user authentication"

# Same as default — explicit
tdd-cycle --phase all "user authentication"

Execute a comprehensive Test-Driven Development (TDD) workflow with strict red-green-refactor discipline:

[Extended thinking: This workflow enforces test-first development through coordinated agent orchestration. Each phase of the TDD cycle is strictly enforced with fail-first verification, incremental implementation, and continuous refactoring. The workflow supports both single test and test suite approaches with configurable coverage thresholds.]

Configuration

Coverage Thresholds

  • Minimum line coverage: 80%
  • Minimum branch coverage: 75%
  • Critical path coverage: 100%

Refactoring Triggers

  • Cyclomatic complexity > 10
  • Method length > 20 lines
  • Class length > 200 lines
  • Duplicate code blocks > 3 lines

Phase 1: Test Specification and Design

1. Requirements Analysis

  • Run this step in a fresh context (a subagent, or a new session) so earlier reasoning cannot leak into it.
  • Prompt: "Analyze requirements for: $ARGUMENTS. Define acceptance criteria, identify edge cases, and create test scenarios. Output a comprehensive test specification."
  • Output: Test specification, acceptance criteria, edge case matrix
  • Validation: Ensure all requirements have corresponding test scenarios

2. Test Architecture Design

  • Run this step in a fresh context (a subagent, or a new session) so earlier reasoning cannot leak into it.
  • Prompt: "Design test architecture for: $ARGUMENTS based on test specification. Define test structure, fixtures, mocks, and test data strategy. Ensure testability and maintainability."
  • Output: Test architecture, fixture design, mock strategy
  • Validation: Architecture supports isolated, fast, reliable tests

Read the full file on GitHub · 247 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. 5d ago First seen · 247 lines · 33 tokens per session scan A eb61de07e41f

Subscribe to this mod's changes

tdd-cycle is a skill published in the GitHub repository anton-abyzov/specweave (160 stars, last pushed today), licensed MIT. It adds 33 tokens to every session and 2,486 once invoked, about $0.0002 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

atomic-tdd

Test-first discipline. Auto-triggers on "let's implement X", "add feature Y", "fix bug Z", "write a test for", "implement", "build out", and similar pre-code-change phrases. Iron rule: failing test exists before production code. Skip only for pure docs/config changes with an explicit "skipped because:" note. Explicit…

damusix/atomic-claude · 142 tokens

ralphctl-test-driven-development

Execute-phase skill — write the failing test before the code that makes it pass; for bug fixes, this is the reproduction test itself. Use for any logic change, bug fix, or behavioural modification; for the full root-cause triage pipeline around an unexpected failure, see ralphctl-debugging-and-error-recovery.

lukas-grigis/ralphctl · 72 tokens

tdd

A test-driven development workflow based on repeating three stages: write a failing test, make it pass, then improve the code. The tests focus on what users can do through public interfaces rather than internal implementation details.

Yulin-Bi/CodeAuto · 53 tokens

go

Go phase. Reads the approved SPEC file, maps Requirements to tasks (plan), executes via TDD (build), and integrates results verifying all Acceptance Criteria.

epicsagas/epic-harness · 33 tokens

test-driven-development

Use when user explicitly requests test-driven development. Triggers: 'TDD', 'write tests first', 'red green refactor', 'test-first', 'start with the test'. Also invoked by develop and executing-plans for implementation tasks. NOT for: full feature work (use develop, which includes TDD internally).

axiomantic/spellbook · 69 tokens

writing-plans

Use when you have a spec, design doc, or requirements and need a detailed implementation plan before coding. Triggers: 'write a plan', 'create implementation plan', 'plan this out', 'break this down into steps', 'convert design to tasks', 'implementation order'. Also invoked by develop during planning. NOT for…

axiomantic/spellbook · 81 tokens