harness-engineering
What it does
This skill explains how to set the boundaries around an AI agent that runs on its own, such as what it may change, how it logs progress and when a person must approve. It is for teams running autonomous agent loops.
When to use it
- ✓When you want an AI agent to run research or experiments for a long time without constant prompts.
- ✓When you need to stop an agent from changing its own scoring rules or benchmarks.
- ✓When you are setting up an agent that prepares pull requests and needs approval steps.
Skill link
https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/blob/main/skills/harness-engineering/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Design a safe setup for an agent that runs experiments overnight, with a fixed scoring check and a human approval step before anything is merged.”
5 new skills a week. 1 minute to read.
How it works
The skill describes locked and editable parts, durable logs, novelty checks, rollback and approval points, so the loop can run without going off track.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Harness Engineering
Harness engineering designs the control system around an agent: what it may edit, how it receives feedback, where it writes state, how failures recover, and who can approve irreversible actions. The harness is the difference between a helpful agent session and an autonomous loop that can run for days without corrupting its objective.
When to Activate
Activate this skill when:
- Building autonomous research or experimentation loops
- Designing an agent environment with locked metrics and editable code or content
- Creating PR-producing or background agents
- Evaluating whether an agent can safely run without frequent human prompts
- Adding novelty, ablation, pruning, rollback, or durable logging to an agent workflow
- Preventing agents from gaming benchmarks, weakening rubrics, or losing state across compaction
Do not activate this skill for adjacent work owned by other skills:
- General quality gates, regression suites, or outcome metrics without autonomous control surfaces:
evaluation. - Tool schemas, response formats, and recovery errors for harness tools:
tool-design. - Project-level task-model fit, pipeline shape, and cost planning:
project-development. - Remote sandbox, warm-pool, and hosted session infrastructure:
hosted-agents.
Core Concepts
Harness Boundary
Separate the agent from the environment it operates inside. The agent proposes actions; the harness defines allowed surfaces, feedback, persistence, and promotion rules.
Use four surface classes:
| Surface | Examples | Rule |
|---|---|---|
| Locked | Eval metric, rubric, validation script, merge policy | Agent may read and propose changes, but cannot score itself with modified rules |
| Editable | Skill draft, experiment file, prompt, config under test | Agent may mutate during the loop |
| Append-only | Results log, research thread, rejected ideas | Agent may append, not rewrite |
| Human-controlled | Merge, production deploy, credentials, destructive operations | Requires explicit human approval |
Tight Feedback Loops
Autonomy works when feedback is fast, unambiguous, and hard to game. Karpathy's autoresearch is the minimal pattern: one editable file, one locked evaluation file, fixed wall-clock budget, one scalar metric, git rollback, and a durable results log. The lesson is not that every harness needs one metric; it is that ambiguous feedback creates ambiguous autonomy.
For open-ended research-to-skill work, replace the scalar metric with locked rubrics, deterministic structure checks, source traceability, and human review thresholds.
Durable State
Long-running agents must externalize state. Store plans, source queues, results, failures, and handoffs in files so future agents can resume without relying on chat history. Prime Intellect's autonomous nanoGPT work showed the value of durable scratchpads and THREAD.md-style logs for recovery, monitoring, and audit.
Use append-only logs for:
- What was tried
- What improved or failed
- Why a candidate was kept, discarded, or routed to review
- Which upstream sources were checked
- What the next agent should do
Search Discipline
Agents tend to exploit the nearest surface, stack complexity, and under-run pruning. Add explicit search rules:
- Refresh upstream sources on a schedule.
- Require novelty checks before spending large budgets.
- Preserve rejected attempts to avoid rediscovery.
- Run leave-one-out pruning when a stack has multiple additions.
- Reward simplification when quality is equal.
- Use separate verification before promotion.
Mechanism Registry
For research-to-skill systems, track accepted mechanisms separately from prose. A mechanism record should include a stable mechanism_id, owning_skill, status, activation scenario, behavior change, evidence, and failure modes. Novelty gates should compare against this registry before using broader corpus overlap, because keyword overlap catches stale phrasing while mechanism comparison catches real duplication.
Governance
Autonomous agents may prepare PRs, but governance must be explicit. They can draft changes, run checks, and write PR summaries. They should not merge, deploy, or push without human approval unless the user has explicitly granted that permission for the specific action.
Detailed Topics
Autoresearch-Style Loop
Use this pattern when optimizing an artifact against a stable evaluator:
read locked context -> choose hypot
FAQ
What is a locked surface?
It is a part of the setup, such as the scoring method, that the agent is not allowed to change.
Why keep logs?
Durable logs let the agent and people see what was tried, which helps recovery after failures.
When does a person step in?
The skill defines human approval points before irreversible actions, such as merging changes.
Details
Original description by the author
This skill should be used when designing autonomous agent harnesses: research loops, evaluation scaffolds, locked and editable surfaces, durable logs, novelty gates, pruning, rollback, PR preparation, and human approval boundaries.
Popularity
- GitHub stars
- 18k
- Ranking position
- #10643
- License
- MIT
- Updated
- 10/11/2026
Comments
- …
More skills from this repository
context-engineering-collection
18kHelps your agent manage what goes into an AI model's context window, from memory and tools to multi-agent setups and evaluation.
advanced-evaluation
18kTeaches your agent how to judge AI answers using another AI, with scoring, side-by-side comparison and bias checks.
bdi-mental-states
18kTeaches your agent to model beliefs, goals and plans using the BDI approach, so its decisions can be traced and explained.
context-compression
18kHelps your agent shorten long AI sessions into summaries that keep decisions, files, risks and next steps.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.