Skip to the setup

My agent harness

The setup I built around the AI model: memory, rules, guards, tools and checks. Claude Code runs all of it, and Codex works from the same files.

The head chef The main agent

The head chef is the main agent, also called the orchestrator: the model session I talk to. It reads the ticket, decides how the work gets done, and plates the final dish.

What it is

When I type a request, one model session receives it. That session holds the conversation, reads the house rules, picks the tools, and answers to me. As the owner I say what I want cooked and how I like my kitchen run. The head chef has the autonomy to decide how to get there, including whether to do the work itself or hand parts of it to Sous chefs.

Choosing the chef for the job

Models differ in strength, speed and cost, so model choice is part of running the kitchen. A larger model earns its cost on planning, design and judgment calls. A faster one is the better pick for gathering, sorting and summarizing. A harness can also fix the brigade in advance, with pre-written helpers for known jobs, or leave the head chef free to decide when to delegate. Fixed helpers are predictable and repeatable. Letting the head chef decide adapts better to work nobody planned for.

In my setup

I use both. My morning briefing runs a fixed set of pre-written helpers, because the job is the same every day. For everything else the head chef decides, guided by one house rule: hand off work that can run on its own, on the faster Sonnet model by default, and use the larger Opus model only when the task needs it. Some jobs stay with the head chef on purpose. Only the main session writes to my task database, after a background helper once returned made-up tasks.

The counter Context

The counter is the context window: everything the model can see right now. Whatever is on it is within reach, and every item on it takes space.

What it is

A model only knows what is in its context window: my messages, the files it has read, tool results, its own earlier replies, and the rules and tool lists loaded at the start. Like counter space, it is finite. A long session piles old output next to the task at hand, and the chef starts reaching past the right ingredient. In practice, answers get less precise as the window fills, well before it is full.

Counter or walk-in

The counter is working memory, and it is wiped at the end of every session. Anything that has to outlast the session belongs in the The walk-in. So the harness has two jobs here: keep the counter clear of what the current task does not need, and make it cheap to start a fresh session with the right things already set out. Most of the other stations exist partly to protect counter space.

In my setup

Independent or read-heavy jobs go to Sous chefs, who return a summary instead of everything they read. When a session gets long, session-handoff writes a prep list, and the next session starts clean from it. If Claude Code compacts the conversation instead, a hook puts the summary back on the counter and reminds Claude that its skills are still available. One of my Gadgets watches the fill level and offers a handoff at 40 percent.

The walk-in Long-term memory

The walk-in is long-term memory: a vault of notes that outlasts every session. Nothing on the counter survives the night unless it is put away in here.

What it is

My walk-in is a Second Brain: a folder of linked plain-text notes on projects, tools, procedures and past decisions, kept beside raw records that are never edited. The model remembers nothing between sessions on its own, so this is where continuity lives.

How it fills up

Stocking is automated in two tiers. Raw records arrive on their own: when a session ends, a hook saves a summary of it, and meeting transcripts are filed as they come in. Nothing in that tier is edited afterward. The curated notes are stricter. Only one step writes them, a capture at the end of a session that proposes changes I approve. A missing note costs one search. A wrong note misleads every later session that trusts it.

How it is searched

I built the search to work two ways at once. Keyword search finds exact names and identifiers. Semantic search (meaning-based matching) finds the right note when my wording differs from what I wrote months ago, which is where keyword search returned nothing. The two result lists are merged into one ranking. It runs from a single database file on my laptop with a small local embedding model, so no note leaves the machine, and it is checked against its own set of 48 test questions.

In my setup

When my message names a known project, person or tool, a hook looks the name up in an index and puts the matching page's location on the counter. It makes no AI call and never blocks my message if it fails. I also measured whether Claude opened the pages it was handed. Mostly it did not, so a rule now has it search my notes and past sessions before it answers questions about earlier work.

House rules Instruction files

House rules are the instruction files on the wall, called CLAUDE.md, which load into every session before the first ticket. They say how this kitchen runs; recipes cover single dishes.

What it is

A CLAUDE.md file is plain text the model reads at the start of every session. Mine come in layers: a global file for how I work everywhere, a workspace file for folder layout, tool routing and git, and one file per project. When two disagree, the more specific file wins, the way a station card overrides the general house rules. Codex reads a file called AGENTS.md for the same purpose.

Rule, recipe or hook

A rule file is always loaded, so every line costs counter space in every session and competes for the model's attention. That makes it the right home for short rules that apply everywhere and the wrong home for long procedures, which belong in a skill that loads on demand. A rule is also guidance. When something must happen every time, such as blocking a risky command, it belongs in a hook at the The expediter, which runs whether the model remembers or not.

In my setup

