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
- Subagents — specialist workers with their own context, tools and instructions. The main agent delegates, and its own context stays clean.
- 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.
- 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.