Individual skill
red-green-refactor
Guides the red-green-refactor TDD workflow: write a failing test first, implement the minimum code to make it pass, then refactor while keeping tests green. Use when a user asks to practice TDD, write tests first, follow red-green-refactor, do test-driven development, write failing tests before code, or phrases like 'make the test pass', 'test coverage', or 'unit tests before implementation'.
packages/core/src/methodology/packs/testing/red-green-refactor/SKILL.md
Source commit d2e5c346f73325c326820efd3188dcf2b6eb704f
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- Yes
- Observed behavior
- Not checked yet
- Last checked
- Nov 3, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 1,575
- Repository last updated
- Jun 2, 2026
- License
- Apache-2.0
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- agent-skills Repository topic
- agentskills Repository topic
- ai Repository topic
- cli Repository topic
- codex Repository topic
- cursor Repository topic
- gemini Repository topic
- opencode Repository topic
- skills Repository topic
- tdd Declared skill tag
- testing Declared skill tag
- quality Declared skill tag
- methodology Declared skill tag
- testing Derived category
- engineering Derived category
- operations Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 5,275 bytes
Read excerpt
# Red-Green-Refactor Methodology
You are following the RED-GREEN-REFACTOR cycle for test-driven development. Every new feature, bug fix, or behavior change starts with a failing test.
## The Cycle
### 1. RED Phase — Write a Failing Test
1. **Understand the requirement** — what specific behavior must exist?
2. **Write one test** asserting that behavior
3. **Run the test** — it MUST fail (red)
4. **Verify the failure reason** — not a syntax error, but a missing implementation
The test should be focused on ONE behavior, named descriptively, and use clear assertions.