In September I rewrote the files for the Claude 5 models, whose guidance recommends explicit preferences and dropping redundant older scaffolding. Each rule became a plain statement with its reason in one clause, strong wording stayed only on real safety lines, and no rule appears twice. Reference material moved into 20 topic docs read only when a task touches them, and reply wording moved into one output style. Then I measured: startup text shrank, but reply length did not change, so reply length got its own tools.

Sous chefs Subagents

Sous chefs are subagents: helpers with their own counter, their own written job and their own tools. They do the prep elsewhere and bring back only the finished result.

What it is

A subagent is a separate model session the The head chef starts for a single job. It gets a clean context window, a role description, a model choice, and its own Access badges: a list of the tools it may use. It works out of sight and returns a summary. The main session never sees the twenty files the helper read on the way, which is the point: the head chef's counter stays clear.

Subagent or skill

A skill is a recipe the head chef follows at its own counter, in the main session, where I can watch and steer each step. A subagent is a job handed to someone else. I use one when the work is independent, read-heavy or parallel, and only the result matters. I keep work in the main session when it needs my judgment along the way, or when a mistake would be hard to spot from a summary. Each helper also starts from scratch, so delegation spends more tokens overall.

In my setup

My morning briefing sends a set of pre-written helpers out in parallel on the faster Sonnet model to gather calendar, email, project activity and news, and the main session assembles the brief. Code reviews go to a fresh helper that has not seen my reasoning, so it judges the change on its own. One step moved back: the helper that read my task list invented tasks when it ran in the background, so that query now runs in the main session. Helpers that touch files also get a security preamble, and each one's badge lists only the tools its job needs.

The expediter Hooks and guardrails

The expediter stands at the pass and checks every plate before it leaves. Hooks do the same: small scripts Claude Code runs at fixed moments, whatever the model intends.

What it is

A hook is a script registered in settings that the app runs at set points: when a session starts, when I send a message, before and after each tool call, when a helper finishes, before the conversation is compacted, and when a session ends. It can allow an action, block it, or add a note for the model. The model does not get a say in whether a hook runs, and that is what separates hooks from rules.

Rule or hook

A rule asks and a hook enforces. Rules hold most of the time, which is fine for style and wrong for credentials, deletions or git commands in the wrong folder. Hooks carry their own costs: one that runs on every message adds delay, and one that crashes can lock you out. So each guard of mine is designed around two decisions made up front: what it blocks, and what happens when the guard itself breaks.

In my setup

I run 44 hook entries across 12 of those moments. Security guards block on a real match, and if the guard itself crashes they let work continue and send me an alert, so a bug never locks me out silently. Built-in deny rules only match the start of a command, so a second guard scans the whole command. After every helper finishes, a hook scans its output for leaked secrets and logs only a count. A hook that starts a model must also carry a guard against calling itself.

Access badges Permissions and settings

Access badges are permissions: the settings that say what each cook may touch. A prep cook's badge opens the fridge and leaves the gas valve locked.

What it is

Claude Code reads a settings file, settings.json, before any work starts. It lists which actions are allowed without asking, which always need my yes, and which are refused outright. It also holds which connectors and plug-ins are switched on and which hooks run. Each helper carries its own badge as well: a subagent's definition names the exact tools it may use, so a helper that only reads email cannot write to a database.

Badge, rule or guard

A house rule tells the cook what I want. A badge decides what the door will open. Permissions are checked by the app, outside the model, so they hold even when the model misreads an instruction. They are also coarse: a rule matches a command by its pattern and cannot judge intent. That is why badges work together with the The expediter, whose guards read the whole action before it goes out.

In my setup

My global settings file carries 50 deny rules, 9 ask rules and 15 allow rules. Reading credential files is denied. Installing new packages and starting another session ask for my approval first. Every one of my 77 pre-written helpers has its own tool list, kept as short as its job allows. Settings come in layers like the house rules do: one for my whole machine, one for the workspace, and one for a single project.

Phone and catalogs CLIs and MCPs

Both are ways to order from outside suppliers. A CLI is a phone call: quick, light, and over when you hang up. An MCP server is a supplier's catalog left on the counter, with every item and its order form written out.

What each is

Both let the model reach outside services, like email or a database. A CLI is a command-line program, such as gh for GitHub. The model types a command, reads the answer and moves on. An MCP server is a connector built on the Model Context Protocol. It hands the model a written list of tools for one service, each with a description and the exact inputs it takes, and it manages the sign-in to that service.

Which one, and why

A phone call takes no room in the kitchen until you make it, and the chef already knows how to use a phone. A catalog has to be on the counter to be useful: the model reads what each connected server offers at the start of every session, whether or not it orders anything that day. Claude Code now keeps most of the detailed pages closed until they are needed, which helps, but a stack of catalogs still crowds the counter. Catalogs earn their place when a service has no command-line program, when the sign-in is hard to manage by hand, or when orders must follow an exact form.

