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

react-flow-node-ts

Skill424 starsChanged 35 days agoMITView on GitHub

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.

3 other projects use a version of this, 3 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. 2 are common, 3 are distinctive, and 3 are very specific to this project.

  • 2

    Common

    Most of the 3 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Common:

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

    line 12
  2. Distinctive:

    Start with api-reference/index.md for an overview.

    line 21
  3. Distinctive:

    Start with learn/index.md for the quick start.

    line 24
  4. Distinctive:

    Start with ui/index.md for setup and usage.

    line 27
  5. Very specific:

    Add type to src/frontend/src/types/index.ts

    line 83
  6. Very specific:

    Create component in src/frontend/src/components/nodes/

    line 84
  7. Very specific:

    Add defaults in src/frontend/src/store/app-store.ts

    line 86
  8. Common:

    Add to AddBlockMenu and ConnectMenu

    line 88

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

  • references/api-reference/ — Full API reference for components, hooks, types, and utilities.
    • Start with api-reference/index.md for an overview.
    • Common node-related entries: components/handle.md, components/node-resizer.md, types/node.md, hooks/use-nodes.md.
  • references/learn/ — Tutorials, concepts, customization guides, and layouting best practices.
    • Start with learn/index.md for the quick start.
    • Relevant guides: learn/customization/custom-nodes.md, learn/layouting/layouting.md.
  • references/ui/ — React Flow UI components and templates built on shadcn/ui.
    • Start with ui/index.md for setup and usage.

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

  • assets/template.tsx - Node component
  • assets/types.template.ts - TypeScript definitions

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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.