# Enforce red-green-refactor discipline in Claude Code sessions with TDD Guard

> Block implementation-first agent behavior and keep Claude Code anchored to failing-tests-first TDD loops.

- Skill: `agentskillexchange/enforce-red-green-refactor-discipline-in-claude-code-session` (Agent Skill)
- Install (CLI): `npx skillmds@latest add agentskillexchange/enforce-red-green-refactor-discipline-in-claude-code-session`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agentskillexchange/enforce-red-green-refactor-discipline-in-claude-code-session/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: agentskillexchange (https://skillmd.com/u/agentskillexchange)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/agentskillexchange/enforce-red-green-refactor-discipline-in-claude-code-session

---


# Enforce red-green-refactor discipline in Claude Code sessions with TDD Guard

Block implementation-first agent behavior and keep Claude Code anchored to failing-tests-first TDD loops.

## Prerequisites

Claude Code, Node.js 22+, supported test framework

## Installation

Requirements and caveats from upstream:
- Node.js 22+
- Python/pytest support: [@Durafen](https://github.com/Durafen)

Basic usage or getting-started notes:
- A supported test framework (Vitest, Jest, Storybook, pytest, PHPUnit, Go, Rust, RSpec, Minitest)
- Open Claude Code in your project and run:
- /plugin marketplace add nizos/tdd-guard

- Source: https://github.com/nizos/tdd-guard
- Extracted from upstream docs: https://raw.githubusercontent.com/nizos/tdd-guard/HEAD/README.md

## Documentation

- https://github.com/nizos/tdd-guard#readme

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/enforce-red-green-refactor-discipline-in-claude-code-with-tdd-guard/)

