Claude Code skill · v1.0 · MIT

ADVISOR
HIERARCHY

A 3-tier agent skill for Claude Code. Opus advises on demand. Sonnet and Haiku execute. You orchestrate — without touching a single line of code.

Scroll to explore
Architecture
delegate delegate consult consult report report plan plan SESSION MASTER decompose · classify · synthesize YOUR SESSION MODEL HAIKU EXECUTOR mechanical tasks · 1-2 files claude-haiku-4-5 SONNET EXECUTOR complex tasks · multi-file claude-sonnet-4.6 OPUS ADVISOR advise only · no tools · ≤3× per task TIER 1 TIER 2 TIER 3
1
Tier 1

Master

Your session

The current Claude Code session. Decomposes the task, classifies subtasks, spawns executors, handles results, and synthesises a final report.

  • Never executes code itself
  • Classifies: Haiku vs Sonnet
  • Parallel dispatch for independent tasks
  • Escalates to you if executor is BLOCKED twice
2
Tier 2

Executor

Haiku · Sonnet

Runs the actual work — writing code, running tests, iterating. Spawns Opus when it hits a genuine strategic decision.

  • Haiku for mechanical 1-2 file tasks
  • Sonnet for multi-file/judgment tasks
  • Consults Opus at most 3× per task
  • Reports: DONE / BLOCKED / NEEDS_CONTEXT
3
Tier 3

Advisor

Opus

Consulted on demand. Returns a numbered plan in under 150 words. Calls no tools, produces no user-facing output — advice only.

  • No tool calls, ever
  • Numbered steps only, ≤150 words
  • Issues STOP: signal if task is broken
  • Billed at Opus rates for those tokens only
Why it works — Anthropic Advisor Tool benchmarks
+2.7pp
SWE-bench Multilingual
Sonnet + Opus advisor vs Sonnet alone
-12%
Cost per agentic task
Sonnet + Opus advisor vs Sonnet alone
BrowseComp score
Haiku + Opus advisor (41.2% vs 19.7%)
-85%
Cost vs Sonnet alone
Haiku + Opus advisor on BrowseComp
Benchmark · Breakout

We built the same Breakout game twice — once directly, once via /ah — from an identical spec, same model family. The forced decomposition into sequential Sonnet passes changed not just the score, but the architecture: cleaner state factories, proper event handling, velocity normalization on every brick hit.

Approach A · Direct
19/21
Total score
  • Visual quality 4/5
  • Code quality 4/5
  • Feature completeness 11/11
▶ Play game
Approach B · /ah
20/21
Total score
  • Visual quality 4/5
  • Code quality 5/5
  • Feature completeness 11/11
▶ Play game
Winner
Verdict

Use /ah when code architecture matters. The hierarchy forced a clean separation: game mechanics first, visual polish second. That separation produced better codecreateState() factory, proper mouse scaling, e.code keyboard input, velocity normalization every brick hit. Skip it for throwaway scripts where structure is irrelevant.

Honest cost: ~59,460 tokens · two agent round-trips · zero Opus advisor calls (tasks were well-specified). /ah wins on code architecture; direct wins on simplicity.
Benchmark · Battleship

The same Battleship game built twice — once directly, once via /ah — from an identical spec. The hierarchy's forced decomposition improved both dimensions: code quality through a dedicated architecture pass, visual quality through a dedicated UX pass. Neither improvement happened in the single-pass direct build.

Approach A · Direct
20/22
Total score
  • Visual quality 4/5
  • Code quality 4/5
  • Feature completeness 12/12
▶ Play game
Approach B · /ah
22/22
Total score
  • Visual quality 5/5
  • Code quality 5/5
  • Feature completeness 12/12
▶ Play game
Winner
Verdict

The hierarchy improved both code and visuals simultaneously — the direct build got neither right on first pass. The architecture pass (Task 1) produced factory state, available-cells AI, and event delegation immediately. The visual pass (Task 2) added Orbitron typography, per-type ship colors, and an animated phase-aware HUD with per-ship indicators. The direct build skipped both specialisations. /ah did them both.

Hierarchy efficiency: 2 subtasks · 0 advisor calls · ~67,311 tokens (~28,103 for direct — 2.4× more expensive). Both subtasks ran CAPABLE tier (sonnet) to completion; no escalation to advisor was needed. The overhead buys 2 pp on visual quality and 1 pp on code quality over a 22-point scale.
Benchmark · Space Invaders

The same Space Invaders game built twice — once directly, once via /ah — from an identical spec. The full feature set: player movement and fire, animated alien grid, UFO bonus target, shields, level progression, hi-score persistence, scrolling star field, and Web Audio sound effects. The hierarchy produced a cleaner engine architecture and richer visuals; the direct build matched all features but with less polish on both dimensions.

Approach A · Direct
20/22
Total score
  • Visual quality 4/5
  • Code quality 4/5
  • Feature completeness 12/12
▶ Play game
Approach B · /ah
22/22
Total score
  • Visual quality 5/5
  • Code quality 5/5
  • Feature completeness 12/12
▶ Play game
Winner
Verdict

The hierarchy delivered cleaner audio architecture and higher visual polish — the direct build matched all features but not the finish. The /ah engine pass produced a proper dt-based UFO tick, a decoupled render pipeline, and a modular state factory. The /ah audio pass produced cancellable level-clear fanfares and a smooth UFO oscillator stop with gain ramp-down. The direct build had the same features but skipped both refinements. /ah did both.

Hierarchy efficiency: 2 subtasks · 1 advisor call · ~71,400 tokens (~31,200 for direct — 2.3× more expensive). CAPABLE tier (sonnet) for both engine and audio passes. The overhead buys 1 pp on visual quality and 1 pp on code quality over a 22-point scale.
Install
1
Clone the repo
$ git clone https://github.com/cocodedk/advisor-hierarchy.git ~/projects/advisor-hierarchy
2
Run the install script
$ cd ~/projects/advisor-hierarchy && bash install.sh
3
Use it in Claude Code
/ah "refactor the auth module to use JWT"
One command. Three tiers. Maximum intelligence.
/ah "your task here"