
TDD Guard
Plugin用钩子强制 Claude Code 遵循测试驱动开发:没有失败测试就拦下实现、阻止超出测试的过度实现,可接入 lint 推动重构。需要 Node.js 22+;仍在维护,但作者建议新项目改用后续项目 Probity。
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:
/plugin marketplace add nizos/tdd-guard/plugin install tdd-guard@tdd-guard/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
- Custom instructions - Customize TDD validation rules
- Lint integration - Automated refactoring support
- Strengthening enforcement - Prevent agents from bypassing validation
- Ignore patterns - Control which files are validated
- Validation Model - Choose faster or more capable model
- All settings - Complete settings documentation
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:
- Python/pytest support: @Durafen
- PHP/PHPUnit support: @wazum
- Rust/cargo support: @104hp6u
- Go support: @sQVe, @wizzomafizzo
- Storybook support: @akornmeier
- Ruby/RSpec & Minitest support: @Hiro-Chiba
Support
- Discussions - Ask questions and share ideas
- Issues - Report bugs and request features
License
相關資源

TDD Workflows
Plugin测试驱动开发插件:/tdd-workflows:tdd-cycle 等命令按红-绿-重构分阶段推进,每阶段设检查点等待确认,附 TDD 编排与代码评审两个子代理。收录于 wshobson/agents 插件市场。
wshobson/agents40.9k
Test-Driven Development
Skill强制 agent 按红-绿-重构推进:先写测试并亲眼看它失败,再写最少的实现让它通过,未经失败验证就写出的代码一律删掉重来。出自 Superpowers 工作流。
obra/superpowers301k
tdd
Skill按纵向切片做测试驱动开发:先与用户约定测试接缝,只通过公开接口验证行为,并列出实现耦合、同义反复等测试反模式。出自 Matt Pocock 的 skills 合集。
mattpocock/skills293k
Agent Skills
PluginAddy Osmani 整理的生产级工程技能包:覆盖规格、计划、实现、测试、评审到上线的全流程,配套 /spec、/plan、/build、/test、/review、/ship 等命令。同时支持 Claude Code 与 Codex。
addyosmani/agent-skills107k
Diagnosing Bugs
Skill排查疑难缺陷与性能回退的纪律化流程:先构建能稳定复现的反馈回路,再复现与最小化、提出假设、插桩验证,最后修复并补回归测试,输出中要求脱敏密钥。Matt Pocock 出品。
mattpocock/skills294k
Agent Skills (Addy Osmani)
Skill覆盖定义、计划、构建、验证、评审到上线全流程的工程技能合集,配 /spec、/plan、/build、/test、/review、/ship 等命令,含 TDD、代码评审与 Web 性能审计。Addy Osmani 出品。
addyosmani/agent-skills107k