Skip to content
Skills Library
AI & agents · Automation

run-workflow

/run-workflow

Run a declarative workflow-file end to end: init a `/agentflow:pipe` from a JSON `WorkflowSpec`, then drive it to completion — auto-running every bash/json/deterministic stage and dispatching agents only where genuinely needed. Use `--dry-run` to preview the resolved plan without executing anything. The one-command way to execute a reusable, versioned workflow. USE when the user points at a workflow file ("run this workflow", "run workflows/audit/WORKFLOW.md", "run my pipeline") or wants to run a saved `WorkflowSpec`. Workflows are normally self-contained folders (`workflows/<name>/WORKFLOW.md

Repository
agentflow ↗
Licence
Apache-2.0
Last repository change
24.07.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 24.07.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Run a declarative workflow-file end to end: init a `/agentflow:pipe` from a JSON `WorkflowSpec`, then drive it to completion — auto-running every bash/json/deterministic stage and dispatching agents only where genuinely needed. Use `--dry-run` to preview the resolved plan without executing anything. The one-command way to execute a reusable, versioned workflow. USE when the user points at a workflow file ("run this workflow", "run workflows/audit/WORKFLOW.md", "run my pipeline") or wants to run a saved `WorkflowSpec`. Workflows are normally self-contained folders (`workflows/<name>/WORKFLOW.md

Triggers from the description

run this workflowrun workflows/audit/WORKFLOW.mdrun my pipeline

Arguments

/run-workflow <WORKFLOW.md | workflow.json> [--param name=value ...] [--run-id NAME] [--dry-run]
Original author description

Run a declarative workflow-file end to end: init a `/agentflow:pipe` from a JSON `WorkflowSpec`, then drive it to completion — auto-running every bash/json/deterministic stage and dispatching agents only where genuinely needed. Use `--dry-run` to preview the resolved plan without executing anything. The one-command way to execute a reusable, versioned workflow. USE when the user points at a workflow file ("run this workflow", "run workflows/audit/WORKFLOW.md", "run my pipeline") or wants to run a saved `WorkflowSpec`. Workflows are normally self-contained folders (`workflows/<name>/WORKFLOW.md

How it works

  1. 1. Init the pipe from the workflow
  2. 2a. --dry-run — preview only
  3. 2b. Drive to completion
  4. 3. Show progress every turn (so "where are we" is always clear)
Original SKILL.md headings · 84 lines, 583 words
SKILL.md preview
---
name: run-workflow
description: |
  Run a declarative workflow-file end to end: init a `/agentflow:pipe` from a JSON `WorkflowSpec`, then drive it to completion — auto-running every bash/json/deterministic stage and dispatching agents only where genuinely needed. Use `--dry-run` to preview the resolved plan without executing anything. The one-command way to execute a reusable, versioned workflow.

  USE when the user points at a workflow file ("run this workflow", "run workflows/audit/WORKFLOW.md", "run my pipeline") or wants to run a saved `WorkflowSpec`. Workflows are normally self-contained folders (`workflows/<name>/WORKFLOW.md` + sibling scripts), but a bare `.json` path also works.
allowed-tools: Bash, Read, Write, Agent
argument-hint: <WORKFLOW.md | workflow.json> [--param name=value ...] [--run-id NAME] [--dry-run]
---

# /agentflow:run-workflow — execute a workflow-file

> **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:board` then 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.

## 1. Init the pipe from the workflow

```bash
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`.

## 2a. `--dry-run` — preview only

```bash
node "${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.

## 2b. Drive to completion

```bash
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.

## 3. Show progress every turn (so "where are we" is always clear)

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:**

```bash
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.

Versions

RepositoryScoreLicence
This page · alesaiani/agentflow100Apache-2.0
adobe/skills100Apache-2.0
allenai/asta-plugins100Apache-2.0
norman-finance/norman-mcp-server100MIT
kd-labs-io/kd-code-extension100MIT
khpeet/newrelic-skills100Apache-2.0
Pathista/pathista-agent-plugin96MIT

Database snapshot: 13.11.2026 · package version 6d18ea76018a (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100create-workflow
    Author a reusable workflow-file by composing the Agent Flow primitives (enumerate, foreach, group, reduce, iterate) and bash/json stages into a declarative JSON `WorkflowSpec`, then validate it — ready to run with `/agentflow:run-workflow`. The builder counterpart to…
  • 100pipe
    Run an ordered pipeline of stages — each a bash command, a json write, or another primitive (/agentflow:enumerate, /agentflow:foreach, /agentflow:group, /agentflow:reduce, or a loop). The composer: it holds no map/fold/loop of its own; it sequences the primitives that do, with…
  • 90agent-workflow
    Create, update, run, resume, or continue agent workflows. Use when the user asks to create or fix workflow JSON, execute an existing workflow, run a workflow with a prompt, resume a workflow run, or continue the next node in a waiting multi-step workflow.
  • 100layer-workflows
    Use when running a saved Layer Blueprint workflow rather than a single generation: discovering what workflows a workspace has, reading a workflow's input schema, estimating and executing a run, polling its steps, or cancelling it. Also when a repeatable multi-step pipeline…
  • 90orchestration:executing-workflows
    Use when user provides workflow syntax with arrows (-> || ~>), says "run workflow", "execute workflow", "run this", mentions step1 -> step2 patterns. Executes orchestration workflows with real-time visualization, steering, and error recovery.
  • 100conductor
    Validate, run, and execute workflows; creating new workflows when explicitly asked. Use when orchestrating AI agents via YAML workflow files, executing an existing workflow, debugging execution, configuring routing between agents, setting up human-in-the-loop gates, or…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.