code-as-harness

Diagnoses confirmed repeated user friction and proposes code-level harness fixes.

2.9k|733|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/zts212653/clowder-ai --skill code-as-harness
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-as-harness
Source: https://github.com/zts212653/clowder-ai/tree/main/cat-cafe-skills/code-as-harness
Command: npx skills add https://github.com/zts212653/clowder-ai --skill code-as-harness

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When an AI agent repeatedly makes the same mistake, treating each complaint as a one-off criticism wastes the signal. This Skill turns confirmed repeated user friction into a diagnostic workflow that classifies root causes and fixes them with code (hooks, lints, guards) instead of prompt-level apologies.

Core Features & Use Cases

  • Evidence-Gated Triggering: Searches thread history to confirm a complaint is genuinely repeated before opening any diagnosis, avoiding over-triggering on common words like "again".
  • Root Cause Classification: Sorts confirmed issues into harness defects, architecture limits, execution lapses, repeatable new capabilities, or taste signals, each with a distinct handling path.
  • Structured Diagnosis Output: Emits interactive decision cards when operator judgment is needed, or result cards after autonomous fixes, always including root cause, evidence, and disposition.
  • Use Case: An operator says "you forgot to commit again". The agent searches history, finds three prior occurrences across two threads, classifies it as a harness defect, and proposes a pre-commit hook fix via an interactive card.

Quick Start

Ask the agent to investigate whether a repeated mistake has happened before and propose a code-level fix instead of an apology.

Frequently Asked Questions about code-as-harness

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

FAQPage Schema
How do I stop an AI agent from repeating the same mistake?

Confirm the mistake is genuinely repeated by searching conversation history for prior occurrences, then classify the root cause. If it is a harness defect, fix it with code such as a hook, lint rule, or guard rather than relying on prompt instructions the agent may forget.

What is the difference between a harness defect and an execution lapse?

A harness defect is a recurring behavior that can be mechanically prevented with code like hooks or guards. An execution lapse means existing rules already covered the case but the agent failed to follow them, so the fix is checking why the guidance was not loaded or applied.

When should repeated friction not trigger a diagnosis?

Do not trigger diagnosis for one-time criticisms, first-time code bugs with clear error messages, reviewer feedback, playful remarks, or brand-new tasks. Evidence search must confirm the issue actually occurred before; keywords alone only trigger verification, not a diagnosis card.

Can this approach handle problems that need new capabilities?

Yes. When a task type has occurred at least twice and will recur, it is classified as a buildable new capability and routed to a build workflow that explores tools, defines constraints, divides work, and eventually codifies a new skill. One-off tasks are just done directly.

Why fix agent behavior with code instead of better prompts?

Prompt-level soft constraints get forgotten across sessions, while code-level mechanisms like hooks, lints, and guards enforce behavior deterministically. The skill treats user friction as a training signal for the harness, not as a complaint to apologize for.