Source: raw/claude-cookbooks-main/claude_agent_sdk/chief_of_staff_agent/CLAUDE.md, raw/claude-cookbooks-main/claude_agent_sdk/chief_of_staff_agent/.claude/agents/financial-analyst.md, raw/claude-cookbooks-main/claude_agent_sdk/chief_of_staff_agent/.claude/agents/recruiter.md, raw/claude-cookbooks-main/claude_agent_sdk/chief_of_staff_agent/.claude/commands/{budget-impact,strategic-brief,talent-scan}.md, raw/claude-cookbooks-main/claude_agent_sdk/chief_of_staff_agent/.claude/output-styles/{executive,technical}.md, raw/claude-cookbooks-main/claude_agent_sdk/chief_of_staff_agent/flow_diagram.md
The claude_agent_sdk/chief_of_staff_agent/ directory of the Anthropic Cookbook ships a canonical multi-domain coordinator template — a chief-of-staff agent for a fictional Series-A SaaS startup (“TechStart Inc”), wired with two specialist subagents (financial-analyst, recruiter), three slash commands (/budget-impact, /strategic-brief, /talent-scan), and two output styles (executive, technical). The whole bundle uses standard Claude Agent SDK conventions — CLAUDE.md for company context, .claude/agents/ for domain experts, .claude/commands/ for delegation entry points, .claude/output-styles/ for audience-appropriate framing — making it a re-usable template for any cross-functional coordinator agent.
Key Takeaways
- Reference architecture for multi-domain coordinators: one orchestrator + N domain subagents + M slash-command entry points + K output styles. Cleanly maps to the Claude Agent SDK file conventions.
- Coordinator never does primary domain work — it delegates to financial-analyst or recruiter via the Task tool and synthesizes their outputs. Mirrors the lead-agent pattern from the research-agent cookbook.
CLAUDE.mdis the persistent business state: company stage, financial snapshot (burn 2.4M), team structure, comp benchmarks, board, competitive landscape, current priorities, recent and upcoming decisions, risk factors. Both subagents read this for grounding.- Subagents declare scoped tools in their YAML frontmatter — financial-analyst gets
Read, Bash, WebSearch; recruiter getsRead, WebSearch, Bash. This is the Agent SDK’s per-subagent tool-restriction primitive. - Domain subagents wrap Python scripts rather than reinventing math in prose. Financial-analyst calls
scripts/hiring_impact.py <num_engineers> [salary],financial_forecast.py,decision_matrix.py. Recruiter callsscripts/talent_scorer.py. Tool-use plus calculation-script-as-source-of-truth. - Slash commands compose subagents, not directly answer.
/budget-impactdelegates to financial-analyst alone;/talent-scandelegates to recruiter alone;/strategic-briefcoordinates BOTH subagents into a board-shaped output. Single source-of-truth for “how do we do an X analysis.” $ARGUMENTSis the slash-command parameterization mechanism —/budget-impact hiring 5 engineersflows into the command prompt as$ARGUMENTS, which then becomes the subagent’s task description.- Output styles separate format from logic.
executive.mddefines a 30-second-readable template (RECOMMENDATION → KEY METRICS → RATIONALE → NEXT STEPS → RISKS).technical.mddefines a data-rich template (Methodology → Detailed Findings → Scenario Analysis table → Technical Recommendations → Appendix). Same underlying analysis, two audiences. - Subagent system prompts encode domain decision frameworks — financial-analyst always considers (1) runway impact (must maintain >12 months), (2) burn multiple, (3) ROI and payback, (4) risk and mitigation, (5) sensitivity scenarios. Recruiter has a parallel 3-axis evaluation rubric (technical skill, startup fit, team dynamics).
- Post-write hook is part of the flow (per
flow_diagram.md) — after the chief writes a report to disk, a hook logs to an audit trail before the executive summary returns to the user. Demonstrates the SDK’s hook primitive in a coordinator context. - The whole bundle is template-shaped: swap “TechStart Inc” + financial-analyst + recruiter for any 2-domain coordination problem (e.g., a marketing agency chief of staff with
seo-analyst+content-strategist) and the file structure carries over unchanged.
Details
CLAUDE.md — Business State as Coordinator Memory
The top-level CLAUDE.md is a structured snapshot of the fictional TechStart Inc: Series A closed Jan 2024 (500K/mo burn, 20-month runway, 15K, LTV 8M?), and risk factors (70% AWS dependency, key-engineer retention, Big Tech competition).
The coordinator reads this on every invocation. Both subagents inherit the context. This is the cookbook demonstrating the Claude Agent SDK pattern where CLAUDE.md is the durable business memory — analogous to how a real chief of staff doesn’t re-learn the company’s burn rate at the start of every meeting.
The file also lists the available scripts inline so the coordinator knows what computation is delegable to Bash (e.g., python scripts/simple_calculation.py <total_runway> <monthly_burn> returns JSON with runway_months and quarterly_burn).
.claude/agents/financial-analyst.md — Domain Expert as Subagent
YAML frontmatter declares the agent name, a use-proactively description, and the scoped tool list (Read, Bash, WebSearch). The body system prompt establishes:
- Role framing: senior financial analyst for TechStart, expert in financial modeling, burn-rate optimization, unit economics, strategic financial planning.
- Three responsibility blocks: Financial Analysis (burn / runway / unit economics / ROI), Budget Management (departmental tracking, cost optimization, hiring impact on burn), Strategic Planning (growth scenarios, acquisitions, fundraising timing).
- Tool-knowledge encoded in the prompt — the analyst is told to ALWAYS call
python scripts/hiring_impact.py <num_engineers> [salary]when asked about hiring engineers, with worked invocation examples. The script returns burn-rate increase, runway, velocity impact, recommendation. - 5-point decision framework: runway impact (must stay >12 months), burn multiple and growth efficiency, ROI/payback, risks, alternative scenarios.
- Output guidelines: lead with critical insight, specific numbers + timeframes, confidence levels, key assumptions, recommended action, risks.
- Two worked example outputs — a hiring decision (“Adding 3 senior engineers at 50K, reducing runway from 20 to 18 months”) and an acquisition analysis (“Acquiring SmartDev for $8M would consume 80% of cash reserves, reducing runway to 4 months”).
The closing rule: “Always ground recommendations in data and provide multiple scenarios when uncertainty is high.”
.claude/agents/recruiter.md — Parallel Domain Expert
Identical structural shape to financial-analyst — YAML frontmatter, scoped tools (Read, WebSearch, Bash), four responsibility blocks (Talent Pipeline, Hiring Strategy, Candidate Evaluation, Market Intelligence), wrapped scripts (scripts/talent_scorer.py), 3-axis evaluation criteria (Technical Skills via GitHub, Startup Fit, Team Dynamics), two output templates (individual candidates vs hiring strategy), and standard interview-pipeline metadata (5-stage process, 30-day time-to-hire target, >80% offer acceptance, >95% 90-day retention).
The parallelism is itself a design takeaway: when building a multi-domain coordinator template, give every subagent the same prompt shape — role framing, responsibility blocks, wrapped scripts, decision framework, output template, worked examples. Cuts cognitive load when adding a third or fourth subagent later.
.claude/commands/ — Delegation Entry Points
Three slash-command files demonstrate three shapes of delegation:
budget-impact.md — single-subagent delegation. Body: “Use the financial-analyst subagent to analyze the budget impact of: $ARGUMENTS.” Then a 6-point output spec (total cost, monthly burn impact, runway change, ROI, alternatives, risk factors) and a final recommendation.
talent-scan.md — single-subagent delegation, same shape, recruiter-flavored. Body: “Use the recruiter subagent to perform a talent market scan for: $ARGUMENTS.” 6-point output spec (availability, salary, skills, time-to-hire, sourcing channels, candidate profiles).
strategic-brief.md — multi-subagent coordination. Body: “Coordinate with both the financial-analyst and recruiter subagents to provide…” then a board-meeting-shaped output template: Executive Summary → Financial Analysis (via financial-analyst) → Talent Perspective (via recruiter) → Strategic Recommendation → Alternative Options. The same $ARGUMENTS parameterization.
The pattern: slash commands are the user-facing surface, the orchestrator decides which subagent(s) to invoke, and the prompts make the coordination explicit so the chief-of-staff doesn’t improvise routing.
.claude/output-styles/ — Audience-Appropriate Framing
Two output styles, each invokable as a non-default response shape:
executive.md — “Concise, KPI-focused communication for C-suite executives.” Five principles: lead with the decision, bullets max 3-5 per section, numbers over narrative, action-oriented, visual hierarchy with bold key numbers/dates. Template: **RECOMMENDATION:** [one sentence] / **KEY METRICS:** [3 bolded metrics] / **RATIONALE:** [2-3 sentences] / **NEXT STEPS:** [3 actions] / **RISKS:** [one line each]. Worked example for a 3-senior-engineer hire.
technical.md — “Detailed, data-rich analysis for technical teams and analysts.” Five principles: data-first, methodology transparency, multiple scenarios, technical depth, structured sections. Template: Analysis Overview → Methodology (data sources, assumptions, calculation methods, confidence intervals) → Detailed Findings (Finding 1, Finding 2, …) → Scenario Analysis (table with Base / Optimistic / Pessimistic rows and probabilities) → Technical Recommendations (Primary / Alternative / Monitoring) → Appendix (formulas, raw data, charts). Worked example uses 6 months historical burn rate, 120 comparable salary datapoints, linear regression with seasonal adjustment, 85% confidence ±10%.
The discipline: same underlying analysis, but the output style is parameterized by audience. Building both lets the same coordinator surface to a board meeting and to the engineering analytics team without re-prompting.
flow_diagram.md — Architecture and Communication Flow
Two Mermaid diagrams formalize the topology.
The architecture graph: User → Chief of Staff Agent → {Memory (CLAUDE.md), financial_data/, Tools, Commands, Output Styles, Hooks}. The Tools edge specifically lists the Task Tool, which fans out to the Financial Analyst and Recruiter, each of which calls Python Scripts.
The sequence diagram traces a /budget-impact hiring 5 engineers invocation: User → Chief expands the slash command → Chief uses Task tool to delegate to financial-analyst → financial-analyst executes hiring_impact.py via Bash → script returns results → analyst generates report → Task returns subagent results to Chief → Chief writes report to disk → post-write hook fires and logs to audit trail → Chief returns executive summary to user.
The hook step is the load-bearing design choice that makes this a production-shaped pattern, not a chat-bot demo. Every report becomes an auditable artifact.
Why This Template Generalizes
The bundle is intentionally generic where it matters and specific where it has to be:
- Generic: the file structure (
CLAUDE.md+.claude/agents/+.claude/commands/+.claude/output-styles/), the subagent prompt shape (role / responsibilities / scripts / decision framework / output template / examples), the slash-command shape ($ARGUMENTS+ output spec), the output-style shape (principles + template + example), and the hook pattern. - Specific: TechStart Inc’s actual financials, the two specific domains (finance + recruiting), the three specific commands, the two specific audiences. These are sample content, not architectural commitments.
To re-use the template for a different coordinator (say, a marketing chief of staff with seo-analyst + content-strategist), the diff is largely content: swap the CLAUDE.md business state, write two new subagent files in the same shape, write three new slash commands, write two output styles (e.g., client-facing.md + internal-ops.md). The orchestration, tool-restriction, audit-hook, and parallel-subagent dispatch patterns transfer.
This is the cookbook’s structural answer to “how do I build a Claude Agent SDK coordinator that won’t degenerate into a single-prompt megaagent.” The file conventions enforce separation of concerns; the slash commands enforce single-source-of-truth for analysis routines; the output styles enforce audience separation; the hooks enforce auditability.
Try It
- Clone the bundle as a starting template for any 2-3 domain coordinator agent: copy
chief_of_staff_agent/to your project, editCLAUDE.mdto your business state, rename and rewrite the two.claude/agents/*.mdfiles for your domains, rewrite the slash commands to match your routine analyses. - Use the subagent prompt shape as a checklist when adding a new domain expert: role framing, 3-4 responsibility blocks, wrapped scripts with invocation examples, decision framework, output template, two worked examples. Skipping any one of these is the most common reason a domain subagent drifts.
- Adopt the
$ARGUMENTSslash-command pattern for any analysis routine you find yourself repeating. The win is single-source-of-truth: changing the analysis shape in one slash command file propagates to every future invocation, vs scattering it across prompts. - Wire two output styles per coordinator — one terse/executive, one data-rich/technical. Same analysis, two audiences. The cost is small (two files) and the audience-fit improvement is large.
- Add the post-write audit hook before claiming the agent is production-ready. Every report-producing coordinator should leave a durable trail.