Skip to content
Back to skills

Flowstage

ASecurity

Prototype · Canvas · Flow workspace on localhost for any app or idea that renders in a browser (HTML, React, Vue, Svelte, Next, Expo web, Flutter web, Compose wasm). Clickable device frames, a canvas of every screen, playable flows where a finger drives the real app, live tweaks, comments, sharing and multiplayer. Use when asked to prototype, mock up, storyboard, demo or "show the flow" of an app without Figma, or when the user says "flowstage".

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 4, 2026
developmentgoswiftshellbashreactvuenodeawsgitbackend

Works with

  • claude code
  • cli

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 5 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add AlejandroCaimares/flowstage --skill flowstage --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Flowstage?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Flowstage
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alejandrocaimares-flowstage/badge)](https://www.skillsdirectory.com/skills/alejandrocaimares-flowstage)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: flowstage
description: Prototype · Canvas · Flow workspace on localhost for any app or idea that renders in a browser (HTML, React, Vue, Svelte, Next, Expo web, Flutter web, Compose wasm). Clickable device frames, a canvas of every screen, playable flows where a finger drives the real app, live tweaks, comments, sharing and multiplayer. Use when asked to prototype, mock up, storyboard, demo or "show the flow" of an app without Figma, or when the user says "flowstage".
license: MIT
compatibility: Node.js 22+; Google Chrome for screenshots. Any agent that can run shell commands.
---

# Flowstage

Flowstage is a zero-dependency CLI (Node ≥ 22).

## 0. Find the CLI (once per session)

Take the first that works, and write that command wherever this file says `flowstage` (shell variables don't last between commands in most agents):

1. `flowstage --version` → `flowstage` (Claude Code plugin, `npm i -g flowstage`, or `npm link`).
2. `cd -P "<skill folder>/../.." && pwd` prints a folder with `bin/flowstage.mjs` in it (this skill lives in a Flowstage checkout, often through a link) → `node <that folder>/bin/flowstage.mjs`. The skill folder is the one holding this SKILL.md; in Claude Code it is `${CLAUDE_SKILL_DIR}`.
3. `npx -y flowstage@latest --version` → `npx -y flowstage@latest` (downloads it once).

If none works, tell the user to install it: `npm i -g flowstage`.
`flowstage where` prints Flowstage's own folder, `<root>` below. `references/` is next to this file.

## What it does

Flowstage hosts the user's app in device frames and drives it.
The agent's job is to **build the app** (in the chosen stack) and **fill in `flowstage.json`**: the screens, canvas, flows and tweaks.
The host UI is never edited per project.

- CLI: `flowstage --help` lists every command.
- Manifest reference, the source of truth for every field: `<root>/docs/manifest.md`. Read it before writing a manifest.
- Give every project a `logo`: draw a small square SVG for the product (a simple mark, 40×40 viewBox, one or two colors), save it next to `flowstage.json` as `logo.svg` and set `"logo": "logo.svg"`. Ask the user first if they already have a brand mark, and use theirs.
- Worked example to copy patterns from: `<root>/examples/barista/` (phone + laptop + iPad, seeded URLs, commands, multi-device flow)
- Stack recipes: `references/stacks.md`. Writing good screens, flows and tweaks: `references/authoring.md`.

## 1. Fill in the brief (the "props")

Settle these before building. Take them from the request, the repo, and memory; ask only for what changes the build, and use the defaults otherwise.

| prop | default |
|---|---|
| **Product + goal**: what the prototype has to prove | from the request |
| **Stack** | the repo's stack if there is one; otherwise `html` (no build, fastest). `react` when they want components. KMP or Flutter only when asked or when the repo is that. |
| **Where it lives** | a new folder `~/Projects/<name>-flowstage`, or `flowstage/` inside an existing repo |
| **Surfaces / devices** | phone app → `iphone-16` (or `iphone-16-pro`, `pixel-9`, `galaxy-s24` when Android matters; one surface per OS to compare them); web/SaaS → `laptop` or `desktop`; tablet → `ipad-11`. Declare **every product experience** as a `prototype.surfaces` entry with a human `label` (Customer app, Dispatch web, Kiosk), so each one is pickable in the Prototype switch (one app, any combination side by side, or all). Set `fits` (device kinds the app is made for) or `responsive: true` (websites) so its device picker lists the right sizes. Several actors (customer + staff, courier + dispatch, user + agent) → one surface each. |
| **States (screens)** | every distinct state the story needs, edge cases included (empty, error, offline, loading, permission) |
| **Flows** | the happy path first, then the edge cases, each a story of 5–15 steps |
| **Tweaks** | the variables a reviewer will want to flip: data volume, feature flags, roles, version A/B, copy variants, brand color, agent outcome (success/fail) |
| **Visual language** | the user's design system if the project has one (its tokens and components from the code repo); otherwise a clean neutral style |

## 2. Scaffold

```bash
flowstage init <dir> --stack html|react --name "<Product>"
# any other stack: init writes flowstage.json only; wire the app with references/stacks.md
```

In an existing repo, don't scaffold over it: write `flowstage.json` next to the app, point `app.url`/`app.command` at its dev server (use `{port}`), and add the bridge script.

## 3. Build the app so Flowstage can drive it

Four rules, in any stack:

1. **Every state is a URL.** Screens load straight into a state by seeding it from the URL (`#/cart?items=…`, `?state=offline`). Never "click three times to get there".
2. **Load the bridge first** (`flowstage-bridge.js`; injected automatically with `app.serve`). Pad for the device chrome with `var(--fs-safe-top)` and `var(--fs-safe-bottom)`. Theme from `[data-fs-theme]` or `Flowstage.env.theme`.
3. **Name what flows touch**: `data-fs="place-order"`. On canvas renderers (Compose, Flutter), use `Flowstage.target(name, () => rect)` and drive with commands.
4. **Hooks**: `Flowstage.onReset` (back to the start without a reload), `Flowstage.command(name, fn)` for things that happen off-screen (dispatch sends a job, an agent replies, a webhook lands), `Flowstage.onTweak`.

Several surfaces that must stay in sync (phone + dashboard) share state through `localStorage` + `BroadcastChannel` (same origin), unless the app has a real backend.
Seeded screens keep their state in memory, apart from the shared store (see the barista `seedFrom`).

## 4. Write flowstage.json

Follow `references/authoring.md`. In short:

- **screens**: one per state, with a `title`, short `notes` (what to notice, **bold** the key thing) and `links` to the next screens, `target` = the element tapped. Per-screen `tweaks` show variants (empty, sold out, error) without separate code paths.
- **canvas.sections**: one row per story or actor (the happy path, then the staff side, then edge cases), left to right in order.
- **flows**: steps that read like a script. `title` is what the actor does ("Places the order"), `say` is what to notice. Use `who` for the actor and `on` for the surface. Give big moments a longer `hold`.
- **tweaks**: each one useful to flip live, grouped; buttons for the commands a reviewer will want to fire by hand.

The user can also **draw a flow by hand**: Prototype → **Record**, click through, then save. A flow with raw step titles and empty captions lands in `flowstage.json`. When they say "polish the recorded flow", rewrite the titles in the actor's voice, add `who`/`say`/`hold`, swap `point` targets for `data-fs` names where the app has them, and split or merge steps.
The same goes for tweaks: they change them live in the panel and click **Save as defaults**, which writes the values back into the manifest. Read the manifest again before editing it.

## 5. Run and verify (every time)

```bash
flowstage check <dir>
flowstage dev <dir>          # run in the background; host on :4400 (or the next free port)
flowstage shot '#/canvas' --port 4400 --out <scratch>/canvas.png
flowstage shot '#/flow/<id>?step=<last>' --out <scratch>/end.png --wait 8000
flowstage shot '#/flow/<id>?play=1&speed=2' --wait <ms for the whole flow> --out <scratch>/played.png
```

`shot` prints console errors and exceptions; fix every one. Look at each screenshot: the canvas shows every screen in the right state with the arrows starting on the right elements, each flow ends in the expected state, and dark mode works if themes are on.
`--eval "<js>"` runs script in the host page and `--clicks "x,y;x,y"` sends real clicks (for checking Tweaks or Record).
Green dot above a frame = bridge connected; gray = URL-only.

Then give the user the links (`http://localhost:4400/#/prototype`, `#/canvas`, `#/flow/<id>?play=1`) and the command to start it again.
Leave the dev server running for them. Don't publish or upload anything unless they ask.

## 6. Comments, tasks and sharing

Read the reference before doing any of these:

- **Comments and tasks** (`references/comments.md`): "fix the comments", **"go through my comments"** / "do my comments" / "make the changes I left" (comments marked **For agent** or starting with `@agent`/`@claude` are tasks: `flowstage tasks`, `task start|done|ask`, never resolve one yourself), and joining a running session as an agent (`who`, `go`, `targets`, `point`, `comment`, `watch`).
- **Sharing** (`references/sharing.md`): working together live (`dev --host`), publishing a link (`flowstage publish --to cloudflare|netlify|vercel|github`), or a shared copy (`flowstage export`, the **Share** zip that opens with a double-click). Only when the user asks.

## Gotchas

- Port 5173 is often taken (another dev server may be running there). Always use `{port}` in `app.url`/`app.command`; an app that is "already running" at a fixed port may be someone else's.
- React: effects must return a function or nothing. The bridge's `onTweak`/`onReset`/`command` return unsubscribers; `state()` returns nothing. Use `templates/react/src/flowstage.js`.
- Flow jumps replay every earlier step instantly, so steps must be deterministic: fixed ids (`#101`), no random data, no real timers that a step depends on. Make timers commands instead (`{ "cmd": "expireOffer" }`).
- Button tweaks run in ONE frame (the first that registered the command) unless `on`/`everywhere` is set. Commands that write shared state must not run twice.
- Headless `shot` is real time. For animated playback, give `--wait` the length of the whole flow; for exact frames, use `?step=N`.
- The frame draws the status bar, cutout and nav bar: never draw your own in the app. Pad with `--fs-safe-top/bottom`; over a dark header call `Flowstage.statusBar('light')`.
- The on-screen keyboard is off by default (`"defaults": { "keyboard": true }` turns it on).
- The user arranges devices (drag the label grip or ‹ ›) and opens States/Flows (floating panel on the left, button left of the tabs) and Tweaks (floating panel on the right) from the floating header. That order lives in browser prefs; write the manifest's surface order as the sensible default (actor who starts the story on the left).
- Canvas renderers (Compose/wasm, Flutter web), heavy apps with more than ~10 screens, and apps with their own board of all screens: read `references/stacks.md` first (picture canvas, `waitForPaint`, the app-as-board canvas, the Compose recipe).
- Native iOS/Android (SwiftUI, Jetpack Compose on Android) cannot be framed. Use their web targets (Compose MP wasm, Expo web, Flutter web) or say so.

Files in this skill

  • SKILL.md10.5 KB
  • references/authoring.md3.9 KB
  • references/comments.md3.3 KB
  • references/sharing.md2.8 KB
  • references/stacks.md7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.