ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 4/5

tdd

Test-driven development with red-green-refactor loop and de-sloppify pattern. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development. Includes cleanup pass for removing test/code slop.

Why use this skill?

Master test-driven development with the OpenClaw TDD skill. Build robust code through vertical slicing, tracer bullets, and automated cleanup passes.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/huamu668/tdd-ecc
Or

What This Skill Does

The TDD (Test-Driven Development) skill enables the OpenClaw agent to architect features and resolve bugs using a disciplined red-green-refactor workflow combined with the de-sloppify pattern. Unlike standard testing agents that might write monolithic test suites first, this skill forces a vertical slicing approach using 'tracer bullets.' This ensures the agent builds functional, verifiable code increments that are driven by actual public interface requirements rather than brittle internal implementation details. The process minimizes technical debt by performing constant cleanup passes to ensure that code remains clean, maintainable, and aligned with system specifications.

Installation

To integrate this capability into your agent, use the following command: clawhub install openclaw/skills/skills/huamu668/tdd-ecc

Use Cases

This skill is intended for:

  • Implementing complex features that require high reliability and clear behavioral specifications.
  • Debugging regression-prone modules where behavior verification is critical.
  • Architecting new services using a design-first, test-second approach.
  • Refactoring legacy codebases where existing logic must be preserved while improving internal structure.
  • Teams moving away from 'horizontal slicing' to achieve faster, higher-quality development cycles.

Example Prompts

  1. "I need to implement a new user authentication flow. Let's use the TDD skill, write a tracer bullet for the initial sign-up API, and move through the red-green-refactor loop."
  2. "We have a bug in our cart calculation logic. Please use the TDD skill to isolate the behavior with an integration test, reproduce the failure, and then refactor the logic."
  3. "Let's refactor this module. Use the de-sloppify pattern to ensure the public interface remains stable while we clean up the internal implementation using TDD."

Tips & Limitations

  • Vertical Slicing: Avoid the urge to write all tests at once. Focus on one behavior per cycle.
  • Interface Stability: Before starting, confirm the public interface with the user. The goal is to define 'what' the system does, not 'how' it does it.
  • Refactoring: Always include the final refactor step to remove test or implementation slop.
  • Limitations: This skill is not intended for non-logic-heavy tasks (e.g., UI styling or basic configuration). It requires an environment capable of executing test suites.

Metadata

Author@huamu668
Stars2387
Views1
Updated2026-03-09
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-huamu668-tdd-ecc": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#tdd#software-engineering#refactoring#unit-testing#code-quality
Safety Score: 4/5

Flags: file-read, file-write, code-execution