/agentflow:run-workflow <WORKFLOW.md | workflow.json> [--param name=value ...] [--run-id NAME] [--dry-run]from Agent Flow
Executes a workflow file (WORKFLOW.md or JSON) end-to-end by initializing an agentflow pipe and driving it to completion, auto-running bash/json stages and dispatching agents only where needed.
Ships in Agent Flow. 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.
None: SKILL.md is the whole skill.
Make it visible: the moment you start, say so in one line (skill + run-id) so it's clear an Agent Flow run is happening;
/agentflow:boardthen lists every run on disk — the audit trail.
A thin wrapper over /agentflow:pipe: it inits from a workflow-file and drives. The workflow-file is
typically workflows/<name>/WORKFLOW.md — a self-contained folder whose bash stages call sibling
scripts via {{workflow.dir}}, so it runs unchanged wherever the folder is. Pick a stable <run-id>
(default: derive from the workflow name) so re-runs resume.
Resolving a bare name. If the user names a workflow without a path (e.g. "run pr-review"), resolve it:
a workspace ./workflows/<name>/WORKFLOW.md wins; otherwise the shipped one at
${CLAUDE_PLUGIN_ROOT}/workflows/<name>/WORKFLOW.md. /agentflow:workflows lists both (local + shipped)
with origin, stage count, and params — use it to discover the name.
node "${CLAUDE_PLUGIN_ROOT}/dist/state/pipe.js" init <run-id> --workflow <workflow.md> \
[--param name=value ...] [--force]
init runs preflight validation on every primitive stage (catches bad flags before anything runs).
If the workflow declares params, pass each with --param name=value (a required param with no
value aborts init; declared defaults apply otherwise). Map the user's natural-language inputs to the
right params — e.g. "audit src for bugs" → --param target=src.
--dry-run — preview onlynode "${CLAUDE_PLUGIN_ROOT}/dist/state/pipe.js" plan <run-id>
Surface the resolved plan (stage order, commands, init_args, when guards) and stop — nothing
executes. Later stages' forward references remain as literal {{...}} until they resolve at run time.
node "${CLAUDE_PLUGIN_ROOT}/dist/state/pipe.js" drive <run-id>
Loop on the JSON result:
action: "needs_agent" → init the child, start-primitive-child, run the dispatch per the child's
SKILL.md (/agentflow:foreach, /agentflow:reduce, /agentflow:enumerate, or /agentflow:group --method llm-classify),
then call drive again.action: "needs_approval" → a human-approval gate. Stop and ask the user with AskUserQuestion
(use the returned prompt). If approved: node "${CLAUDE_PLUGIN_ROOT}/dist/state/pipe.js" approve <run-id>
then drive again. If rejected: … pipe.js fail <run-id> --error "rejected at <stage>".action: "done" → surface result_pointer.action: "failed" → surface the error.A long workflow runs across many resumes; the user must always be able to see the position at a glance. At the start of each turn (and on every resume), run and show the progress block:
node "${CLAUDE_PLUGIN_ROOT}/dist/state/pipe.js" progress <run-id>
It prints one compact view: overall N/total stages + %, the current phase and (for a foreach/group
stage) its item progress with a bar, the cumulative scale (agents · $ · resume k/max), and the
next stages. Echo it verbatim — don't paraphrase the numbers. Example mid-run:
my-run ▸ 20% (2/10 stages)
██░░░░░░░░ stage 3/10 · review (foreach) · in_progress
└─ this phase: 1180/2411 done · 12 running █████░░░░░
scale: 84 agents · ~$77.40 · resume 7/60
next: review → module-quality → build-group-input → …
This makes both the phase ("which of N stages") and the within-phase countdown ("X/Y items")
visible together — not just one or the other. progress --json is available for tooling.
The Stop hook resumes an in-flight run across turns automatically — lead each resumed turn with the progress block above.
On long, many-turn runs, surface the dashboard periodically (not only at the end):
node "${CLAUDE_PLUGIN_ROOT}/dist/inspect.js" board shows what's in flight + the cumulative + per-run cost
(active rows now show ~$N). Don't make the user discover a runaway cost only when it finishes.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub alesaiani/agentflow --plugin agentflow23 skills in this plugin
/auditDeep code-audit recipe: discover files in a target → review each (LLM, cached) → partition by
component → executive digest with hotspots and recurring patterns. A layer-3 recipe over /agentflow:pipe
(the 6-stage pipeline and caching are detailed in the body).
USE when the user asks to "review / audit / find bugs across" a folder, repo, or glob and wants a
persisted, structured report — and the target is large enough (≥ ~10 files) that per-file parallelism
plus a digest beats reading inline.
DON'T use for a few named files (read them inline), exploratory questions ("what does this do?"), or
generic per-item work that isn't a code review (→ /agentflow:foreach).
Not a `/`-menu command — it's the shipped `workflows/audit/` recipe: reach it by asking ("audit src
for bugs"), or run it directly with `/agentflow:run-workflow workflows/audit/WORKFLOW.md`.
/boardWorkspace dashboard: lists every active framework run across all primitives, highlights blockers (stuck items, exhausted auto-continue caps), shows cumulative cost, and suggests the next action. The natural command to run after re-opening Claude Code in a workspace with in-flight runs, or whenever the user wants a one-shot overview of "what's going on".
USE this skill when:
- the user has just (re)opened the workspace and wants to know what is in flight;
- the user says "what's going on", "show me everything", "any active runs", "where are we", "any pipelines running";
- the user wants a one-shot health check + suggested next action.
DON'T use this to inspect a specific run in depth (use `/agentflow:inspect show <id>` or `tree <id>`), or
to modify state (board is read-only). Explicit: `/agentflow:board` or `/agentflow:board --json`.