FlowZap Diagram Skill
/install flowzap-diagrams
\r \r
FlowZap Diagram Skill\r
\r
Generate valid FlowZap Code (.fz) diagrams from natural-language requests,\r
validate them, and return shareable FlowZap playground URLs.\r
\r
This skill is designed to be paired with the flowzap-mcp server. The skill\r
gives the agent FlowZap-specific diagram knowledge and output rules; the MCP\r
server provides the actual tools.\r
\r
Trust and privacy summary\r
\r
- This skill bundle is documentation only:
SKILL.mdplus reference files. It\r does not execute code by itself.\r - The
flowzap-mcpserver runs locally on the user's machine over stdio.\r - Outbound requests are restricted to
https://flowzap.xyz.\r - Raw HTTP logs, OpenAPI specs, and code snippets are parsed locally inside the\r MCP package. Only generated FlowZap Code is sent to FlowZap public endpoints\r when validation or playground creation is requested.\r \r
When to use this skill\r
\r
- User asks for a workflow, flowchart, process diagram, sequence diagram, or architecture diagram.\r
- User pastes HTTP logs, OpenAPI specs, or code and wants them visualised.\r
- User wants to compare two diagram versions (diff) or patch an existing diagram.\r \r
Installation model\r
\r This setup has two parts:\r \r
- Install the skill bundle so your agent knows when to use FlowZap and how\r to produce correct FlowZap Code.\r
- Install the MCP server so your agent can validate code, create\r playground URLs, diff diagrams, and apply structured changes.\r \r
Install the skill bundle\r
\r Recommended:\r \r
npx skills add flowzap-xyz/flowzap-mcp --skill flowzap-diagrams\r
```\r
\r
If your agent does not support `skills.sh`, install this bundle through your\r
agent's skill manager or by copying the folder into the agent's local skills\r
directory.\r
\r
Manual locations:\r
\r
- Claude Code: `.claude/skills/flowzap-diagrams/SKILL.md`\r
- Windsurf: `.windsurf/skills/flowzap-diagrams/SKILL.md`\r
- Cursor: `.cursor/skills/flowzap-diagrams/SKILL.md`\r
\r
### Install the MCP server (required for tools)\r
\r
If the FlowZap MCP server is not already configured, install it:\r
\r
```bash\r
# Claude Code\r
claude mcp add --transport stdio flowzap -- npx -y [email protected]\r
\r
# Or add to .mcp.json / claude_desktop_config.json / cursor / windsurf config:\r
{\r
"mcpServers": {\r
"flowzap": {\r
"command": "npx",\r
"args": ["-y", "[email protected]"]\r
}\r
}\r
}\r
```\r
\r
### Package verification\r
\r
The pinned version `1.3.6` can be verified against the npm registry:\r
\r
| Field | Value |\r
|-------|-------|\r
| **npm** | [[email protected]](https://www.npmjs.com/package/flowzap-mcp/v/1.3.6) |\r
| **Integrity (SHA-512)** | `sha512-9pnsETVvbCj5+cDEbiwRBWbqaA+FDMIJFU/vylXCnJOAt6nuvlFQf3/M8WI6EeBoVtGw/OyBZtJTQSjFUh4U0w==` |\r
| **Shasum** | `86a434a49f4ec9e6fae76cc34acb73f357e81b1f` |\r
| **Source** | [github.com/flowzap-xyz/flowzap-mcp](https://github.com/flowzap-xyz/flowzap-mcp) |\r
| **License** | MIT |\r
\r
To verify locally before use:\r
```bash\r
npm view [email protected] dist.integrity dist.shasum\r
```\r
\r
Compatible tools: Claude Desktop, Claude Code, Cursor, Windsurf, OpenAI Codex,\r
Warp, Zed, Cline, Roo Code, Continue.dev, Sourcegraph Cody.\r
\r
**Not compatible:** Replit, Lovable.dev.\r
\r
Without the MCP server, this skill can still help an agent draft FlowZap Code,\r
but it cannot validate diagrams, create playground URLs, or use the FlowZap\r
tooling workflow described below.\r
\r
## Available MCP tools\r
\r
| Tool | Purpose |\r
|------|---------|\r
| `flowzap_validate` | Check .fz syntax before sharing |\r
| `flowzap_create_playground` | Get a shareable playground URL |\r
| `flowzap_get_syntax` | Retrieve full DSL docs at runtime |\r
| `flowzap_export_graph` | Export diagram as structured JSON (lanes, nodes, edges) |\r
| `flowzap_artifact_to_diagram` | Parse HTTP logs / OpenAPI / code → diagram + playground URL |\r
| `flowzap_diff` | Structured diff between two .fz versions |\r
| `flowzap_apply_change` | Patch a diagram (insert/remove/update nodes/edges) |\r
\r
## FlowZap Code DSL — quick reference\r
\r
FlowZap Code is **not** Mermaid, **not** PlantUML. It is a unique DSL offering a simple syntax for a triple-view option to workflow, sequence and architecture diagrams.\r
\r
### Shapes (only 4)\r
\r
| Shape | Use for |\r
|-------|---------|\r
| `circle` | Start / End events |\r
| `rectangle` | Process steps / actions |\r
| `diamond` | Decisions (Yes/No branching) |\r
| `taskbox` | Assigned tasks (`owner`, `description`, `system`) |\r
\r
### Syntax rules\r
\r
- **Node IDs** are globally unique, sequential, no gaps: `n1`, `n2`, `n3` …\r
- **Node attributes** use colon: `label:"Text"`\r
- **Edge labels** use equals inside brackets: `[label="Text"]`\r
- **Handles** are required on every edge: `n1.handle(right) -> n2.handle(left)`\r
- **Directions**: `left`, `right`, `top`, `bottom`\r
- **Cross-lane edges**: prefix target with lane name: `sales.n5.handle(top)`\r
- **Lane display label**: one `# Label` comment on the same line as the opening brace\r
- **Loops**: `loop [condition] n1 n2 n3` — flat, inside a lane block\r
- **Layout**: prefer horizontal left→right; use top/bottom only for cross-lane hops\r
\r
### Multi-lane sequence design\r
\r
- **Ping-pong rule**: For multi-participant processes, every cross-lane interaction must alternate back-and-forth between lanes. A request from Lane A → Lane B must be followed by a response from Lane B → Lane A before any new major cross-lane request begins. This is now a strict validation requirement, not just a readability suggestion.\r
- **Chronological order**: The sequence view follows cross-lane edge definition order. Define request, response, then next request in the exact order they happen.\r
\r
### Gotchas — never do these\r
\r
- Do NOT use `label="Text"` on nodes (must be `label:"Text"`).\r
- Do NOT use `label:"Text"` on edges (must be `[label="Text"]`).\r
- Do NOT skip node numbers (n1, n3 → invalid; must be n1, n2).\r
- Do NOT omit lane prefix on cross-lane edges.\r
- Do NOT output Mermaid, PlantUML, or any other syntax.\r
- Do NOT add comments except the single `# Display Label` per lane.\r
- Do NOT place `loop` outside a lane's braces.\r
- Do NOT use a `taskbox` shape unless the user explicitly requests it.\r
\r
### Minimal templates\r
\r
**Single lane:**\r
\r
```\r
process { # Process\r
n1: circle label:"Start"\r
n2: rectangle label:"Step"\r
n3: circle label:"End"\r
n1.handle(right) -> n2.handle(left)\r
n2.handle(right) -> n3.handle(left)\r
}\r
```\r
\r
**Two lanes with cross-lane edge:**\r
\r
```\r
user { # User\r
n1: circle label:"Start"\r
n2: rectangle label:"Submit"\r
n5: rectangle label:"Receive result"\r
n1.handle(right) -> n2.handle(left)\r
n2.handle(bottom) -> app.n3.handle(top) [label="Send"]\r
}\r
\r
app { # App\r
n3: rectangle label:"Process"\r
n4: rectangle label:"Respond"\r
n3.handle(right) -> n4.handle(left)\r
n4.handle(top) -> user.n5.handle(bottom) [label="Result"]\r
}\r
```\r
\r
**Decision branch:**\r
\r
```\r
flow { # Flow\r
n1: rectangle label:"Check"\r
n2: diamond label:"OK?"\r
n3: rectangle label:"Fix"\r
n4: rectangle label:"Proceed"\r
n1.handle(right) -> n2.handle(left)\r
n2.handle(bottom) -> n3.handle(top) [label="No"]\r
n2.handle(right) -> n4.handle(left) [label="Yes"]\r
}\r
```\r
\r
**For the full DSL specification and advanced multi-lane examples**: See [references/syntax.md](references/syntax.md)\r
\r
## Workflow: how to generate a diagram\r
\r
1. Identify the **actors/systems** (→ lanes) and **steps** (→ nodes) from the user's description.\r
2. Write FlowZap Code following all rules above.\r
3. Call `flowzap_validate` to verify syntax.\r
4. If valid, call `flowzap_create_playground` to get a shareable URL.\r
5. Return the FlowZap Code **and** the playground URL to the user.\r
6. Always output **only** raw FlowZap Code when showing the diagram — no Markdown fences wrapping .fz content, no extra commentary mixed in.\r
\r
Full MCP documentation: [flowzap.xyz/docs/mcp](https://flowzap.xyz/docs/mcp)\r
\r
## Security and data transparency\r
\r
The trust boundary is intentionally narrow:\r
\r
- The skill bundle is static Markdown and reference text.\r
- The MCP server runs locally and only calls public FlowZap APIs.\r
- Outbound traffic is restricted to `https://flowzap.xyz`.\r
- Validation is stateless; playground sessions are time-limited.\r
\r
The `flowzap-mcp` server runs locally on the user's machine (stdio transport) and enforces the following safeguards:\r
\r
| Control | Detail |\r
|---------|--------|\r
| **TLS only** | All outbound requests require `https://` and are restricted to `flowzap.xyz` (SSRF protection) |\r
| **No authentication** | Uses only public FlowZap APIs; no API keys, tokens, or user credentials are stored or transmitted |\r
| **No user-data access** | Cannot read diagrams, accounts, or any data beyond what the agent explicitly passes in |\r
| **Input validation** | Code capped at 50 KB, total input at 100 KB; null bytes and control characters stripped |\r
| **Rate limiting** | Client-side 30 requests/minute sliding window |\r
| **Request timeout** | 30-second hard timeout with `AbortController` |\r
| **Response sanitization** | Only expected fields are returned; playground URLs validated against allowlist |\r
| **Audit logging** | All tool calls and API requests logged to `stderr` (not exposed to the MCP client) |\r
\r
### Data flow scope\r
\r
The MCP server processes raw inputs locally and sends only generated or agent-provided FlowZap Code to FlowZap public endpoints:\r
\r
1. `POST https://flowzap.xyz/api/validate` — returns syntax validation result\r
2. `POST https://flowzap.xyz/api/playground/create` — returns an ephemeral playground URL (60-minute TTL, non-guessable token)\r
\r
If the agent uses `flowzap_artifact_to_diagram`, the raw HTTP logs, OpenAPI spec,\r
or code snippet are parsed locally inside the MCP package first. Only the\r
resulting FlowZap Code is sent when a playground URL is created.\r
\r
No local file paths, environment variables, user identity, repository contents,\r
or credentials are transmitted by the MCP package.\r
\r
### Playground URL access controls\r
\r
Playground URLs are ephemeral, time-limited (60-minute TTL), and use non-guessable cryptographic tokens. They are read-only views of the diagram code submitted at creation time. No account or login is required to view them; no data persists beyond the TTL.\r
\r
### Data lifecycle\r
\r
| Endpoint | Data stored | Retention |\r
|----------|-------------|-----------|\r
| `POST /api/validate` | **None** — stateless; code is parsed in memory and discarded after the response | 0 (not persisted) |\r
| `POST /api/playground/create` | FlowZap Code only (in PostgreSQL) | 60 minutes (database row + playground URL both expire) |\r
\r
The playground session is stored server-side with a cryptographic token (UUID v4). After the 60-minute TTL, the session is deleted — either on the next access attempt or during a periodic sweep. No user identity, file paths, environment variables, or host metadata are attached to the session.\r
\r
### What the MCP server does NOT do\r
\r
- **No filesystem access** — cannot read or write files on the host machine\r
- **No environment variable access** — does not read or transmit `process.env` or shell variables\r
- **No code execution** — does not evaluate, compile, or run any user code; it only transmits FlowZap DSL text\r
- **No network scanning** — outbound connections are restricted to `flowzap.xyz` over TLS (SSRF-protected allowlist)\r
- **No long-term data persistence** — playground sessions expire after 60 minutes; the validate endpoint stores nothing\r
- **No telemetry or tracking** — no analytics, device fingerprinting, or usage data is collected by the MCP server; server-side API logs record only IP, user-agent, and code length (not code content)\r
\r
## Further resources\r
\r
- [FlowZap Code full spec](https://flowzap.xyz/flowzap-code)\r
- [LLM context file](https://flowzap.xyz/llms-full.txt)\r
- [JSON syntax schema](https://flowzap.xyz/api/flowzap-code-schema.json)\r
- [200+ workflow templates](https://flowzap.xyz/templates)\r
- [MCP server docs](https://flowzap.xyz/docs/mcp)\r
- [npm package — flowzap-mcp v1.3.6](https://www.npmjs.com/package/flowzap-mcp)\r
- [GitHub](https://github.com/flowzap-xyz/flowzap-mcp)\r
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install flowzap-diagrams - 安装完成后,直接呼叫该 Skill 的名称或使用
/flowzap-diagrams触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
FlowZap Diagram Skill 是什么?
Generate, validate and publish workflow, sequence and architecture diagrams, using FlowZap Code DSL. Use when the user asks to create a workflow, flowchart,... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 92 次。
如何安装 FlowZap Diagram Skill?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install flowzap-diagrams」即可一键安装,无需额外配置。
FlowZap Diagram Skill 是免费的吗?
是的,FlowZap Diagram Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
FlowZap Diagram Skill 支持哪些平台?
FlowZap Diagram Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 FlowZap Diagram Skill?
由 flowzap-xyz(@flowzap-xyz)开发并维护,当前版本 v1.3.6。