agent-hierarchy

agent-hierarchy is a skill for Claude Code, Codex from cbrock84/headcount. It costs 131 tokens per session (1,160 once invoked), scanned A, original, MIT.

A method for organizing a coding agent and its helper agents by exactly which files each one may edit. It separates builders from read-only reviewers and checks those boundaries in continuous integration, the automated checks run on code changes.

In plain words
What is it for?
Use it to design, expand, review, or repair a multi-agent setup in a repository, including a monorepo, a project that keeps many related packages in one repository.
Why use it?
It prevents multiple agents from changing the same files, makes ownership clear, and ensures that the agent producing work is not the only one checking it.

Skill for Claude CodeCodex

Part of the executive plugin — 7 skills shipped together

About the project

headcount is an organization of independently installable Claude Code plugins, each grouping skills for a department such as finance, security, or demand generation. Claude Code users install the departments they need and invoke their skills for specialized work; the catalogue entries are skills and related agent tooling from that organization.

cbrock84/headcount · 1,247 stars · on GitHub · cbrock84.github.io

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/cbrock84/headcount/agent-hierarchy
Any agent
npx skills add cbrock84/headcount --skill agent-hierarchy
Clone the repo
git clone --depth 1 https://github.com/cbrock84/headcount

Made for: Claude Code, Codex.

Or install executive, the plugin that ships this one along with the rest of its 7 skills.

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 agent-hierarchy

README.md
[![agentmods](https://agentmods.dev/badge/skills/cbrock84/headcount/agent-hierarchy.svg)](https://agentmods.dev/skills/cbrock84/headcount/agent-hierarchy)
Your own site
<a href="https://agentmods.dev/skills/cbrock84/headcount/agent-hierarchy"><img src="https://agentmods.dev/badge/skills/cbrock84/headcount/agent-hierarchy.svg" alt="Measured on agentmods" height="20"></a>
Per session 131 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,160 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.1 $0.00131 $0.01160
Opus 5 $0.00066 $0.00580
Sonnet 5 $0.00026 $0.00232
Haiku 4.5 $0.00013 $0.00116

Measured yesterday against content hash 87c4f28f6416, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

agent-hierarchy 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 yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/agent-guard.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/executive/skills/agent-hierarchy/SKILL.md · 81 lines

How it starts

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

Agent hierarchy

A method for standing up an orchestrator → specialist-subagent hierarchy, extracted from a working implementation of ~24 agents over a 1,500-file monorepo, machine-checked on every PR.

The whole method in one paragraph

Split agents by write surface, not by topic. Two classes only: builders, which edit inside exactly one exclusive surface and never commit, and reviewers, which are permanently read-only and can always run in parallel. The orchestrator — the main chat — is the sole committer. Write the surface map before any charters, keep it in one Markdown file, and enforce it with a script that runs in CI. Each row also carries an authorityautonomous, proposes, or escalates — which answers the separate question of whether that agent's work may land without a decision; most rows are autonomous, and gating everything makes the gate meaningless. Producer and auditor are never the same agent. For each class of fact, exactly one file owns it and everyone else derives.

Why topic splits fail

"One agent on SEO, one on UI" is the intuitive split and it breaks immediately: both end up editing tokens.css. Neither is wrong, and neither can be held responsible. A surface split has no such overlap by construction — which is exactly what makes it checkable.

Order of operations

Do not start writing charters early; the order is the method.

  1. Inventory the real treegit ls-files | sed 's|/[^/]*$||' | sort -u. Report what is actually there before proposing anything.
  2. Propose the roster — the smallest set where no two agents share a file. Each needs an id, a class, a one-line remit, and its exact globs. An agent whose surface cannot be stated in globs is not an agent; fold it in.
  3. Write the surface map — one Markdown file, one row per agent.
  4. Wire the guardscripts/agent-guard.mjs check proves the map is coherent (no path claimed twice, no path unowned); agent-guard.mjs diff <agent> proves a given diff obeyed it. Both are needed: once the orchestrator commits, the authorship that diff checks is gone, so it has to run while the work is still attributable.
  5. Write charters last, in the format in the playbook: why the agent exists, what it must never do, the verification its surface implies, and a six-section return contract.

Read the full file on GitHub · 81 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday Changed · +7 lines 87c4f28f6416
  2. 5d ago First seen · 74 lines · 131 tokens per session scan A 920eed0af9cf

Subscribe to this mod's changes

agent-hierarchy is a skill published in the GitHub repository cbrock84/headcount (1,247 stars, last pushed 2d ago), licensed MIT. It adds 131 tokens to every session and 1,160 once invoked, about $0.0007 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.

Related

Other skills, from other repositories

save

Save durable decisions, findings, plans, and implementation knowledge from the visible Codex conversation into a new or existing NeatContext context. Use only when the user explicitly invokes this skill or asks to preserve the current conversation as reusable context.

XTSoftwareLabs/neatcontext-plugins · 49 tokens

status

Report the NeatContext context and routing mode active in Codex, including missing-file or stale-routing warnings. Use when the user asks which context is connected or explicitly invokes this skill.

XTSoftwareLabs/neatcontext-plugins · 39 tokens

mode

Show or set NeatContext routing to auto, ask, or manual for Codex, with an optional default shared with every other NeatContext host. Use only when the user explicitly invokes this skill or clearly asks to change routing behavior.

XTSoftwareLabs/neatcontext-plugins · 50 tokens

list

List the local NeatContext Contexts available to Codex. Use when the user asks what contexts exist, what can be connected, or explicitly invokes this skill.

XTSoftwareLabs/neatcontext-plugins · 35 tokens

build-oxpecker-web-app

Build or modify an Oxpecker web application in idiomatic F#, using endpoint routing, functional EndpointHandler and EndpointMiddleware composition, ASP.NET Core metadata, and focused endpoint tests.

gaelic-ghost/socket · 44 tokens

dns

This skill should be used when the user asks about "DNS", "domain resolution", "GeoDNS / geo routing", "latency-based routing", "weighted / failover routing", "Route 53 / Cloud DNS", an "A/CNAME/ALIAS record", "anycast", or "DNS TTL / propagation". It gives the global front door that maps a name to the right IP and…

proyecto26/system-design-skills · 131 tokens