skill-writing-tdd

Apply RED-GREEN-REFACTOR testing discipline to skill authoring and validation.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/huanlongAI/tzh-Harness --skill skill-writing-tdd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: skill-writing-tdd
Source: https://github.com/huanlongAI/tzh-Harness/tree/main/cowork-skills/skill-writing-tdd
Command: npx skills add https://github.com/huanlongAI/tzh-Harness --skill skill-writing-tdd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Red-Green-Refactor discipline for Skill documentation and authoring, ensuring skills are created only after failing tests and proven compliant.

Core Features & Use Cases

  • Enforces a disciplined Skill lifecycle (RED: baseline failure observed, GREEN: minimal Skill written, REFACTOR: close loopholes)
  • Provides anti-rationalization tables, red flags, HARD-GATE markers, and four-state reporting to enhance deployment safety
  • Supports iterative testing with subagents and deployment checklists to guarantee reliability and reusability

Quick Start

Run a baseline test without the Skill to observe failures, then implement the GREEN Skill and re-test to verify compliance.

Frequently Asked Questions about skill-writing-tdd

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

FAQPage Schema
How do I apply test-driven development to skill authoring?

Test-driven development for skill authoring requires observing baseline failures without the skill, writing a minimal skill to pass tests, then refactoring to close loopholes with explicit counters. This RED-GREEN-REFACTOR cycle ensures skills are proven compliant before deployment.

What is the RED-GREEN-REFACTOR discipline for creating skills?

The RED-GREEN-REFACTOR discipline is a testing lifecycle for skills where RED observes baseline failures, GREEN writes a minimal skill to pass, and REFACTOR closes loopholes using anti-rationalization tables and explicit counters. It guarantees deployment safety and reusability.

How do I validate skill quality and diagnose agent behavior prior to deployment?

Validating skill quality and diagnosing agent behavior requires iterative testing with subagents and deployment checklists. By observing baseline failures and applying four-state reporting with HARD-GATE markers, you verify compliance and prevent rationalization before deployment.

Can I use anti-rationalization tables to close loopholes in skill documentation?

Anti-rationalization tables close loopholes in skill documentation by providing explicit counters and HARD-GATE markers during the refactoring phase. This prevents agents from bypassing rules and enhances the reliability of the tested skill.

What is the best way to prevent rationalization when writing skills?

The best way to prevent rationalization when writing skills is enforcing a disciplined lifecycle using anti-rationalization tables, red flags, and four-state reporting. Refactoring documentation with explicit counters closes loopholes and ensures bulletproof guides.

When should I not use test-driven development for skill documentation?

Test-driven development for skill documentation should not be used when you cannot observe baseline failures or run iterative tests with subagents. Without proving a minimal skill passes compliance checks, applying the RED-GREEN-REFACTOR cycle provides no validation value.