Agent Skills › kqcoxn/MaaPipelineEditor › react-flow-node-ts

react-flow-node-ts

GitHub

提供 React Flow 自定义节点组件的开发模板与规范,包含 TypeScript 类型定义、Zustand 状态管理及 Handle 集成模式。适用于构建可视化流程图编辑器中的节点 UI 组件。

.agents/skills/react-flow-node-ts/SKILL.md kqcoxn/MaaPipelineEditor

Trigger Scenarios

创建 React Flow 自定义节点 实现可视化工作流编辑器组件 需要 React Flow 节点的类型定义和状态管理

Install

npx skills add kqcoxn/MaaPipelineEditor --skill react-flow-node-ts -g -y
More Options

Non-standard path

npx skills add https://github.com/kqcoxn/MaaPipelineEditor/tree/main/.agents/skills/react-flow-node-ts -g -y

Use without installing

npx skills use kqcoxn/MaaPipelineEditor@react-flow-node-ts

指定 Agent (Claude Code)

npx skills add kqcoxn/MaaPipelineEditor --skill react-flow-node-ts -a claude-code -g -y

安装 repo 全部 skill

npx skills add kqcoxn/MaaPipelineEditor --all -g -y

预览 repo 内 skill

npx skills add kqcoxn/MaaPipelineEditor --list

SKILL.md

Frontmatter
{
    "name": "react-flow-node-ts",
    "license": "MIT",
    "metadata": {
        "author": "Microsoft",
        "version": "1.0.0"
    },
    "description": "Create React Flow node components with TypeScript types, handles, and Zustand integration. Use when building custom nodes for React Flow canvas, creating visual workflow editors, or implementing node-based UI components."
}

React Flow Node

Create React Flow node components following established patterns with proper TypeScript types and store integration.

Website: https://reactflow.dev/

References

This skill includes a local mirror of the React Flow official documentation under references/. Use it when you need detailed API signatures, guides, or UI component references without relying on network access:

Prefer the local references over the website when exact API behavior or TypeScript types matter, because the mirrored docs are pinned to the same version this skill targets.

Quick Start

Copy templates from assets/ and replace placeholders:

  • {{NodeName}} → PascalCase component name (e.g., VideoNode)
  • {{nodeType}} → kebab-case type identifier (e.g., video-node)
  • {{NodeData}} → Data interface name (e.g., VideoNodeData)

Templates

Node Component Pattern

export const MyNode = memo(function MyNode({
  id,
  data,
  selected,
  width,
  height,
}: MyNodeProps) {
  const updateNode = useAppStore((state) => state.updateNode);
  const canvasMode = useAppStore((state) => state.canvasMode);

  return (
    <>
      <NodeResizer isVisible={selected && canvasMode === "editing"} />
      <div className="node-container">
        <Handle type="target" position={Position.Top} />
        {/* Node content */}
        <Handle type="source" position={Position.Bottom} />
      </div>
    </>
  );
});

Type Definition Pattern

export interface MyNodeData extends Record<string, unknown> {
  title: string;
  description?: string;
}

export type MyNode = Node<MyNodeData, "my-node">;

Integration Steps

  1. Add type to src/frontend/src/types/index.ts
  2. Create component in src/frontend/src/components/nodes/
  3. Export from src/frontend/src/components/nodes/index.ts
  4. Add defaults in src/frontend/src/store/app-store.ts
  5. Register in canvas nodeTypes
  6. Add to AddBlockMenu and ConnectMenu

Version History

  • 9875bea Current 2026-07-24 22:31

Same Skill Collection

.agents/skills/ant-design-x/skills/use-x-chat/SKILL.md
.agents/skills/ant-design-x/skills/x-card/SKILL.md
.agents/skills/ant-design-x/skills/x-chat-provider/SKILL.md
.agents/skills/ant-design-x/skills/x-components/SKILL.md
.agents/skills/ant-design-x/skills/x-markdown/SKILL.md
.agents/skills/ant-design/SKILL.md
.agents/skills/maafw/SKILL.md
.agents/skills/mpe-background-art/SKILL.md
.agents/skills/shadcn/SKILL.md
.agents/skills/sync-reference-projects/SKILL.md
.agents/skills/tauri-for-mpe/SKILL.md
.agents/skills/tauri-v2/SKILL.md
.agents/skills/ui-ux-pro-max/SKILL.md
.agents/skills/update-local-mfw/SKILL.md
.agents/skills/web-design-guidelines/SKILL.md
.agents/skills/zustand-store-ts/SKILL.md
.agents/skills/ant-design-x/skills/x-request/SKILL.md

Metadata

Files
0
Version
709f113
Hash
1b807748
Indexed
2026-07-24 22:31

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-10 07:08
浙ICP备14020137号-1