← All posts

Subagents, hooks and skills: the three levers of a Claude Code harness

A single long prompt stops scaling the moment an agent touches real enterprise systems. What works in production is a harness: small, well-scoped pieces with clear contracts between them.

Why a harness, not a prompt

Prompts drift. The same request gives different results on different days, and one bad tool call can undo an hour of work. A harness turns "please behave" into structure the agent cannot ignore.

The three levers

  1. Subagents — specialist workers with their own context, tools and instructions. The main agent delegates, and its own context stays clean.
  2. Hooks — deterministic code that runs on lifecycle events: before a tool call, after an edit, when the agent stops. Use them for rules that must always hold.
  3. Skills — packaged instructions and scripts that load only when relevant, so know-how is reused instead of re-pasted into every prompt.

A rule of thumb

If it must happen every time, make it a hook. If it is reusable know-how, make it a skill. If it needs isolated context, make it a subagent.

What it changed

Moving our agents onto this structure made them predictable enough to trust with real workflows. Combined with Agentic RAG, the harnesses now remove 50,000+ hours of manual work a year — and they improve over time, because every fix becomes a hook or a skill instead of a one-off prompt tweak.

Keep reading

From PDFs in S3 to searchable data: an ingestion pipeline that reruns safely

How I structure Airflow + Amazon Textract pipelines so a failed night never means duplicate or missing records.

The 10 metrics I track before an LLM feature ships

Faithfulness, relevance, correctness and friends — a practical evaluation loop that improved response quality by 38%.