Capital & Compute

Our Claude Code Harness: Hooks, Skills and Mods

How we run Claude Code on this site: the rules file, guard hooks, a skills pipeline for every post, and the eight mods we built to watch each session.

Every post, tracker and chart on Capital & Compute is built with Claude Code, inside a harness we designed and keep extending. This section is where we document it: what each layer does, why it is there, and what we would change. It is our own setup, written from running it daily, not a neutral comparison. For the neutral version of each layer, the Claude Code harness guide explains every extension point and what it costs in context.

What we have built

How our harness is layered

A harness is everything around the model that decides what it sees, what it may do and what gets checked afterwards. Ours has four layers, each doing one job:

  1. Rules. A single CLAUDE.md holds the standing orders: the commercial goal, the sourcing and citation rules, the house style, and the hard limits (never commit or push without being asked, never call a banned data source). Rules that only apply to one kind of file live in path-scoped rule files, so they load only when they matter.
  2. Guards. Settings hooks enforce what a rule can only ask for. One reminds Claude when a new post is written without a hero image, and a Stop hook will not let the turn end while a recent post still lacks one. The build itself fails on a title or description outside the search length limits.
  3. Skills. A pipeline of skills runs every post the same way: topic planning, a live search-results check before a title is locked, the brief, the draft, a visual pass, the snippet pass and the hero image. Data trackers have their own refresh skills that verify each number against its source before writing it.
  4. Mods. Since Claude Code shipped mods, eight of our own draw a status band above the prompt so we can see the session itself: context, the branch and PR, memory load, machine load and plan usage, without spending a token.

Why we build our own instead of installing everything

Every layer costs something. Rules and skills cost context on every request, guards cost a little time on every tool call, and a third-party mod runs with full access to the machine. So we add a piece only when it fixes a mistake we have actually seen, and we write most of them ourselves so we know exactly what they touch. When a mod or skill from someone else is the better tool, we use it; the guide to the best Claude Code mods covers where to find them and how to vet one first.

Background reading

Frequently asked questions

What is a Claude Code harness?
The setup around the model that shapes each session: instruction files such as CLAUDE.md, settings hooks that block or check actions, skills Claude loads for specific jobs, MCP servers that add tools, and mods that change the interface and behavior from inside Claude Code.
Is this harness available to install?
Not as a package. This section explains how each layer works and shows the patterns, so you can build the parts that fit your own project.
Which part of the harness should you build first?
The rules file. It is the cheapest layer and every other layer refers to it. Add a guard hook the first time Claude breaks a rule that matters, and a skill once you find yourself pasting the same instructions into chat.