SpectreSkills
← All recipes

flow-builder

v1.0.0

Build a visual flow builder end to end — the validated node/edge graph, a catalog of step types, a React Flow canvas whose layout stays the author's, the config rail, honest previews, and versioned history with import/export. Combine when the brief is a drag-and-drop automation, journey, or workflow editor.

Flow Buildersflow-builderreact-flowautomationgraph
Try it — copy this prompt into Claude Code
Run `npx @spectre-apps/skills recipe flow-builder` to install the skills, then use them in order to build me a visual flow builder: a validated node/edge graph with a catalog of step types, a React Flow canvas where the plus on each outlet aims before it adds, a right rail with per-step config forms and a field picker, a step-removal dialog that offers consequences rather than verbs, an in-browser path preview beside a real test run, and version history with restore and JSON export.

One paste installs the skills and kicks off the whole build.

Install the whole recipe
npx @spectre-apps/skills recipe flow-builder

Installs all 7 skills into .claude/skills. Add --user to install globally.

Or add them individually
npx @spectre-apps/skills add flow-graph-model flow-node-catalog flow-builder-canvas flow-builder-inspector destructive-action-confirmations flow-simulation-and-testing flow-versioning-and-portability

7 skills, in order

  1. 01
    flow-graph-modelv1.0.0

    Model a visual automation flow as a validated node/edge graph — a discriminated union of node configs, outlet-labelled edges, single-path execution, and one canonical comparison shared by the save gate and the unsaved badge. Trigger when building or extending a flow/journey/workflow builder, or when adding to its graph schema.

  2. 02
    flow-node-catalogv1.0.0

    Declare every step type of a flow builder in one catalog the palette, the engine, the simulator and the field picker all read — outlets, default config, purity, and the assumption a preview makes. Trigger when adding a node/step/block type to a flow builder, or when deciding what outlets a step should have.

  3. 03
    flow-builder-canvasv1.0.0

    Build the canvas of a visual flow builder on React Flow — node cards with one handle per outlet, hover plus buttons that aim before they add, a placeholder that reserves the slot, and layout that stays the author's. Trigger when building or changing the canvas, node cards, connectors, or add/insert/remove interactions of a flow builder.

  4. 04
    flow-builder-inspectorv1.0.0

    Build the right rail of a flow builder — one slide-out that takes turns holding the step inspector, the step palette, flow details, the test harness and history — plus per-type config forms with a field picker and a JSON escape hatch. Trigger when building the panel, palette, or node config forms of a flow builder.

  5. 05

    Decide when a destructive action deserves a modal and how to word it — ask only when the answers genuinely differ, plan the outcome once and describe it with the same function that carries it out, and offer consequences instead of verbs. Trigger when adding a delete/remove/discard/overwrite confirmation, or when a dialog's copy has to state what will happen.

  6. 06
    flow-simulation-and-testingv1.0.0

    Give a flow builder a trustworthy preview — an in-browser simulator that shares the engine's own evaluators, labels every assumption it cannot compute, feeds the field pickers, and sits beside a real journaled test run. Trigger when adding path preview, a test panel, dry runs, or a `{{field}}` picker to a flow builder.

  7. 07

    Version a flow graph and move it between accounts — a revision per save with a deterministic structural diff, optimistic concurrency, restores that write forward, and an export that carries descriptors instead of credentials. Trigger when adding history, revisions, rollback, or import/export to a flow builder.

How it fits together

Flow builder

Everything needed to take a drag-and-drop automation editor from an empty route to something people can build a real journey in: the graph model, the step catalog, the canvas, the config rail, the confirmations, the preview, and history. Install the skills and let Claude work through them in order.

Order

  1. flow-graph-model{ nodes, edges } as a Zod discriminated union, outlet-labelled edges, single-path execution, configs that tolerate a half-built flow, and one canonical comparison shared by the save gate and the unsaved badge. Everything else is downstream of this.
  2. flow-node-catalog — one catalog the palette, the engine, the simulator and the field picker all read: outlets (static or derived), default config, purity, and the assumption a preview is allowed to make. Includes the eighteen step types of a journey engine and the checklist for adding one.
  3. flow-builder-canvas — React Flow: cards with one handle per outlet, the hover plus that aims before it adds, the Action/Condition pill, a placeholder that reserves the slot, edge repair after an outlet rename, and layout that only re-flows when asked.
  4. flow-builder-inspector — the single right rail that takes turns holding the step inspector, the palette, flow details, the test harness and history; per-type forms with a field picker and a JSON escape hatch; the header bar, its banners, and debounced drafts.
  5. destructive-action-confirmations — when a removal deserves a modal at all, and how to word it: plan the outcome once, describe it with the same function that carries it out, and offer consequences instead of verbs.
  6. flow-simulation-and-testing — an in-browser simulator that shares the engine's own evaluators, labels everything it cannot compute, feeds the {{field}} pickers and the canvas path preview, beside a real journaled test run.
  7. flow-versioning-and-portability — a revision per save, a structural diff that calls a drag a move, optimistic concurrency the person resolves, restores that write forward, and an export carrying descriptors rather than credentials.

Notes

The pieces interlock more tightly than most bundles. The catalog in step 2 is what step 3 reads for outlets and colours, what step 5's planner ranks branches by, and what step 6 reads its assumptions from. The graphsDiffer predicate from step 1 is the same function the server's write gate in step 7 uses — share it, or the "Unsaved" badge can never clear.

Two invariants are worth stating before any code: positions belong to the author (nothing re-flows a canvas unprompted), and a graph that cannot be parsed is a flow that silently stops running — which is why configs normalize legacy shapes on read, forever, instead of migrating.

Steps 1, 2, 6 and 7 are engine-agnostic — put them in a package both your API and your builder import, and the simulator's claim to route "exactly" becomes true by construction rather than by maintenance.

Prefer to drop the files in?

Copies every skill in this recipe as one block — each section is headed with the path it belongs at (.claude/skills/<slug>/SKILL.md), so you can paste them straight into your project and reference them in your prompt.