TDD Lock — Testing skill for Claude Code
TEST-LOCK — commit the red tests, then make them mechanically read-only while implementing to green (the strongest validated anti-gaming defense).
How to install TDD Lock
Installs to ~/.claude/commands/davalst-tdd-playbook-tdd-lock.md
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/davalst/tdd-playbook/HEAD/.claude/commands/tdd-lock.md -o ~/.claude/commands/davalst-tdd-playbook-tdd-lock.md Restart Claude Code, or start a new session, for it to be picked up.
What TDD Lock does
description: TEST-LOCK — commit the red tests, then make them mechanically read-only while implementing to green (the strongest validated anti-gaming defense). argument-hint:
Engage the **TEST-LOCK** (Playbook §1, HACK_CATALOG H2/H5) for: $ARGUMENTS
The documented top agent attack vector is editing/weakening the failing test instead of fixing the code. The lock converts §1's iron rule from an honor system into a mecha
Alternatives in Testing
- Fix Issue — by metabase - Addresses GitHub issues by taking issue number as parameter, analyzing context, implementing sol 46.5k ★
- Loki Spec Status — Check whether the spec has drifted from its lock using Loki's living-spec drift detection, and summarize the r 1.1k ★
- Mda — MDA Open Spec — a Markdown superset for agent-facing documents 615 ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
TDD Implement
by jerseycheese - Implements Test-Driven Development by analyzing feature requirements, creating tests first (
Test Review
Write-then-verify test review — write tests in your normal flow, then mechanical gates (red-green + mutation)
Test Driven Development.SKILL
Enforces TDD discipline with RED-GREEN-REFACTOR cycle. Use when writing new features, fixing bugs, or refactor
TDD Cycle
Execute a comprehensive Test-Driven Development (TDD) workflow with strict red-green-refactor discipline:
TDD
by zscott - Guides development using Test-Driven Development principles, enforcing Red-Green-Refactor discipli
TDD Task
Implement a planned task test-first with the red-green-refactor loop and independent verification.
Related Agents
Feature Implementer
Implement a ReviewFlow feature via TDD inside-out. Receives a validated plan (docs/plans/ .plan.md) and spec (
BDD Harness Runner
Use PROACTIVELY as fourth stage of BDD automation (after step definitions exist) and inside the outside-in red
TDD Refactoring Agent
Improves code structure while keeping all tests green during the TDD REFACTOR phase using proven refactoring p