Skip to complete skill
Free community skill@mitchellh

Harness Engineering Skill Based on Mitchell Hashimoto’s Workflow

Independently compiled by XSkills from public material by Mitchell Hashimoto.

Convert recurring agent failures into concise repository instructions or fast verification tools, then prove the improved harness prevents the mistake.

Skill brief

Is this the right skill?

Use it when

  • You see an agent repeat wrong commands, APIs, conventions, or unverifiable behavior.
  • You have an AGENTS.md-equivalent or can add focused developer tools.
  • You want each correction to improve future sessions rather than one prompt.

What you get

  • Reproducible failure case
  • Instruction-or-tool decision
  • Scoped harness change

Workflow

6 moves
  1. 01

    Reproduce the failure

  2. 02

    Classify the missing feedback

  3. 03

    Choose instruction or tool

  4. 04

    Make verification discoverable

  5. 05

    Replay without the answer

  6. 06

    Keep only proven improvements

Complete instruction set

Complete SKILL.md

Read every instruction below or copy the complete file directly into your agent.

Agent harness improvement loop

Make each observed agent failure improve the environment for future sessions instead of correcting only the current prompt.

Capture a real failure

Before changing the harness, preserve:

  • the assignment and relevant context;
  • the environment and agent;
  • changed files or proposed action;
  • the incorrect behavior;
  • the check, review, or evidence that proved it was wrong;
  • the expected correct behavior.

Reduce it to the smallest reproducible failure. Do not create repository-wide guidance from an unverified anecdote.

Classify what was missing

Choose the primary failure class:

  1. Stable fact: the agent did not know a repository convention, supported API, boundary, or required command.
  2. Poor interface: the correct developer command is slow, confusing, nondeterministic, or returns unhelpful errors.
  3. Missing observability: the agent cannot see logs, screenshots, generated output, application state, or another result it needs.
  4. Missing verifier: no focused test or tool distinguishes correct behavior from incorrect behavior.
  5. Codebase defect: the repository itself encodes an unsafe or misleading pattern that should be fixed rather than documented.

Choose the smallest durable remedy

  • Add a concise AGENTS.md-equivalent instruction for a stable fact.
  • Improve or wrap a developer command when the interface is the problem.
  • Expose compact logs, screenshots, or state when observability is missing.
  • Add a focused test or verification script when correctness lacks a signal.
  • Fix the codebase when documentation would merely preserve a workaround.

Pair a new tool with the minimum instruction needed to make it discoverable. Scope instructions as narrowly as the repository permits.

Design agent-friendly feedback

The remedy should be fast, deterministic enough to trust, and explicit about misuse. Successful output should be short. Failure output should identify what failed and the next useful action. Avoid dumping entire logs when a filtered view can answer the question.

Replay in fresh context

Start a fresh agent session that has the improved harness but not the earlier solution. Give it the same class of task and observe whether it:

  1. discovers the instruction or tool;
  2. selects the correct command or API;
  3. detects the failure itself;
  4. reaches the expected result with less steering.

Retain the harness change only when the replay prevents the failure or exposes it early enough to guide correction. Tighten, relocate, or remove guidance that is ignored, ambiguous, redundant, or too broad.

Return

FailureClassificationRemedyScopeFresh replayDecision

Include the exact instruction or tool, evidence from the replay, and any obsolete guidance removed during the change.

Source attribution

Independently compiled by XSkills from Mitchell Hashimoto's account of adopting coding agents. Hashimoto did not author or review this skill. The source defines harness engineering as turning observed bad agent behavior into better implicit prompting through repository instructions or programmed verification tools. The failure taxonomy, fresh-context replay, pruning criteria, and output table are XSkills adaptations. Attribution does not imply endorsement.

Keep exploring

Related agent skills

Browse software engineering skills

Turn an X workflow into your own skill.

Paste a public X post and get a free SKILL.md.

Build one free

Evidence and package

Source, changes, and version

Source

XSkills independently compiled this from public material by Mitchell Hashimoto. Attribution does not imply endorsement.

Open source evidence ↗

What XSkills changed

XSkills additions are labeled in the complete SKILL.md.

Limitations

  • Do not accumulate one-off prompt history in repository-wide instructions.
  • Do not add slow, noisy verification when a focused check can provide the same signal.
  • Do not encode a workaround when the underlying code or developer interface should be fixed.

Version

Package version
Not assigned
Fingerprint
d6fc542a00c7
Last reviewed
Not recorded
License
Not specified