getartisanflow/wireflow/alpineflow-development

Claude Code and agent skill by getartisanflow/wireflow

Trust tier 3
  • community
  • ext:[{"type":"plugin","description":"Custom plugin integration"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Build interactive flow diagrams with AlpineFlow. Covers core directives, the $flow API, animation/timeline, theming, layout addons, the schema (ER/table) addon, the workflow (run/condition/replay) addon, and whiteboard tools. Activates when working with x-flow-* directives, x-schema-* inspectors, flowCanvas(), $flow or $workflowRun magic, or flow diagram features.

Install

npx vskill@latest install getartisanflow/wireflow/alpineflow-development

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as getartisanflow/wireflow/alpineflow-development.

AlpineFlow Development

When to Apply

Activate this skill when:

  • Creating or modifying flow diagrams with x-flow-* directives
  • Working with flowCanvas() configuration
  • Using $flow magic methods
  • Styling flows with --flow-* CSS variables
  • Implementing whiteboard drawing tools
  • Adding animation, timeline, or particle effects
  • Configuring auto-layout algorithms (dagre/force/hierarchy/elk)
  • Building schema / ER / table diagrams (x-flow-schema, the schema addon)
  • Building workflow / execution diagrams (x-flow-condition, x-flow-wait, the workflow addon's run/replay API)

Documentation

Use search-docs for detailed API reference. The docs at https://artisanflow.dev/docs/alpineflow are the source of truth for configuration options, directive props, event payloads, and CSS variables.

Critical Rules

1. Always use flow-container class

The container element MUST have class="flow-container". Without it, CSS variables don't apply and positioning breaks:

html
<!-- CORRECT -->
<div x-data="flowCanvas({...})" class="flow-container">
<!-- WRONG — no CSS variables, no background, broken layout -->
<div x-data="flowCanvas({...})">
2. Never set position: relative on custom node classes

The .flow-node class sets position: absolute. Any custom class that sets position: relative will override it, causing nodes to stack in document flow instead of being absolutely positioned:

css
/* WRONG — breaks node positioning */
.my-custom-node {
position: relative;
background: #fff;
}
/* CORRECT — flow-node already has position: absolute */
.my-custom-node {
background: #fff;
}

If child elements need a positioning context, .flow-node itself is already position: absolute which serves as a positioned ancestor.

3. Alpine scope isolation on x-data elements

Directives and expressions on the SAME element as x-data evaluate in THAT element's scope only. They do NOT see parent x-data scopes:

html
<!-- WRONG — tool is in parent scope, invisible to x-flow-freehand -->
<div x-data="{ tool: null }">
<div x-data="flowCanvas({...})"
x-flow-freehand="tool === 'draw'"> <!-- tool is undefined here -->
</div>
</div>
<!-- CORRECT — spread into same scope -->
<div x-data="{
...flowCanvas({...}),
tool: null,
}" x-flow-freehand="tool === 'draw'">
</div>
4. toolSettings must be a scope property, not config

Drawing directives read toolSettings from Alpine.$data(el), not from the config object:

html
<!-- WRONG — toolSettings in config is not accessible -->
<div x-data="flowCanvas({ toolSettings: { strokeColor: '#333' } })">
<!-- CORRECT — top-level scope property -->
<div x-data="{
...flowCanvas({...}),
toolSettings: { strokeColor: '#333', strokeWidth: 2, opacity: 1 },
}">
5. Freehand paths use fill, not stroke

The flow-freehand-end event produces a filled outline path via perfect-freehand. Render with fill, not stroke:

html
<!-- WRONG — path disappears or shows thin outline -->
<path :d="node.data.pathData" fill="none" :stroke="node.data.strokeColor" />
<!-- CORRECT — filled outline -->
<path :d="node.data.pathData" :fill="node.data.strokeColor" stroke="none" />
6. SVG annotations need overflow:visible

Annotation SVGs render at flow coordinates from a 1x1 container:

html
<svg style="position:absolute;top:0;left:0;width:1px;height:1px;overflow:visible;pointer-events:none;">
<path :d="node.data.pathData" :fill="node.data.strokeColor" stroke="none" />
</svg>
7. Panel CSS class selector

When checking if a click target is inside a panel, use .flow-panel class, not [x-flow-panel] attribute:

js
// WRONG — attribute selector doesn't match Alpine directive attributes
target.closest('[x-flow-panel]')
// CORRECT — the directive adds this CSS class
target.closest('.flow-panel')
8. viewportCulling defaults to 'auto'

Culling turns on automatically once the node count reaches cullingAutoThreshold (150) — off-screen nodes and edges get display:none. It is no longer opt-in. Set false to always render everything, or true to cull at any count:

js
flowCanvas({ viewportCulling: 'auto' }) // default — culls at ≥150 nodes
flowCanvas({ viewportCulling: false }) // always render everything
flowCanvas({ viewportCulling: true, cullingAutoThreshold: 500, cullingBuffer: 100 })
9. update() vs animate()

update() is the core method (instant by default). animate() is a wrapper with 300ms default:

js
// Instant update
$flow.update({ nodes: { 'a': { position: { x: 300 } } } });
// Smooth transition (300ms default)
$flow.animate({ nodes: { 'a': { position: { x: 300 } } } });
// Custom duration on either
$flow.update({ nodes: { 'a': { position: { x: 300 } } } }, { duration: 500 });
10. Size the container via containerHeight, not Tailwind h-full

.flow-container height comes from height: var(--flow-container-height, 400px) — an unlayered rule. Tailwind v4 puts utilities like h-full in @layer utilities (lower cascade priority), so h-full silently loses and the container stays stuck at the 400px default (whitespace gap below the canvas). Set the height the canonical way:

js
// config option — accepts 'auto' | 'fill' | number | string
flowCanvas({ containerHeight: 'fill' }) // fills a sized parent
html
<!-- or override the variable inline (what container-height="fill" does under the hood) -->
<div x-data="flowCanvas({...})" class="flow-container" style="--flow-container-height: 100%"></div>

Common Patterns

Minimal flow
html
<div x-data="flowCanvas({
nodes: [
{ id: 'a', position: { x: 0, y: 0 }, data: { label: 'Start' } },
{ id: 'b', position: { x: 250, y: 100 }, data: { label: 'End' } },
],
edges: [
{ id: 'e1', source: 'a', target: 'b' },
],
background: 'dots',
})" class="flow-container" style="height: 400px;">
<div x-flow-viewport>
<template x-for="node in nodes" :key="node.id">
<div x-flow-node="node">
<div x-flow-handle:target></div>
<span x-text="node.data.label"></span>
<div x-flow-handle:source></div>
</div>
</template>
</div>
</div>
Whiteboard with all tools

