tdd-guard — Claude Code plugin: TDD checks
tdd-guard checks file edits in Claude Code and blocks changes that skip tests or go beyond the requested implementation. Use it to keep an agent’s coding work aligned with TDD.
/plugin marketplace add anthropics/claude-plugins-community
/plugin install tdd-guard@claude-communityWhat tdd-guard does
Hooks validate Claude Code’s attempts to write or edit files. They stop changes that bypass tests or implement more than needed, then explain what should happen next. The hooks register when you install the plugin and also manage session state.
Run /tdd-guard:setup to detect the project’s test framework and configure a matching reporter. The project needs Node.js 22+ and a supported test framework; without both, setup cannot meet its stated requirements. You may need to restart your terminal session or IDE extension before the setup command appears.
What it helps with
- stop edits that precede tests
- block implementations that exceed the requested scope
- configure a reporter for the project’s test framework
- track and switch TDD session state
Example prompts for the agent
- Configure TDD checks for this project with
/tdd-guard:setup. - Implement this change through tests and block edits that skip the TDD process.
- Turn off checks with
tdd-guard off, then turn them back on withtdd-guard on.
How to install tdd-guard
Plugin marketplace
/plugin marketplace add anthropics/claude-plugins-community/plugin install tdd-guard@claude-communityStep by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own
Questions about tdd-guard
How do I install tdd-guard in Claude Code?
In Claude Code, run /plugin marketplace add anthropics/claude-plugins-community first, then run /plugin install tdd-guard@claude-community.
What does tdd-guard do?
It checks file operations against TDD principles, blocking edits that skip tests or add more implementation than needed. It tells the agent what to do instead.
What does tdd-guard need to configure a project?
The project needs Node.js 22+ and a supported test framework. Run /tdd-guard:setup to detect the framework and configure its reporter.
Source text
plugin · MIT
# TDD Guard Plugin Automated Test-Driven Development enforcement for Claude Code. When Claude Code attempts to edit or write files, TDD Guard validates that changes follow TDD principles — blocking operations that skip tests or over-implement. ## Setup After installing the plugin, run the setup skill to configure a test reporter for your project: ``` /tdd-guard:setup ``` This detects your test framework and configures the appropriate [reporter](https://github.com/nizos/tdd-guard). **Note:** You may need to restart your terminal session or IDE extension for the setup skill to appear. ## What's included - **Hooks** — Automatically registered on install. Validate file operations, handle `tdd-guard on/off` commands, and manage session state. - **Setup skill** — `/tdd-guard:setup` detects your test framework and configures the reporter. ## Requirements - Node.js 22+ - A supported test framework ## Learn more - [Documentation](https://github.com/nizos/tdd-guard) - [Configuration options](https://github.com/nizos/tdd-guard/blob/main/docs/configuration.md) - [Custom TDD rules](https://github.com/nizos/tdd-guard/blob/main/docs/custom-instructions.md)
© nizos · MIT · nizos/tdd-guard