Skills for Real Engineers. Straight from my .agents directory.
test-driven-development
Agent skill fromobra/superpowers
Use when implementing any feature or bugfix, before writing implementation code
How to install test-driven-development
npx skills add obra/superpowers# or add only this skill to Claude Code: copy the folder
skills/test-driven-development/
# into
~/.claude/skills/test-driven-development/ (all projects)
.claude/skills/test-driven-development/ (one project)
1# Test-Driven Development (TDD)23## Overview45Write the test first. Watch it fail. Write minimal code to pass.67**Core principle:** If you didn't watch the test fail, you don't know if it tests the right thing.89**Violating the letter of the rules is violating the spirit of the rules.**1011## When to Use1213**Always:**14- New features15- Bug fixes16- Refactoring17- Behavior changes1819**Exceptions (ask your human partner):**20- Throwaway prototypes21- Generated code22- Configuration files2324Thinking "skip TDD just this once"? Stop. That's rationalization.2526## The Iron Law2728```29NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST30```3132Write code before the test? Delete it. Start over.3334**No exceptions:**35- Don't keep it as "reference"36- Don't "adapt" it while writing tests37- Don't look at it38- Delete means delete3940Implement fresh from tests. Period.4142## Red-Green-Refactor4344```dot45digraph tdd_cycle {46 rankdir=LR;47 red [label="RED\nWrite failing test", shape=box, style=filled, fillcolor="#ffcccc"];48 verify_red [label="Verify fails\ncorrectly", shape=diamond];49 green [label="GREEN\nMinimal code", shape=box, style=filled, fillcolor="#ccffcc"];50 verify_green [label="Verify passes\nAll green", shape=diamond];51 refactor [label="REFACTOR\nClean up", shape=box, style=filled, fillcolor="#ccccff"];52 next [label="Next", shape=ellipse];5354 red -> verify_red;55 verify_red -> green [label="yes"];56 verify_red -> red [label="wrong\nfailure"];57 green -> verify_green;58…
Excerpt shown under the repository's MIT license.
More skills in superpowers
Similar skill repositories
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.
Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
