Free to browse, every day. Go Pro for unlimited installs and Airsc MCP.

See Pro
PluginSafeCode review & qualityAdvanced

tdd-guard

nizos · nizos/tdd-guard

A plugin for Claude Code that enforces Test-Driven Development principles by blocking code changes that skip tests.

Automated TDD enforcement for Claude Code

2.4k stars188License: MITUpdated 10 days ago0 opens

Preview

▍

What you can do with it

  • Force Claude to write a failing test before implementing any new feature logic.
  • Prevent an agent from over-engineering solutions by sticking to minimal TDD requirements.
  • Ensure all code changes pass existing linting and testing rules before proceeding.

Safety check

Safe

No risky patterns found in the files we scanned.

Automated scan of the repo files. Always review code you run.

From the README

TDD Guard

[!IMPORTANT] TDD Guard grew into Probity: the same TDD enforcement, now for Claude Code, Codex, and GitHub Copilot CLI, with more reliable validation and no test reporters to set up. New projects should start there. TDD Guard remains maintained for the projects that rely on it.

Automated Test-Driven Development enforcement for Claude Code.

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.

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:

Support

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

License

MIT

View source on GitHub