Agent skill

Agent Hierarchy

by cbrock84 in cbrock84/headcount

Designs orchestrator-and-subagent hierarchies for a repository — splitting agents by exclusive write surface, pairing every producer with an independent auditor, and enforcing the split with a…

MITAuto-check passedAgent Workflows

Install Agent Hierarchy

skills CLI
$ npx skills add cbrock84/headcount --skill agent-hierarchy -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cbrock84/headcount agent-hierarchy --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cbrock84/headcount.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/executive/skills/agent-hierarchy .claude/skills/agent-hierarchy && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agent-hierarchy
GitHub stars
2k
Token cost
~1.2k tokens
SKILL.md length
661 words
Files
5 (incl. scripts, references)
Skills in repo
178
Repo updated
First seen
Licence
MIT

At a glance

Designs orchestrator-and-subagent hierarchies for a repository — splitting agents by exclusive write surface, pairing every producer with an independent auditor, and enforcing the split with a…

  • Works in 5 steps: Inventory the real tree — git ls-files |… → Propose the roster — the smallest set… → Write the surface map — one Markdown… → …
  • Wants to set up
  • SKILL.md covers The whole method in one…, Why topic splits fail, Order of operations and Rules that carry a failure…, plus 3 more sections
  • Runs JavaScript scripts from its folder; calls git

What it does

Agent Hierarchy is an agent skill from cbrock84/headcount. Designs orchestrator-and-subagent hierarchies for a repository — splitting agents by exclusive write surface, pairing every producer with an independent auditor, and enforcing the split with a script that runs in CI. Use this whenever the user wants to set up, expand, audit, or fix a multi-agent or subagent structure for a codebase; asks how to divide work between agents; wants agent charters, roles, or a surface map written; or is hitting agents that collide on the same files, review their own work, or drift…

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `references/bootstrap-prompt.md`, `references/playbook.md` and `references/starter-rosters.md`).

It sits in Agent Workflows, covering Subagents and Multi-agent orchestration. The repository describes itself as: An agent organization structured as a company — 15+ departments, 125+ skills, each independently installable, citing the standards and regulators that settle the question. Runs… The licence is MIT.

When your agent uses it

  • Wants to set up
  • Fix a multi-agent
  • Subagent structure for a codebase
  • Asks how to divide work between agents

Example prompts

  • “Use the agent-hierarchy skill to design orchestrator-and-subagent hierarchies for a repository — splitting agents by exclusive write surface…”
  • “/agent-hierarchy”

Requirements

  • Node.js

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Inventory the real tree — git ls-files | sed 's|/[^/]*$||' | sort -u. Report what is
  2. Propose the roster — the smallest set where no two agents share a file. Each needs an
  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
  5. Write charters last, in the format in the playbook: why the agent exists, what it must

What it can do on your machine

Read from SKILL.md and the folder at commit 98d1c17. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agent Hierarchy loads about 1.2k tokens when it runs, and up to ~8.8k if it reads all its reference files. Until then it costs about 156 tokens; SKILL.md has 661 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~156
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from cbrock84/headcount at commit 98d1c17, republished under its MIT licence (© cbrock84). 661 words, ~1,242 tokens.

Download SKILL.mdSave it as .claude/skills/agent-hierarchy/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
agent-hierarchy
description
Designs orchestrator-and-subagent hierarchies for a repository — splitting agents by exclusive write surface, pairing every producer with an independent auditor, and enforcing the split with a script that runs in CI. Use this whenever the user wants to set up, expand, audit, or fix a multi-agent or subagent structure for a codebase; asks how to divide work between agents; wants agent charters, roles, or a surface map written; or is hitting agents that collide on the same files, review their own work, or drift from their remit. Also use when sizing a roster or deciding whether a new agent is justified.

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.
Show full SKILL.md (286 more words)Show less

Rules that carry a failure behind them

  • Producer and auditor are never the same agent. An agent that reviews its own output reliably approves it.
  • The orchestrator is not one of the two classes. It is the sole committer, and giving it a surface makes it a builder that can also merge.
  • One file owns each class of fact. Everything else derives from it, or the two copies diverge and nobody notices which is stale.
  • Never remove a shared-core export because it looks unused. You cannot see the consumers from inside the core. Deprecate, announce, then remove.

