tdd-guard
Automated TDD enforcement for Claude Code
TDD Guard is a Claude Code plugin that automatically enforces Test-Driven Development principles during AI-assisted coding sessions. It intercepts code changes and blocks implementation attempts that violate TDD workflow—such as writing production code without failing tests first or over-implementing beyond current test requirements. The plugin integrates with popular testing frameworks including Vitest, Jest, pytest, PHPUnit, Go, Rust, RSpec, and Minitest, providing real-time feedback to guide Claude Code toward proper test-first development. Developers can customize validation rules, choose different validation models for performance, and toggle enforcement on or off mid-session.
Key Features
Use Cases
- 01Enforcing strict TDD discipline when using Claude Code for feature development
- 02Training development teams on proper test-first methodology through automated guardrails
- 03Maintaining test coverage and quality during AI-assisted refactoring sessions
- 04Preventing Claude Code from skipping tests in rapid prototyping scenarios
- 05Integrating TDD best practices into existing projects with multiple testing frameworks
- 06Ensuring consistent red-green-refactor cycles across team members using AI assistants
Related Plugins
View moreandrej-karpathy-skills
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
claude-mem
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Understand-Anything
Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
rtk
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
tdd-guard — FAQ
What is TDD Guard?+
TDD Guard is a Claude Code plugin that automatically enforces Test-Driven Development practices by blocking code changes that violate TDD principles, such as implementing features without failing tests first or writing more code than the current tests require.
How do I install TDD Guard in Claude Code?+
Open Claude Code in your project and run three commands: first add the marketplace with '/plugin marketplace add nizos/tdd-guard', then install with '/plugin install tdd-guard@tdd-guard', and finally configure with '/tdd-guard:setup'. You may need to restart your terminal or IDE extension after setup.
Which testing frameworks does TDD Guard support?+
TDD Guard supports Vitest, Jest, Storybook, pytest, PHPUnit, Go testing, Rust cargo, RSpec, and Minitest, covering JavaScript, TypeScript, Python, PHP, Go, Rust, and Ruby projects.
What are the prerequisites for using TDD Guard?+
You need Node.js version 22 or higher and one of the supported test frameworks already configured in your project. No API keys are required.
Is TDD Guard free to use?+
Yes, TDD Guard is open source and released under the MIT license, making it free for both personal and commercial use.
Can I customize how TDD Guard validates code?+
Yes, you can customize validation rules through custom instructions, configure lint integration for refactoring checks, adjust ignore patterns for specific files, and choose different AI models for validation to balance speed and capability.
How do I install tdd-guard?+
Open the source repository on GitHub and follow its README. tdd-guard is a plugin — MCP Agents Market links you directly to the official repo.
Is tdd-guard free?+
tdd-guard is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.