with one click
budget-gatekeeper
Token and cost tracking with model tier enforcement
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Token and cost tracking with model tier enforcement
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Demo pipeline state machine — 7-phase autonomous sequence with delegation context templates, phase transition logic, BLOCKED recovery strategies, and demo-state.json schema. Used exclusively by demo-conductor.
Cinematic narration style guide for demo-conductor — ANSI-coloured banner formats, live pipeline scoreboard, audience-facing language, phase summaries, and error narration patterns. Keeps the demo presentation-quality throughout.
Standardized completion and escalation protocol for subagent responses. Ensures the conductor can machine-parse every subagent return. Use when reporting completion status back to the orchestrator.
Cross-session learnings lifecycle — schema, storage, retrieval, and pruning of lessons learned during orchestrator sessions. Use when managing learnings via the /learn command.
Agent Teams assembly and task injection — selects appropriate team, validates prerequisites, estimates cost, injects tasks into the shared task list, and manages team lifecycle.
Complexity-based task routing with model tier selection
| name | budget-gatekeeper |
| description | Token and cost tracking with model tier enforcement |
| argument-hint | <session-context> |
| user-invocable | false |
Track usage by tier to monitor cost distribution:
| Tier | Model | Relative Cost | Target Budget Share |
|---|---|---|---|
| heavy | Opus 4.6 | 1.0x (baseline) | ≤ 25% of session tokens |
| default | Sonnet 4.6 | ~0.2x | 60-70% of session tokens |
| fast | Haiku 4.5 | ~0.04x | 5-15% of session tokens |
Subagent delegations are automatically logged to artifacts/sessions/delegation-log.jsonl by the SubagentStart and SubagentStop hooks. At each delegation, record:
| Metric | Warning | Hard Limit |
|---|---|---|
| Total delegations | 8 | 15 |
| Heavy-tier delegations | 4 | 8 |
| Estimated session cost | $2.00 | $5.00 |
| Single agent turns | 30 | 60 |
When ORCH_TEAMS_ENABLED=true, additional limits apply:
| Metric | Warning | Hard Limit |
|---|---|---|
| Active teams per session | — | 1 (CC runtime enforces) |
| Tasks per team | 10 | ORCH_TEAM_MAX_TASKS (default 20) |
| Estimated team session cost | $10.00 | User-confirmed before assembly |
| Teammates per team | — | ORCH_TEAM_SIZE_MAX (default 3) |
Team sessions cost approximately 7x a single session. The team-routing skill presents a cost estimate and requires explicit user confirmation (y) before assembling any team. Log team task completions from delegation-log.jsonl (event: teammate_task_complete) to track team budget consumption.
When a soft limit is hit:
When a hard limit is hit:
default instead of heavy when a task doesn't require deep judgment/compact at milestones to reduce token waste/clear between unrelated tasks--- Budget Report ---
Delegations: 5 / 15
Heavy-tier: 2 / 8 (reviewer, security-reviewer)
Default-tier: 3 (implementer, researcher, doc-updater)
Fast-tier: 0
Estimated cost: ~$1.20
Recommendation: On track — no action needed