devlab-web-xyflow-usage

devlab-web-xyflow-usage is a skill for Claude Code, Codex from seed-forge/harness-ai-kit. It costs 35 tokens per session (2,502 once invoked), scanned A, original, Apache-2.0.

A usage guide for @xyflow/react, a React library for interactive node-and-connection diagrams. It explains custom nodes and edges, zooming, panning, dragging, connecting, and integrating the canvas into Astro applications.

In plain words
What is it for?
Use it to build flowcharts, system topologies, lifecycle maps, and other interactive canvases with expandable or clickable nodes. It covers the data structures and components needed for custom node and edge types.
Why use it?
It helps avoid common implementation mistakes when building diagrams whose nodes need custom content and interactions. It also clarifies when a different tool is better for timelines, static diagrams, or precise charts.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build flowcharts, system topologies, lifecycle maps, and other interactive canvases with expandable or clickable nodes. It covers the data structures and components needed for custom node and edge types.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/seed-forge/harness-ai-kit/devlab-web-xyflow-usage
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add seed-forge/harness-ai-kit --skill devlab-web-xyflow-usage
Clone the repo
git clone --depth 1 https://github.com/seed-forge/harness-ai-kit

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for devlab-web-xyflow-usage

README.md
[![agentmods](https://agentmods.dev/badge/skills/seed-forge/harness-ai-kit/devlab-web-xyflow-usage/github.svg)](https://agentmods.dev/skills/seed-forge/harness-ai-kit/devlab-web-xyflow-usage)
Your own site
<a href="https://agentmods.dev/skills/seed-forge/harness-ai-kit/devlab-web-xyflow-usage"><img src="https://agentmods.dev/badge/skills/seed-forge/harness-ai-kit/devlab-web-xyflow-usage/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for devlab-web-xyflow-usage

Your own site · 80×15
<a href="https://agentmods.dev/skills/seed-forge/harness-ai-kit/devlab-web-xyflow-usage"><img src="https://agentmods.dev/badge/skills/seed-forge/harness-ai-kit/devlab-web-xyflow-usage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,502 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.02502
Opus 5.5 $0.00014 $0.01001
Sonnet 5.5 $0.00007 $0.00500
Haiku 4.5 $0.00003 $0.00250

Measured 1mo ago against content hash 004be02bd5ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

devlab-web-xyflow-usage scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/devlab-web-xyflow-usage/SKILL.md · 192 lines

How it starts

The opening of the file, as written. The whole thing — 192 lines — stays where its author put it; the contents beside it link to each section on GitHub.

devlab-web-xyflow-usage

库信息

项 值
名称 @xyflow/react (React Flow)
GitHub https://github.com/xyflow/xyflow
官方文档 https://reactflow.dev
npm https://www.npmjs.com/package/@xyflow/react
当前版本 ^12.11.1
核心能力 节点-边画布、自定义节点/边类型、zoom/pan、拖拽、连线、子流程
体积 ~150KB (react + xyflow)

适用场景

  • 需要可交互的节点-边画布(流程图、拓扑图、生命周期地图等)
  • 节点需要完全自定义 DOM 结构
  • 需要 zoom/pan/fitView 画布控制
  • 需要节点展开/折叠、点击交互
  • 已有 React 19 环境

不适用场景

  • 简单的时间线/甘特图 → 用 vis-timeline 或纯 CSS
  • 纯静态的流程图展示 → 用 SVG/Canvas 直接画
  • 需要亚像素级精度的图表 → 用 ECharts/D3

核心概念

节点 (Node)

interface Node {
  id: string;           // 唯一标识
  type: string;         // 对应 nodeTypes 中的组件名
  position: { x: number; y: number };  // 画布坐标
  data: Record<string, unknown>;       // 传递给自定义节点的数据
}

边 (Edge)

interface Edge {
  id: string;
  source: string;       // 源节点 id
  target: string;       // 目标节点 id
  type?: string;        // 对应 edgeTypes 中的组件名
  animated?: boolean;
  style?: CSSProperties;
}

自定义节点

import { Handle, Position, type NodeProps } from "@xyflow/react";

function MyNode({ data }: NodeProps) {
  return (
    <div className="my-node">
      <Handle type="target" position={Position.Left} />
      {/* 自定义内容 */}
      <Handle type="source" position={Position.Right} />
    </div>
  );
}

const nodeTypes = { my: MyNode };

画布配置

<ReactFlow
  nodes={nodes}
  edges={edges}
  nodeTypes={nodeTypes}
  colorMode="dark"         // 暗色主题
  fitView                  // 自动适配视口
  nodesDraggable={false}   // 禁止拖拽节点
  nodesConnectable={false} // 禁止连线
  elementsSelectable={false}
  panOnDrag={false}        // 禁止画布平移
  preventScrolling={false} // 允许页面滚动
/>

Astro + React Islands 集成

包装组件

---
// Wrapper.astro
import FlowComponent from "./FlowComponent.tsx";
---

<!-- client:only 跳过 SSR,适合需要确定尺寸的组件 -->
<FlowComponent client:only="react" />

<!-- client:visible 延迟加载,适合首屏不需要的组件 -->
<FlowComponent client:visible />

Read the full file on GitHub · 192 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 192 lines · 35 tokens per session scan A 004be02bd5ad

Subscribe to this mod's changes

devlab-web-xyflow-usage is a skill published in the GitHub repository seed-forge/harness-ai-kit (25 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 35 tokens to every session and 2,502 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.