moai-workflow-tdd

Guides RED-GREEN-REFACTOR workflow for test-first development of new features.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/Jongsix/remote-claudecode --skill moai-workflow-tdd-jongsix
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: moai-workflow-tdd
Source: https://github.com/Jongsix/remote-claudecode/tree/main/.claude/skills/moai-workflow-tdd
Command: npx skills add https://github.com/Jongsix/remote-claudecode --skill moai-workflow-tdd-jongsix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you develop new functionality in a disciplined way by writing tests before implementation, reducing guesswork and keeping behavior clear from the start.

Core Features & Use Cases

  • RED-GREEN-REFACTOR Workflow: Guides you through writing a failing test, making it pass with minimal code, and then cleaning up safely.
  • New Feature Development: Best for greenfield modules, isolated functions, API endpoints, and UI components where behavior is defined by acceptance criteria.
  • Testing Discipline: Encourages small, focused tests, clear naming, and continuous verification so changes stay predictable and maintainable.

Quick Start

Use the tdd workflow to write a failing test for the new feature, implement the smallest change that makes it pass, and then refactor without breaking the test.

Frequently Asked Questions about moai-workflow-tdd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I start test-driven development for a new feature?▼

Test-driven development starts by writing a failing test that defines the new feature's expected behavior, then implementing the minimal code to pass it, and finally refactoring safely while keeping the test green.

What is the red-green-refactor workflow in unit testing?▼

The red-green-refactor workflow is a unit testing cycle where you write a failing test, create the minimal implementation to make it pass, and then clean up the code without breaking the test.

When should I use test-first development for API endpoints and UI components?▼

Test-first development is best for greenfield modules, isolated functions, API endpoints, and UI components where behavior must be clearly specified by acceptance criteria before writing the implementation code.

Can I apply TDD to refactor existing code safely?▼

You can apply TDD to refactoring by ensuring continuous verification through focused test cases, cleaning up the implementation while maintaining coverage-driven validation so the behavior stays predictable.

How does TDD help with testing discipline for isolated functions?▼

TDD enforces testing discipline for isolated functions by encouraging small, focused tests, clear naming, and continuous verification to ensure changes remain predictable and maintainable throughout development.

Do I need specific testing frameworks to follow a test-first workflow?▼

The test-first workflow is framework-agnostic, requiring only a RED-GREEN-REFACTOR process with focused test cases and continuous verification to validate behavior before and during implementation.