In my setup

My rule is CLI first. Gmail, Calendar and Drive go through the gws CLI, GitHub through gh, plus the supabase, vercel and codex CLIs, a local web scraper, and yt-dlp with ffmpeg for video. A guard keeps the browser off sites that already have a CLI. Catalogs cover what a call cannot: Notion, search over my vault, Context7 for current library docs, Fireflies for meeting transcripts, Firecrawl for sites that block scrapers, and a real Chrome browser when a page needs clicking. Connectors I am not using stay switched off, so their catalogs are not on the counter.

Gadgets Mods I built

Gadgets are mods: small programs that change Claude Code itself by adding buttons, panels and switches. They are equipment for the station, separate from the cooking.

What it is

A mod is code the Claude Code app loads. It can react to the same moments as a hook, and it can also change the app: add a slash command, a button, a status label or a side panel, and remember values for the length of a chat. The short version: a skill teaches the model a job, a hook enforces a rule, and a mod changes the workspace the model works in.

Mod, rule or output style

short-and-sweet is a per-chat switch that keeps replies to one to three plain sentences. As a CLAUDE.md rule or an output style it would apply to every chat, and I want it for some. As a mod it attaches the length rule to each message I send while it is on, so compacting the chat cannot drop it, and it leaves helpers' work alone so their reports stay complete. It also adds a Tell me more button for the answer that needs length, which no rule file can do.

In my setup

drift-watch checks every few messages whether the session is still on its goal, lists each check in a side panel, and lets me stop and correct course. context-nudge offers a handoff at 40 percent context, has Claude finish the current piece at 45, and at 65 stops and recommends a handoff, which I run myself. sessions adds a /sessions table of every live session on my machine, with an End button for idle ones.

The weekly menu is the plan: what we are cooking, in what order, and what has already gone out. GSD keeps that plan in files, so it survives the end of every session.

What it is

GSD is an open-source planning framework for Claude Code. A project gets a roadmap split into phases, and each phase moves through discussing, planning, executing and verifying. The state lives in plain files in a .planning folder: the roadmap, a state file saying where things stand, and a plan for each phase. A new session reads those files and picks up where the last one stopped.

Why it matters

The model has no sense of a project beyond its counter. Without a written plan, long work drifts: each session does the task in front of it well and loses the larger order. A plan in files gives every session the same menu and gives me a fixed place to check progress against intent. The cost is ceremony. A full phase cycle is heavy for a quick fix or an experiment.

In my setup

GSD's 72 skills and its helper agents are installed, and I use it for multi-phase work that has to survive many sessions. I ask before starting any planning framework on new work and pick by situation: GSD for operational projects and anything already tracked in its files, a lighter spec-driven loop inside a single feature, and direct work for one-off tasks. GSD can make quick experiments and bug fixes hard to slot in without losing the roadmap, so small work stays outside it.

Off the menu What I turned off

Off the menu is what I tried and took away. A harness improves by removing things as often as by adding them.

What it is

Every always-on piece costs something: counter space, delay, or one more voice telling the model what to do. When two pieces give conflicting instructions, the model has to guess which one wins. So I review what loads into every session and take out what is not earning its place, the way a kitchen drops a dish that slows the whole line.

How I decide

I cut in ways I can undo. Before removing a tool, I check whether it has been used recently and whether it will be needed later. Disabled connectors stay listed so they can be switched back on for a task that needs them. I measure before and after a change, so a removal is judged on evidence.

In my setup

In July I retired an automatic sync that wrote to my vault on its own, because nothing should write long-term memory while I am not watching. I switched off connectors for agent swarms, UI design and n8n builds, the context-mode plugin, whose injected formatting rules clashed with my reply style, and an always-on startup hook that added over a thousand words to every session. A prompt-classifier hook stays off until it passes a test. I also avoid one Codex model that hangs on long runs.

Two cooks

Claude Code is my main kitchen. Codex, from OpenAI, is a second cook trained in a different kitchen. A model is weakest at catching its own mistakes, because it reviews with the same blind spots it wrote with. A cook from elsewhere tastes the dish fresh.

Runs in both
Four shared skills, and the impeccable design check that runs after interface edits. A project can carry an AGENTS.md file, which Codex reads the way Claude reads CLAUDE.md.
Shared plain files
My Second Brain notes and each project's plan and handoff files are plain text. Either cook can open them, so a Codex session can start from the same menu and the same notes.
Claude Code only
The hooks and guards, the mods, the slash commands, the helper agents and most skills. The guards at the pass do not protect a Codex session, so Codex runs read-only by default.

How I use it: the codex skill asks for a second opinion on a plan, an approach or a bug with several plausible causes, and I treat its findings as hypotheses to check. double-review runs Codex and a separate Claude reviewer on the same change and combines their verdicts. For risky builds, codex-loop has Codex review the plan until we agree, then build the coding steps, with two points where I approve.

