skills/team/tdd-agent/SKILL.md
Fully autonomous TDD with strict guardrails. Use when you want the AI to drive the entire RED-GREEN-REFACTOR cycle independently while maintaining TDD discipline.
npx skillsauth add michaelalber/ai-toolkit tdd-agentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
"Make it work, make it right, make it fast — in that order." — Kent Beck
The TDD Agent operates autonomously through the complete TDD cycle. Unlike pair programming, the AI drives all phases. Stricter guardrails apply because there's no human catching mistakes in real-time.
Non-Negotiable Constraints:
Kent Beck's 12 Test Desiderata (agent responsibilities) and the per-phase knowledge-base lookup protocol live in references/knowledge-lookups.md — consult it at session start and before each phase transition.
Use search_knowledge (grounded-code-mcp) to ground decisions in authoritative references. Search before each phase transition (RED→GREEN→REFACTOR) and cite the source path in phase logs. The full query→trigger table and the Kent Beck desiderata are in references/knowledge-lookups.md.
Drive each behavior through three phases. Run and verify after every step — never assume.
RED — Write Failing Test
1. Identify smallest testable behavior
2. Write test for that behavior
3. RUN the test suite
4. VERIFY the new test fails
5. VERIFY failure is for the expected reason
6. Only then, proceed to GREEN
GREEN — Minimal Implementation
1. Review the failing test
2. Identify minimal code to pass
3. Implement ONLY what's needed
4. RUN the test suite
5. VERIFY all tests pass
6. Only then, proceed to REFACTOR
REFACTOR — Improve Structure
1. Confirm all tests pass
2. Identify ONE improvement
3. Make the change
4. RUN the test suite
5. VERIFY all tests still pass
6. If red, REVERT immediately
7. Repeat or proceed to next RED
Run the RED/GREEN/REFACTOR self-check at each transition; stop and correct if any item fails. The full self-check lists, the mandatory phase-log templates, and the explicit-reasoning template are in references/guardrails.md. A complete multi-iteration worked example (user-service feature) and a minimal Calculator walkthrough are in references/autonomous-protocol.md.
<tdd-state>
phase: [RED | GREEN | REFACTOR]
iteration: N
feature: [description]
current_test: [test name or none]
tests_passing: [true | false]
test_count: N
failing_count: N
last_verified: [timestamp or "just now"]
</tdd-state>
Each iteration closes with an updated <tdd-state> block and a mandatory phase-log entry.
references/guardrails.md.references/guardrails.md.references/autonomous-protocol.md.Four hard gates — see references/guardrails.md for implementation detail, violation responses, and the severity table.
The AI discipline rules (Trust Nothing, Be Boringly Predictable, Fail Loudly, Prefer Smaller Steps) are in references/guardrails.md.
This skill is an operating mode of the canonical tdd loop, not a replacement for it.
tdd — The canonical inner loop this mode drives. Defines the two critical test properties (behavioral, structure-insensitive), the per-cycle self-check, the GREEN strategies (Fake It / Obvious / Triangulation, with per-language idioms in its references/), and the REFACTOR smell catalog (the tdd skill's references/code-smells.md and references/refactoring-catalog.md). Load those on demand during GREEN/REFACTOR.evaluate-tests — Run after the session to audit test quality and TDD compliance (commit-history scorecard, anti-pattern detection).Common recovery cases (tests won't run, wrong test failure, can't make test pass, state confusion) and their step-by-step protocols are in references/autonomous-protocol.md. In every case: fix infrastructure before writing implementation, examine the actual error not the expected one, and reconstruct the state block from a full test-suite run when state is unclear.
development
Interviews the user relentlessly about a plan, decision, or idea — one question at a time, each with a recommended answer. Shared engine behind "grill-me" and "grill-with-docs". Use on any "grill" trigger phrase or to stress-test thinking. Do NOT use to build the plan; it ends at shared understanding, not implementation.
testing
Runs a relentless interview to sharpen a plan or design, capturing the decisions as ADRs and a glossary along the way. Use when the user wants to be grilled AND wants the session to leave durable domain documentation behind. Do NOT use for a throwaway stress-test with no artifacts; use grill-me instead.
tools
OWASP-based security review of Vue/TypeScript front-ends. Detects framework (Vite/Vue CLI/Nuxt), entry points, and data flows; scans the OWASP Top 10 (2025) mapped to Vue client-side risks (raw-HTML XSS via v-html, URL/protocol injection, bundled secrets, insecure token storage, dependency CVEs, missing CSP, open redirects, router guard bypass); emits an exec summary plus graded findings. Use to audit Vue for vulnerabilities. Not for architecture grading (vue-architecture-checklist).
tools
Analyzes legacy Vue codebases and produces actionable modernization plans. Primary migration paths include Options API to Composition API, Vue 2 to Vue 3, Vue CLI to Vite, JavaScript to TypeScript, Vue Test Utils/Karma/Mocha to Vitest + Vue Testing Library, legacy Vuex to Pinia, and removed-in-Vue-3 pattern cleanup (filters, event bus, `$listeners`). Does NOT perform the migration — assesses, quantifies risk, and plans.