skills/smithery.ai/red-green-refactor

red-green-refactor

SKILL.md

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.

Executable example (Jest):

// calculateTotal.test.js
const { calculateTotal } = require('./calculateTotal');
Installs
2
First Seen
Apr 17, 2026
red-green-refactor from smithery.ai