The recipe binder

A skill is a recipe card in a binder: a folder with written instructions, often with scripts and reference files beside them. Claude sees only each skill's one-line description until a task matches, then opens the full card, so know-how costs almost no counter space until it is needed.

A rule file is always on and says how the kitchen runs. A skill is opened for one kind of job and followed by the head chef in the main session. A subagent is a job handed to a separate helper. My skills folder holds 174 skills, 72 of them from the GSD framework; these are the ones I reach for. Tap a binder to open it. Borrowed recipes name their author, and skills tied to a client stay off this page.

Closing the kitchen End of every sessionsession-handoff, end-session, om-idea-capture
  • session-handoffEnds a long session by writing a handoff file with what was done, what is open and the next step, so a fresh session picks up with a clean counter.
  • end-sessionCloses a session without a handoff file: it saves the session to memory, proposes any notes worth keeping, and states the next step. For work that is finished.
  • om-idea-captureFiles content ideas that come up during work into my ideas database. The end-of-session step calls it, so I rarely run it by hand.
Reading the ticket Before I build anythinggrilling, brainstorming, explain-like-im-12
  • grillingHas Claude question me hard about a plan or design before anything is built, to find the gaps while they are still cheap to fix.Borrowed from Matt Pocock
  • brainstormingWorks through intent, requirements and design before build work. I use it for open questions, like what on a long roadmap should go first.Borrowed from Jesse Vincent (Superpowers)
  • explain-like-im-12Switches Claude to plain English with analogies for a technical topic. I use it when an explanation is accurate but hard to follow.
A second taste Second opinions and reviewscodex, codex-loop, systematic-debugging, agy
  • codexAsks Codex, a model from a different company, for a second opinion on a plan, an approach or a tricky bug. Its findings are hypotheses to check.
  • codex-loopFor risky multi-step builds: Claude plans, Codex reviews the plan until both agree, then Codex builds the coding steps, with two points where I approve.
  • systematic-debuggingStarts when something breaks and has Claude find the root cause before it proposes a fix.Borrowed from Jesse Vincent (Superpowers)
  • agyPuts a Google Gemini model on call through the Antigravity CLI, mostly for a parallel research pass or a third opinion.
Plating Design and building leanimpeccable, ui-ux-pro-max, taste, ponytail
  • impeccableA design skill for layout, type, color and accessibility, with a check that runs after interface edits. It shapes how a page looks; the words come from me.Borrowed from Paul Bakaus
  • ui-ux-pro-maxA large reference of design styles, palettes and font pairings. Useful for options; choosing among them stays my job.Borrowed from Next Level Builder
  • tasteSteers front-end work away from templated, generic layouts. I pair it with impeccable when helpers build interface pieces.Borrowed from Leonxlnx
  • ponytailHolds code work to the smallest change that fully solves the task. My helpers start in its lightest mode, since every extra line is one more to review.Borrowed from Dietrich Gebert
Morning prep Daily workmorning2, email-sweep, explain-deck, om-contract-generator
  • morning2My morning briefing: helpers gather calendar, email, projects and news in parallel, and the main session turns them into one page.
  • email-sweepTriages a full inbox: applies labels, flags what is urgent and starts reply drafts. It shows the plan before it changes anything.
  • explain-deckTeaches me a large topic in layers, simple first, built only from my own material so every slide has a source.
  • om-contract-generatorTurns an accepted proposal into a statement of work, filling in my standard terms without inventing new ones.
Front of house Client-facing writingcopywriting, om-proposal-generator
  • copywritingConversion-focused copy for web pages, starting from a brief. I use it for structure and review, and edit the final wording myself.Borrowed from Corey Haines
  • om-proposal-generatorTurns a discovery call into a proposal with scope and pricing. I read, edit and send it myself.
Also in the kit Used less, still on the shelfwatch, video-clipper, notebooklm, frontend-slides, find-skills, caveman
  • watchLets Claude watch a video from a link or file, using still frames and a local transcript, so it understands what is shown as well as what is said.Rebuilt from bradautomates (claude-video)
  • video-clipperCuts a long talking-head video into a website cut and short clips, with my approval before anything renders.
  • notebooklmDrives Google NotebookLM from Claude, so research I have gathered can become explainers.Borrowed from teng-lin
  • frontend-slidesBuilds slide decks as web pages. I keep mine light on text, since they support a talk.Borrowed from Zara Zhang
  • find-skillsSearches the public skills directory before I build something, in case a skill for it already exists.Borrowed from Vercel
  • cavemanMakes Claude answer in clipped, minimal language to save tokens, for sessions where I only need terse status.Borrowed from Julius Brussee