# Flow

> End-to-end pipeline orchestration. Chain multiple skill workflows (dev explore, spec new, spec go, dev explore review) into a named flow that runs sequentially. Triggers on: 'flow new', 'flow go', 'flow get', 'flow update', 'create a flow', 'run flow', 'inspect a flow', 'edit a flow'.

- Skill: `cloudvoyant/flow` (Agent Skill, multi-file: 15 files)
- Install (CLI): `npx skillmds@latest add cloudvoyant/flow`
- Raw SKILL.md: https://api.skillmd.com/api/skills/cloudvoyant/flow/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- License: MIT
- Author: cloudvoyant (https://skillmd.com/u/cloudvoyant)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/cloudvoyant/flow

---


You are the `flow` dispatcher. Parse the user's command and route to the correct workflow file.

**Markdown output: soft-wrap prose, never hard-wrap** — when a flow workflow writes a `.md` artifact (flow.md, step files, progress/context/run state, or any generated document), write each paragraph as one continuous line; do not insert manual newlines to wrap prose at a fixed column width. Newlines still separate paragraphs, list items, headings, and code fences. (If a markdown formatter is available, `prettier --prose-wrap never` enforces this deterministically.)

## Dependency Check

Before dispatching, verify each skill listed in `requires:` is available in your context.

For each required skill, check whether you can invoke `/{name}` (i.e. its instructions are loaded in your context). If a required skill is missing, stop and report:

```
Required skill not installed: {name}
Install: npx skills add codevoyant/codevoyant
```

Note: the `skill` dependency is only needed for `flow save`. If the verb is not `save`, you may proceed without it.

## Dispatch logic

The raw invocation args (filled by Claude Code / OpenCode slash commands): `$ARGUMENTS`. If this line is not filled in, read the verb and remaining args from the user's current message.

```
VERB = first non-flag argument (default: "help")

Aliases:
  "run"   → go
  "exec"  → go
  "start" → go
  "ls"        → list
  "show"      → status
  "review"    → status
  "print"     → get
  "export"    → save
  "publish"   → save
  "edit"      → update
  "fix"       → doctor
  "diagnose"  → doctor
  "check"     → doctor

Dispatch to: references/workflows/{VERB}.md
```

The `--global` / `-g` flag (store or read a flow under `~/.codevoyant/flows` instead of the local `.codevoyant/flows`) is **not** a verb — pass it through unchanged; each workflow parses it via `references/flow-dir.md`.

Any flag other than the flow-control flags (`--global`/`-g`, and `--set` for `go`) is **not** dropped: `references/flow-dir.md` collects it into `PASSTHROUGH_FLAGS`, and the `new`/`go` workflows forward it to the step commands. This is how `--branch feature/x` reaches the skills a flow runs (e.g. so `spec new` works on a separate branch).

The `--fix` flag (used by `doctor` to apply repairs instead of only diagnosing) is likewise **not** a verb — pass it through unchanged to the workflow.

## Workflow index

| Verb | File | Purpose |
| --- | --- | --- |
| new | `references/workflows/new.md` | Define a new flow (create flow.md + step files) |
| go | `references/workflows/go.md` | Execute pending steps sequentially as blocking subagents |
| list | `references/workflows/list.md` | List all flows (local and global) |
| status | `references/workflows/status.md` | Print flow checklist state (from the local run instance if present) |
| get | `references/workflows/get.md` | Print an existing flow's definition (flow.md + step files) |
| doctor | `references/workflows/doctor.md` | Diagnose (and with `--fix` repair) broken flows across both scopes |
| save | `references/workflows/save.md` | Turn a flow into a reusable composite skill via /skill new |
| update | `references/workflows/update.md` | Edit an existing flow definition (annotations or chat; keeps flow.md ↔ step files consistent) |
| help | `references/workflows/help.md` | Usage reference |

## Instructions

1. Extract VERB from the user's message (first non-flag positional argument after "flow").
2. Apply aliases (run/exec/start → go; ls → list; show/review → status; print → get; export/publish → save; edit → update; fix/diagnose/check → doctor).
3. If VERB is empty or unrecognized, default to `help`.
4. Read and execute the corresponding workflow file from `references/workflows/{VERB}.md`.
5. Pass all remaining arguments (including any `--global`/`-g` flag and any other unrecognized flags such as `--branch`) to the workflow unchanged, **as a preserved argv array** — each original argument stays one element, so multi-word step strings (`/spec new {{objective}}`) and quoted flag values (`feature="add OAuth"`) survive intact. The workflow iterates this argv (`"$@"`) to parse flow-control flags and bucket the rest into `PASSTHROUGH_FLAGS` via `references/flow-dir.md`; it must never flatten the args into a single string and re-split them.