This repository's own log

docs/DECISION-LOG.md is the live instance of the decision log described in the playbook. When a decision is raised, assign it the next number immediately — before it is answered — and give it lettered options with an explicit recommendation. Never renumber, never reuse a number, and record resolutions in place rather than deleting them.

Never

  • Add an agent before the surface it will own exists. The map comes first, the agent second.
  • Let two agents hold a write claim on the same path. Overlap resolves itself as a race.
  • Hand-edit a generated artifact instead of the source it derives from.
  • Skip the guard because the change is small. Small changes are how surfaces drift.

References

  • references/playbook.md — the full 415-line playbook: surface splitting, the guard, the registry, the decision log, anti-patterns with their failure modes, sizing, multi-repo and shared-core layouts, the charter format, and a day-one checklist.
  • references/starter-rosters.md — concrete rosters for a mobile-app portfolio, a game portfolio, and a shared core, with producer/auditor pairings.
  • references/bootstrap-prompt.md — a fill-in-the-blanks prompt for standing this up in a fresh session against a target repo.
  • scripts/agent-guard.mjs — the executable guard. No dependencies, Node 18+.

© cbrock84, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references) in plugins/executive/skills/agent-hierarchy of cbrock84/headcount.

  • SKILL.md
  • references/bootstrap-prompt.md
  • references/playbook.md
  • references/starter-rosters.md
  • scripts/agent-guard.mjs

Open the folder on GitHubat commit 98d1c17

Compare with similar skills

Agent Hierarchy next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agent Hierarchy compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agent Hierarchy this skillcbrock84/headcount2k—~1.2kAutomated safety check: PassMIT
Paseo Advisor Second Opiniongetpaseo/paseo20k1 repos~756Automated safety check: PassCustom licence
O2 Review Loopopenobserve/openobserve22k—~3.7kAutomated safety check: PassAGPL-3.0
Harness Agent Team Designerrevfactory/harness9.1k—~4.5kAutomated safety check: PassApache-2.0
ClawTeam Multi-Agent Swarmwin4r/ClawTeam-OpenClaw1.5k1 repos~2.9kAutomated safety check: PassMIT
Sub-Agent Delegationcodewhale-hq/Codewhale41k—~790Automated safety check: PassMIT

Similar skills

  • Launches one separate agent through Paseo to give a second opinion on the current task, with a self-contained briefing and no permission to edit files.

    20k GitHub starsUsed in 1 repo~756 tokens
    Agent WorkflowsAuto-check passed
  • O2 Review Loop

    openobserve/openobserve

    Splits a change into planner, coder and independent reviewer roles: you confirm a spec, a subagent implements it, and a separate reviewer checks each round's local WIP commit.

    22k GitHub stars~3.7k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Harness Agent Team Designer

    revfactory/harness

    Designs a project-specific agent harness: defines specialist agents, writes the skills they follow, picks an execution mode and model for each, and keeps the setup maintained.

    9.1k GitHub stars~4.5k tokensUpdated 12 days ago
    Agent WorkflowsAuto-check passed
  • ClawTeam Multi-Agent Swarm

    win4r/ClawTeam-OpenClaw

    Launches a swarm of specialist Hermes agents in git-worktree-isolated tmux windows with a kanban board and file-based inboxes, using built-in templates like hedge-fund and code-review.

    1.5k GitHub starsUsed in 1 repo~2.9k tokens
    Agent WorkflowsAuto-check passed
  • Sub-Agent Delegation

    codewhale-hq/Codewhale

    Guides when and how to split multi-step coding, research or verification work into focused sub-agent runs while the parent keeps integration and final checks.

    41k GitHub stars~790 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Parallel Agents

    xenitV1/Antigravity-Workflows

    Native multi-agent orchestration using Claude Code's Agent Tool.

    130 GitHub starsUsed in 9 repos~1.3k tokens
    Agent WorkflowsAuto-check passed

More from cbrock84/headcount

