RepoDepot
Plugin

tdd-guard

by nizos
Claude Code plugin for TDD enforcement — blocks implementation without failing tests, prevents over-implementation

Claude Code plugin that ensures agents strictly follow Test-Driven Development principles, preventing premature implementation or skipping tests. It actively monitors agent actions, blocking code changes that violate TDD rules and providing concrete feedback on necessary next steps. Integrates with popular test frameworks like Vitest, Jest, and Pytest, installing directly via the Claude Code plugin marketplace.

View on GitHub ↗
Key features
  • Blocks code implementation without existing failing tests
  • Prevents agents from writing code beyond current test requirements
  • Enforces refactoring using project-specific linting rules
  • Customizable TDD validation rules to match project styles
  • Toggle TDD enforcement on and off mid-session
Languages
TypeScript61%Ruby10%Go8%Rust5%PHP4%
Top contributors
Topics
agentic-codingautomationclaude-codecode-qualityhooksllm-toolstdd

TDD Guard

npm version npm downloads CI Security License: MIT

Automated Test-Driven Development enforcement for Claude Code.

Overview

TDD Guard ensures Claude Code follows Test-Driven Development principles. When your agent tries to skip tests or over-implement, TDD Guard blocks the action and explains what needs to happen instead.

TDD Guard Demo
Click to watch TDD Guard in action

Features

  • Test-First Enforcement - Blocks implementation without failing tests
  • Minimal Implementation - Prevents code beyond current test requirements
  • Lint Integration - Enforces refactoring using your linting rules
  • Customizable Rules - Adjust validation rules to match your TDD style
  • Flexible Validation - Choose faster or more capable models for your needs
  • Session Control - Toggle on and off mid-session

Getting Started

Requirements

  • Node.js 22+
  • A supported test framework (Vitest, Jest, Storybook, pytest, PHPUnit, Go, Rust, RSpec, Minitest)

Installation

Open Claude Code in your project and run:

  1. /plugin marketplace add nizos/tdd-guard
  2. /plugin install tdd-guard@tdd-guard
  3. /tdd-guard:setup

This adds the marketplace, installs the plugin, and configures the test reporter for your project. You may need to restart your terminal session or IDE extension for the setup skill to appear. For manual installation and configuration, see the installation guide.

Configuration

Security

TDD Guard hooks run with your user permissions. We maintain automated security scanning, dependency audits, and welcome source code review. See Claude Code's security considerations for more on hook safety.

Development

Contributing

Contributions are welcome! See the contributing guidelines to get started.

Contributors:

Roadmap

  • Expand language and test framework support
  • Validate file modifications made through MCPs and shell commands
  • Encourage meaningful refactoring opportunities when tests are green
  • Add support for multiple concurrent sessions per project

Support

  • Discussions - Ask questions and share ideas
  • Issues - Report bugs and request features

License

MIT

Similar claude code plugins

Added to RepoDepot ·