Test-Driven Development Loop skill for Claude and Codex
Test-Driven Development Loop as an AI skill. It asks for Behavior to add, Language and test framework, Test command and 2 more, then does the rest. Free to…
Install it once and Claude or Codex runs it for you. When your request matches, your AI loads the skill, asks for anything it is missing, and works through the template itself. Prefer to fill it in by hand? See the full prompt template.
Download the skill (.zip) · View SKILL.md
When it is used
Use when a new behavior or bug fix should be built test first, with a failing test proven before the implementation. Do not use for adding tests to code that already works or choosing a testing strategy. Related topics: coding, technical.
What it will ask you for
- Behavior to add (longer free text)
- Language and test framework (free text, e.g. "Go with testing or Ruby with RSpec")
- Test command (free text, e.g. "The command that runs one test file")
- Relevant code (longer free text)
- Refactor appetite (choose one: Minimal, Moderate, Thorough)
How it works
- Write one test for the smallest next slice of behavior and run it before touching production code.
- Read the failure and confirm it fails because the behavior is absent; fix the test until the reason is right.
- Write the least code that passes, then run the whole test file to confirm nothing else broke.
- Refactor only while green, running the tests after every edit, to the chosen appetite.
- Repeat from the simplest case outward to edge and error cases, logging each cycle in three lines.
What you get
A cycle log of test written, failure observed and code added, ending with the final passing test run and a note on what was refactored.
What it watches out for
- Accepting a test that fails on a syntax or import error, which proves nothing about the behavior.
- Writing the full implementation in one go after the first test, which skips the tests that would have shaped it.
- Refactoring while a test is red, so a regression cannot be told from the change.
How to install
Claude.ai and the Claude desktop app
- Download the skill .zip.
- Open Settings, then Capabilities, and find Skills.
- Choose Upload skill and select the .zip.
- Ask Claude for help with the task. It loads the skill when your request matches.
Claude Code
- Download the skill .zip.
- Unzip it into ~/.claude/skills/ (or .claude/skills/ inside a project).
- Start a new session. Claude Code loads the skill when your request matches.
Codex
- Download the skill .zip.
- Unzip it into ~/.agents/skills/ (or .agents/skills/ inside a project).
- Codex picks it up on its own. Type $ and the skill name to use it, or just ask for the task.
Cursor
- Download the Cursor rule (.mdc).
- Save it in .cursor/rules/ inside your project.
- Cursor's agent applies the rule when your request matches its description.
AGENTS.md (Codex, Cursor, and other coding agents)
- Copy the AGENTS.md section.
- Paste it into AGENTS.md at the root of your repository, creating the file if needed.
- Coding agents that read AGENTS.md follow it when your request fits.