Code Review · agent skill
TDD Loop
One red, the least green, a refactor, a commit. Repeat.
What it does
Loads when it is needed
Your agent loads it when the user wants a feature or fix driven by tests, one slice at a time. It carries 5 rules and reads a profile.md with your details before it starts, so the output matches your brand and project.
Same prompt, with and without
Add promo codes to checkout totals
Prompt · Add promo code support to the checkout total. Customers enter a code and the total drops. Use tests to drive it.
src/checkout/total.ts:
export function orderTotal(items: {priceCents:number; qty:number}[], shippingCents: number): number {
const sub = items.reduce((s,i)=>s+i.priceCents*i.qty,0);
return sub + shippingCents;
}
src/checkout/total.test.ts has 3 passing tests (sums items, adds shipping, empty cart = shipping only). Runner: `npm test` (vitest, ~2s).
Rules from product: codes are percent-off or fixed-amount; one code per order; percent applies to items only, not shipping; total never below shipping cost; expired codes are rejected with a clear message. Codes live in a `promo_codes` table (code, kind, value, expires_at); lookup helper `findPromo(code)` exists and returns the row or null.Profile used: Project: order and payments API; Stack: TypeScript, Express, vitest, Postgres; Strictness: Standard; Conventions: conventional commits, tests beside files
Both answers from the same model (Claude sonnet), 2026-10-17. The one without the skill was written in a separate session that never saw it. Shortened where marked with …
Install
One command, in your project
It detects your agent; add --agent all for every agent.
npx proskills-cli add tdd-loop --order <order id from your receipt>
Or copy the skill folder (the one holding SKILL.md) into the directory your agent reads, then restart it or start a new session.
| Agent | This project | Every project |
|---|---|---|
| Claude Code | .claude/skills/ | ~/.claude/skills/ |
| Cursor | .agents/skills/ (or .cursor/skills/) | ~/.cursor/skills/ |
| Codex | .agents/skills/ | ~/.agents/skills/ |
| Gemini CLI | .agents/skills/ (or .gemini/skills/) | ~/.gemini/skills/ |
Changelog
What changed
- v1.0.0 · 2026-10-17
- First versioned release: One failing test, the least code, a refactor, a commit. Repeat.
- Scanned 100/100 before release.
Keep it current with npx proskills-cli update; your profile.md is never touched. Everyone who bought it gets the update free and an email when it lands.
Same collection
More from Code Review
The scan checks spec compliance, token cost, clarity and security patterns. A clean scan is not a guarantee: static scanners can be evaded. Scan any skill yourself.