harness-engineering

harness-engineering is a skill for Claude Code, Codex from lukas-grigis/ralphctl. It costs 96 tokens per session (3,581 once invoked), scanned A, original, MIT.

A reference guide based on three Anthropic articles about building AI-agent harnesses, the systems that give agents structure, memory, progress tracking, and evaluation. It explains when to use fixed workflows, how much scaffolding to add, and how to divide generation from evaluation.

In plain words
What is it for?
Use it when designing or reviewing an agent harness, planning state and handoffs, deciding whether scaffolding is needed, removing parts after a model upgrade, or separating generators from evaluators.
Why use it?
It provides research-based reasoning for designing or auditing systems that support long-running coding work.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/lukas-grigis/ralphctl/harness-engineering
Any agent
npx skills add lukas-grigis/ralphctl --skill harness-engineering
Clone the repo
git clone --depth 1 https://github.com/lukas-grigis/ralphctl

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for harness-engineering

README.md
[![agentmods](https://agentmods.dev/badge/skills/lukas-grigis/ralphctl/harness-engineering.svg)](https://agentmods.dev/skills/lukas-grigis/ralphctl/harness-engineering)
Your own site
<a href="https://agentmods.dev/skills/lukas-grigis/ralphctl/harness-engineering"><img src="https://agentmods.dev/badge/skills/lukas-grigis/ralphctl/harness-engineering.svg" alt="Measured on agentmods" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,581 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00096 $0.03581
Opus 5 $0.00048 $0.01791
Sonnet 5 $0.00019 $0.00716
Haiku 4.5 $0.00010 $0.00358

Measured 5d ago against content hash 330e695ff6fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

harness-engineering scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/harness-engineering/SKILL.md · 215 lines

How it starts

The opening of the file, as written. The whole thing — 215 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Harness Engineering — article-grounded reference

A themed synthesis of three Anthropic engineering articles on building harnesses for agentic and long-running coding work. This is the reference / the why. Two siblings carry the other halves:

  • harness-principles (skill) — the lightweight read-first trigger for structural changes.
  • .claude/docs/HARNESS-PRINCIPLES.md — the ralphctl status map (each principle tagged applied / partial / gap with a code anchor).

This skill does not restate those. It distills the source articles by theme, keeps the load-bearing verbatim quotes with attribution, and ends with a brief pointer to where each idea lives in ralphctl. Citation labels below map to the Sources section. Open the original when a rationale needs full framing.


1. Climb the complexity ladder reluctantly (workflow vs agent)

The vocabulary first. Workflows are "systems where LLMs and tools are orchestrated through predefined code paths"; agents are "systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks" (Building Effective Agents). Most production work wants the predictability of a workflow, not the open-endedness of an agent.

The ladder ascends from a direct API call → the augmented LLM (retrieval / tools / memory) → a single workflow patterncomposed workflows → an autonomous agent. Five workflow patterns are named: prompt chaining, routing, parallelization (sectioning + voting), orchestrator-workers, and evaluator-optimizer. You climb a rung only when the lower one demonstrably fails.

"Consistently, the most successful implementations weren't using complex frameworks or specialized libraries. Instead, they were building with simple, composable patterns." — Building Effective Agents

"You should consider adding complexity only when it demonstrably improves outcomes." — Building Effective Agents

Corollary: invest in the agent-computer interface (ACI) as much as a human UI — tool docs, examples, and poka-yoke (e.g. absolute over relative filepaths) earn their keep. Frameworks "often create extra layers of abstraction that can obscure the underlying prompts and responses, making them harder to debug."

Read the full file on GitHub · 215 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 215 lines · 96 tokens per session scan A 330e695ff6fe

Subscribe to this mod's changes

harness-engineering is a skill published in the GitHub repository lukas-grigis/ralphctl (23 stars, last pushed today), licensed MIT. It adds 96 tokens to every session and 3,581 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.