/workflow-orchestration-plugin:workflow-scale-budgetfrom workflow-orchestration-plugin
Estimates agent count and token cost for Workflow scripts before running, or tallies actual usage after a run. Helps avoid surprise bills from excessive fan-out.
Ships in workflow-orchestration-plugin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
| Use this skill when... | Use something else when... |
|---|---|
Writing or proposing a Workflow script, or estimating its cost | Writing the script's API calls — load the built-in workflow-authoring skill |
The hooks-plugin/hooks/workflow-scale-guard.sh hook asked before a run | Recovering a run already killed mid-flight — use workflow-orchestration-plugin:workflow-interrupted-run-recovery |
| Choosing between per-item and grouped fan-out | Ordering dependent waves — use workflow-orchestration-plugin:workflow-wave-dispatch |
| A Workflow run has finished and you want its realised agent count or tokens | The tally WARNs agents_without_result (the run ended, whether killed, failed or completed, with agents unfinished) — use workflow-orchestration-plugin:workflow-interrupted-run-recovery |
The hook enforces the bound (PreToolUse on Workflow, ask when the estimated
agent count exceeds CLAUDE_HOOKS_WORKFLOW_MAX_AGENTS, default 10). The two
shipped mechanisms do not cover this: workflowSizeGuideline is advisory
system-prompt text that ends "not a hard limit", and skipWorkflowUsageWarning
is a one-time acceptance — once set, auto mode never prompts before a
workflow again, at any scale.
pipeline(units, edit, review, repair, re-review) is 4x an unknown N; that
shape across five runs produced 496 subagents against a guideline of 10, and
$528 in an afternoon.resumeFromRunId looks for the journal under the
new session directory and reports nothing to resume (observed 2026-09-16 on
two runs whose journals sat intact under the old id). Have agents write
output to disk as they go, keep each phase independently runnable, and record
what completed so a replacement run can skip it. The 66 edits that survived
that limit did so because they were already on disk..slice(0, N) — the guard reads an
explicit cap as the bound).CLAUDE_HOOKS_WORKFLOW_MAX_AGENTS to clear your own prompt.gh run list, gh run view --log
and gh api returned HTTP 403, while gh pr and gh issue (GraphQL, a
separate budget) kept working. The orchestrator could not read CI logs, or
merge through a hook that does a REST lookup. One line in the next
run's agent briefs, "use git for anything git can answer, read each issue
once, do not poll gh", kept a 19-agent run under the limit. Check the
remaining budget with gh api rate_limit --jq .resources.core.bash "${CLAUDE_SKILL_DIR}/scripts/workflow-run-tally.sh" <run-id>
tallies its realised agents and tokens from the transcripts. A session id tallies
every run in that session, then prints one WORKFLOW SESSION TALLY block with the
agents and tokens summed across the runs and the worst run status. A WARN with
agents_without_result means the run ended with agents unfinished: see
workflow-orchestration-plugin:workflow-interrupted-run-recovery. Summing the raw
usage lines overstates cache tokens, because one API message is written as several
lines, so the script keeps only the last line per message id.| Context | Command |
|---|---|
| Tally one finished run | bash "${CLAUDE_SKILL_DIR}/scripts/workflow-run-tally.sh" <wf_run_id> |
| Tally every run in a session | bash "${CLAUDE_SKILL_DIR}/scripts/workflow-run-tally.sh" <session_id> |
| Remaining shared GitHub REST budget | gh api rate_limit --jq .resources.core |
Transcripts outside ~/.claude/projects | bash "${CLAUDE_SKILL_DIR}/scripts/workflow-run-tally.sh" <id> --projects-dir <dir> |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
8 skills in this plugin
/workflow-bake-offWorkflow template for a bake-off — 2–5 independent attempts, lens judges, a winner computed by Borda or a metric rule, then refine. Use when comparing competing designs or running A/B arms./workflow-checkpoint-refactorMulti-phase refactoring with checkpoint files that survive context limits. Use when refactoring spans 10+ files, needs phased rollout, or risks running out of context mid-session./workflow-implement-verifyWorkflow templates that implement 2–5 units in worktrees with a fresh verifier and one repair round, or close findings on existing branches. Use when fanning out implementers or repairs./workflow-interrupted-run-recoveryRecover a Workflow run killed mid-flight: salvage killed agents' worktrees, resume without duplicating PRs already opened. Use when a run reports agents_error after a session limit, kill, or crash./workflow-preflightPre-work validation before implementation. Use when starting an issue or fix, or before fanning out agents, to check remote state, existing PRs, branch conflicts, gh auth, and merge gates./workflow-verify-before-filingVerify accumulated bug claims at upstream HEAD and dedup against trackers before filing issues. Use when filing upstream reports from backlogs, audit docs, or git-history findings.npx claudepluginhub laurigates/claude-plugins --plugin workflow-orchestration-pluginOther plugins' skills for the same job