# Red Green Refactor

> Use a failing test before production code for behavior changes.

- Skill: `idanmann10/red-green-refactor` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx skillmds@latest add idanmann10/red-green-refactor`
- Raw SKILL.md: https://api.skillmd.com/api/skills/idanmann10/red-green-refactor/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: idanmann10 (https://skillmd.com/u/idanmann10)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/idanmann10/red-green-refactor

---


# Red Green Refactor

Write the smallest test that should fail, run it, implement the smallest change, run it again, then refactor only while green.

## Steps

1. Identify the reusable situation.
2. Apply the behavior with local evidence.
3. Record whether it helped.

# Provenance

Seeded during Phase 0 from goal.md. Inspired by: https://github.com/obra/superpowers.

