Skip to content

Add tdd-loop skill — autonomous TDD loop for Claude Code and Claude.ai#951

Open
Jdevgame wants to merge 2 commits intoanthropics:mainfrom
Jdevgame:main
Open

Add tdd-loop skill — autonomous TDD loop for Claude Code and Claude.ai#951
Jdevgame wants to merge 2 commits intoanthropics:mainfrom
Jdevgame:main

Conversation

@Jdevgame
Copy link
Copy Markdown

Add tdd-loop skill

What it does

Enforces a strict Test-Driven Development loop automatically — no need to
remind Claude to write tests first. Every time you ask Claude to implement,
fix, or change code, it:

  1. Runs a confidence check before writing any test (unique mechanism —
    Claude scores its own understanding 0–100% and gates on your threshold)
  2. Writes tests first — never implementation first
  3. Confirms tests fail (vacuous test guard)
  4. Implements the minimum code to pass
  5. Refactors with tests as a safety net
  6. Loops until everything is green

Stack support

React/TypeScript (Vitest + RTL), Java/Spring Boot (JUnit 5 + Mockito),
Node.js/Express (Jest + Supertest), Playwright (multi-browser E2E),
Python/pytest, Go — auto-detected from project config files.

Claude Code extras

  • Subagent phase isolation via Task() (test writer never sees implementation)
  • PostToolUse hook for auto-running tests after every file save
  • Config persisted to CLAUDE.md across sessions
  • Monorepo support (Turborepo, Nx, Maven multi-module)

Gap this fills

There is an existing webapp-testing skill for Playwright, but no skill
that enforces TDD as a development loop. This works alongside webapp-testing.

Files

  • SKILL.md — main skill with full 7-phase loop
  • references/test-patterns.md — per-framework boilerplate
  • references/ai-evals.md — LLM-as-judge harness for AI output testing
  • references/claude-code-agents.md — subagent files for Claude Code

License

Apache 2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant