- Home
- Skills
- Testing & Debugging
- TDD Enforcer — Strict Red-Green-Refactor
More screenshots
Works with the AI tools you already use
TDD Enforcer — Strict Red-Green-Refactor
Forces AI coding agents to follow real Test-Driven Development: one failing test at a time, observed red, minimal green, full suite.
$7
TDD Enforcer — Strict Red-Green-Refactor
Example session with this skill installed
Add a function that calculates the total price of a shopping cart with a 10% discount if the subtotal is over $100. Use TDD.
- Read your context and instructions
- Compiled the tdd enforcer
Summary
Enforced strict TDD. Broke the request into two focused behaviors, wrote one failing test at a time, confirmed RED, then wrote minimal code until GREEN.
RED — Behavior 1
TypeScript
// cart.test.ts
import { describe, it, expect } from 'vitest'
import { calculateTotal } from './cart'
describe('calculateTotal', () => {
it('applies 10% discount when subtotal is over 100', () => {
expect(calculateTotal(150)).toBe(135)
})
})
text
FAIL cart.test.ts > calculateTotal > applies 10% discount when subtotal is over 100
Error: calculateTotal is not a function
RED confirmed.
GREEN — Minimal implementation
TypeScript
// cart.ts
export function calculateTotal(subtotal: number): number {
if (subtotal > 100) {
return subtotal * 0.9
}
return subtotal
}
Full suite: all green.
RED → GREEN — Behavior 2
Added the second test (no discount when ≤ 100), confirmed it failed, then extended the function with the minimal change. Full suite remained green.
Behaviors now covered
| Behavior | Test Status |
| --------------------------------------- | ----------- |
| Discount applied when subtotal > 100 | ✅ |
| Full price returned when subtotal ≤ 100 | ✅ |
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
Stop agents from writing code first and “adding tests later.”
TDD Enforcer turns any coding agent into a disciplined senior engineer that follows strict Red → Green → Refactor cycles. It refuses to write production code until a failing test has been written and observed to fail.
What it does
- Writes one focused failing test first (RED)
- Confirms the test actually fails for the right reason
- Writes the minimal code needed to make it pass (GREEN)
- Runs the full suite after every change
- Optionally refactors while keeping everything green
- Rejects common agent rationalizations (“I’ll write tests after”, deleting failing tests, etc.)
Why it matters
AI coding agents are fast but they cut corners. Without this skill they routinely:
- Ship untested code
- Write tests that already pass
- Delete or weaken failing tests to get green
- Batch multiple behaviors into one giant change
This skill makes that behavior expensive. The loop becomes the product.
Who it’s for
- Developers who use Claude Code, Cursor, Codex CLI, or any SKILL.md-compatible agent
- Teams that want agent-generated code they can actually trust
- Anyone tired of reviewing PRs full of untested logic
Supported stacks
Works with any language that has a test runner. Auto-detects common setups (pytest, vitest, jest, Go testing, cargo test, JUnit, etc.) and follows your existing project conventions.
Security-clean: pure instructions, no network calls, no dangerous commands. Ready for Agensi’s scan.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean 16 days ago
- Passed all security checks, Safe to install