The drawing directives below require the whiteboard addon — they are NOT in core. Register it or every x-flow-*-draw/-freehand/-eraser attribute is a no-op: import AlpineFlowWhiteboard from '@getartisanflow/alpineflow/whiteboard'; Alpine.plugin(AlpineFlowWhiteboard).

html
<div x-data="{
...flowCanvas({
nodes: [], edges: [],
selectionOnDrag: true,
panOnDrag: [2],
background: 'dots',
}),
tool: null,
toolSettings: { strokeColor: '#334155', strokeWidth: 2, opacity: 1 },
}"
class="flow-container"
x-flow-freehand="tool === 'draw'"
x-flow-highlighter="tool === 'highlighter'"
x-flow-arrow-draw="tool === 'arrow'"
x-flow-circle-draw="tool === 'circle'"
x-flow-rectangle-draw="tool === 'rectangle'"
x-flow-text-tool="tool === 'text'"
x-flow-eraser="tool === 'eraser'"
@flow-freehand-end="addNodes([{
id: 'ann-' + Date.now(),
position: { x: 0, y: 0 },
draggable: false, selectable: false,
class: 'flow-node-annotation',
data: { annotation: 'drawing', pathData: $event.detail.pathData, strokeColor: $event.detail.strokeColor, opacity: $event.detail.opacity },
}])"
>
<div x-flow-viewport>
<template x-for="node in nodes" :key="node.id">
<div x-flow-node="node">
<!-- Annotation template -->
<template x-if="node.data?.annotation === 'drawing'">
<svg style="position:absolute;top:0;left:0;width:1px;height:1px;overflow:visible;pointer-events:none;">
<path :d="node.data.pathData" :fill="node.data.strokeColor" :opacity="node.data.opacity ?? 1" stroke="none" />
</svg>
</template>
<!-- Regular node -->
<template x-if="!node.data?.annotation">
<div>
<div x-flow-handle:target></div>
<span x-text="node.data.label"></span>
<div x-flow-handle:source></div>
</div>
</template>
</div>
</template>
</div>
</div>

