agent-hierarchy

agent-hierarchy is a skill for Claude Code from cbrock84/headcount. It costs 131 tokens per session (1,307 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 Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the executive plugin — 8 skills shipped together

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cbrock84/headcount/agent-hierarchy
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 · 2,582 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.

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.

Or install executive, the plugin that ships this one along with the rest of its 8 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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agent-hierarchy

Your own site · 80×15
<a href="https://agentmods.dev/skills/cbrock84/headcount/agent-hierarchy"><img src="https://agentmods.dev/badge/skills/cbrock84/headcount/agent-hierarchy.svg" alt="Reviewed on agentmods" width="80" 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,307 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.01307
Opus 5.5 $0.00052 $0.00523
Sonnet 5.5 $0.00026 $0.00261
Haiku 4.5 $0.00013 $0.00131

Measured yesterday against content hash 1905ce724225, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 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 authority — autonomous, 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 tree — git 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 guard — scripts/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 · 87 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 · +6 lines 1905ce724225
  2. 2mo ago Changed · +7 lines 87c4f28f6416
  3. 3mo 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 (2,582 stars, last pushed today), licensed MIT. It adds 131 tokens to every session and 1,307 once invoked, about $0.0005 per session on Opus 5.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

agent-hierarchy compared with skills from other repositories

agent-hierarchy next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agent-hierarchycbrock84/headcountSkill2.6ktodayMITA131Claude Code
dnsproyecto26/system-design-skillsSkill1481mo agoMITA131Claude Code
distributed-searchproyecto26/system-design-skillsSkill1481mo agoMITA117Claude Code
sharded-countersproyecto26/system-design-skillsSkill1481mo agoMITA106Claude Code
launch-google-searchmarkifact/markifact-mcpSkill5910d agoMITA56Cursor
negative-keyword-sweepmarkifact/markifact-mcpSkill5910d agoMITA56Cursor
rotate-creativemarkifact/markifact-mcpSkill5910d agoMITA57Cursor