All 178 skills in this repo
  • Access And Identity

    cbrock84/headcount

    Designs and audits who can reach what — authentication, authorization models, privileged access, service credentials, and joiner-mover-leaver process.

    2k GitHub stars~1.1k tokensUpdated 22 days ago
    Auto-check passed
  • Account Based Marketing

    cbrock84/headcount

    Concentrates marketing and sales effort on a named set of accounts rather than on volume — qualifying whether the model fits your economics at all, building the account list and the buying group…

    2k GitHub stars~1.2k tokensUpdated 22 days ago
    Auto-check passed
  • Activation

    cbrock84/headcount

    Gets new users from signup to first real value — signup flow, onboarding, time-to-value, and the early experience that determines whether someone becomes a user or a lapsed account.

    2k GitHub stars~865 tokensUpdated 22 days ago
    Auto-check passed
  • AI ML Governance

    cbrock84/headcount

    Governs models and AI systems in production — intended use, evaluation, monitoring, human oversight, documentation, and the decision to deploy or retire.

    2k GitHub stars~1k tokensUpdated 22 days ago
    Auto-check passed
  • AI Research Analyst

    cbrock84/headcount

    Produces executive-level research — market sizing, competitor mapping, trend analysis, and strategic intelligence — grounded in cited sources with the confidence in each claim made explicit.

    2k GitHub stars~916 tokensUpdated 22 days ago
    Auto-check passed
  • AI Search Optimization

    cbrock84/headcount

    Optimizes for AI assistants and AI-generated answers — being retrievable, being cited, and being represented accurately when a model answers on your behalf.

    2k GitHub stars~829 tokensUpdated 22 days ago
    Auto-check passed

Categories

Questions about Agent Hierarchy

What does Agent Hierarchy do?

Designs orchestrator-and-subagent hierarchies for a repository — splitting agents by exclusive write surface, pairing every producer with an independent auditor, and enforcing the split with a…. Agent Hierarchy is an agent skill from cbrock84/headcount. Designs orchestrator-and-subagent hierarchies for a repository — splitting agents by exclusive write surface, pairing every producer with an independent auditor, and enforcing the split with a script that runs in CI.

When should I use Agent Hierarchy?

Agent Hierarchy fits situations like: wants to set up; fix a multi-agent; subagent structure for a codebase; asks how to divide work between agents.

How do I install Agent Hierarchy in Claude Code?

Run `npx skills add cbrock84/headcount --skill agent-hierarchy -a claude-code`. Or copy the skill folder (plugins/executive/skills/agent-hierarchy in cbrock84/headcount) into .claude/skills/agent-hierarchy in your project. Claude Code loads it when a task matches its description.

How do I install Agent Hierarchy in Codex?

Run `npx skills add cbrock84/headcount --skill agent-hierarchy -a codex`. Or copy the skill folder (plugins/executive/skills/agent-hierarchy in cbrock84/headcount) into .agents/skills/agent-hierarchy in your project. Codex loads it when a task matches its description.

Can I use Agent Hierarchy in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cbrock84/headcount --skill agent-hierarchy -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-hierarchy, .gemini/skills/agent-hierarchy, .github/skills/agent-hierarchy and .opencode/skills/agent-hierarchy in your project.

What does Agent Hierarchy need to run?

Going by SKILL.md and its folder, Agent Hierarchy needs JavaScript for the scripts in its folder and the command-line tools its instructions call (git). Our summary lists: Node.js.

Does Agent Hierarchy access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Agent Hierarchy safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Agent Hierarchy use?

Agent Hierarchy is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agent Hierarchy use?

About 1.2k tokens (SKILL.md is roughly 5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.6k tokens, read only when the agent opens those files.

What are the alternatives to Agent Hierarchy?

Skills that share tags, products or a category with Agent Hierarchy: Paseo Advisor Second Opinion (getpaseo/paseo, 20k stars), O2 Review Loop (openobserve/openobserve, 22k stars), Harness Agent Team Designer (revfactory/harness, 9.1k stars) and ClawTeam Multi-Agent Swarm (win4r/ClawTeam-OpenClaw, 1.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agent Hierarchy?

cbrock84 (a GitHub user) maintains it in cbrock84/headcount, which has 2,022 GitHub stars. The repository holds 178 skills in this directory. The repository was last updated on September 17, 2026.

Source: cbrock84/headcount on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.