TDD Guard

A Claude Code hooks plugin that blocks code without a failing test and implementation beyond the current test

PluginMedium risk

nizos/tdd-guard

Install

/plugin marketplace add nizos/tdd-guard
/plugin install tdd-guard@tdd-guard
/tdd-guard:setup

setup configures the test reporter for the project.

This is third-party code. Review the repository files before installing.

What it does

TDD Guard watches Claude Code edits through hooks and makes the agent follow TDD. When the agent writes implementation without a failing test or does more than the current test needs, the action is blocked with an explanation of what to do. Validation runs through a Claude model via the Agent SDK or API, and rules can be tuned with custom instructions. It reads test results through reporters for Vitest, Jest, Storybook, pytest, PHPUnit, Go, Rust, RSpec and Minitest, can hook in a linter for the refactor step, and can be toggled mid-session.

Who it is for. For teams practicing TDD who want the agent to stop cutting corners.

Good fit when

  • The agent writes code before tests
  • You need implementation kept minimal for each test
  • You want a linter in the red, green, refactor loop

Not a fit when

  • The project has no tests or an unsupported test framework
  • A new project: the author recommends its successor Probity

Example request

Add email validation to the sign-up form, strictly test-first

Limitations

Requires Node 22 and a supported test framework with its reporter configured. Each check calls a Claude model, adding latency and using your subscription or API key. Hooks run with user permissions. The author moved development to Probity; TDD Guard stays maintained.

How to disable. Toggle validation off in the session or uninstall via /plugin uninstall tdd-guard@tdd-guard.

Security check

  • Hooks run automatically with user permissions
  • Sends code changes to a Claude model for validation

README in short

The README announces the move to Probity and describes the plugin's features. Install is three Claude Code commands, with manual setup in a separate guide. Links cover custom rules, linting, stronger enforcement, ignore patterns and model choice. It notes that hooks run with user permissions. MIT licensed.

FAQ

Do I need a separate API key?

Not by default: validation goes through the Agent SDK and your Claude Code subscription. For CI set VALIDATION_CLIENT=api with a separate key.

How does Probity differ?

It continues the project with Codex and GitHub Copilot CLI support and no reporters to configure.

Playwright CLI

playwright-cli

Editors’ pick

Microsoft's official Playwright CLI with an agent skill: drive a browser through short commands without heavy MCP schemas

CLIMedium risk13.3K
Editors’ pick

The official MCP server debugger: web UI, automation CLI and terminal UI in one package

CLIMedium risk10.9K
Editors’ pick

SonarSource's official MCP server: quality and security issues, quality gates and code analysis from SonarQube Server and Cloud

MCP serverMedium risk648

Open-source AI agent for pull request review: descriptions, feedback and improvement suggestions on GitHub, GitLab and more

CLIMedium risk13K