Event listeners needed for ALL tools: flow-freehand-end, flow-highlight-end, flow-rectangle-draw, flow-arrow-draw, flow-circle-draw, flow-text-draw. Each creates an annotation node with class: 'flow-node-annotation'. See whiteboard addon docs for complete event handler and node template code for every tool type.

Timeline animation
js
$flow.timeline()
.step({ nodes: ['a'], position: { x: 200 }, duration: 600, easing: 'easeInOut' })
.step({ nodes: ['b'], position: { x: 200 }, duration: 600 })
.parallel([
{ edges: ['e1'], edgeColor: '#22c55e', duration: 400 },
{ edges: ['e2'], edgeColor: '#22c55e', duration: 400 },
])
.play()
Path motion

Move nodes along curves with followPath on animate() or in timeline steps:

js
// Orbit — JS path function (client-side only)
$flow.animate({
nodes: { 'satellite': { followPath: orbit({ cx: 200, cy: 200, radius: 100 }) } },
}, { duration: 3000, loop: true, easing: 'linear' });
// SVG path string — also works from server via flowAnimate()
$flow.animate({
nodes: { 'n1': { followPath: 'M 0 100 Q 200 0 400 100' } },
}, { duration: 2000 });

Built-in path functions: orbit(), wave(), along(), pendulum(), drift(), stagger(). Search docs for full options.

Edge with draw-in animation
js
$flow.timeline()
.step({
addEdges: [{ id: 'e-new', source: 'a', target: 'b', markerEnd: 'arrowclosed' }],
edgeTransition: 'draw',
duration: 800,
})
.play()
Whole-graph replace

Swap the entire graph atomically. Both methods return Promise<void> that resolves once the new nodes are measured — so an immediate fitView() actually fits (no manual nextFrame):

js
await $flow.replaceNodes(newNodes, newEdges); // edges default to [] → true whole-graph swap
await $flow.fitView(); // nodes are measured → this fits
$flow.setNodes(newNodes); // replace nodes only, keep current edges

This is the first-class replacement for the old $clear() + addNodes() workaround. Server-callable via the flow:replaceNodes / flow:setNodes wire commands.

React only to user intent (change origin)

nodes-change / edges-change carry an origin so you can tell a user drop from your own API write:

js
el.addEventListener('flow-nodes-change', (e) => {
// e.detail = { type, nodes, origin } // origin ∈ 'drop' | 'paste' | 'api' | 'load'
if (e.detail.origin === 'drop') persist(e.detail.nodes);
});
$flow.addNodes(nodes, { source: 'load' }); // mutators can stamp origin (default 'api')
// the `restore` event carries origin too: 'undo' | 'redo' | 'load'
Config callbacks receive the canvas context

Every config callback gets the canvas context (the same object as $flow) as an optional second argument — no global reference needed:

js
flowCanvas({
onDrop: (detail, ctx) => ctx.addNodes(nodeFrom(detail)),
onConnect: (detail, ctx) => ctx.fitView(),
})

The context is passed as an argument only; it is never added to the event detail, which stays a plain serializable object for the DOM CustomEvent.

v0.2.1-alpha surface

Reference for the newer canvas surface — verify signatures against the docs, don't guess:

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
93
Repository forks
3
7-day trend score
23

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • pluginCustom plugin integration

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/getartisanflow/wireflow/alpineflow-development/badge)](https://verified-skill.com/skills/getartisanflow/wireflow/alpineflow-development)

Something wrong with this skill or its page? Tell us.