agentleFS
d-padmanabhand-padmanabhan/agent-engineering-handbook/skills/reactflow-architecture-diagrams/SKILL.md

reactflow-architecture-diagrams

Skill17 starsChanged 56 days agoMITView on GitHub

Delivers narrative interactive architecture diagrams using React, TypeScript, Tailwind, and @xyflow/react (React Flow): node and edge patterns, optional Cloudflare orange shell grouping, routing, and verification. Use when adding or editing React Flow diagram components (Diagram.tsx suffix convention), files under components/diagrams, xyflow edges, animated canvas traffic, or when the user asks for a React Flow architecture diagram alongside documentation.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Follow rules/815-reactflow-diagrams.mdc for do/don't lists, file globs, and edge semantics.

    line 17
  2. Very specific:

    Add a parent shell node (cfShell or your name) with fixed width/height and overflow: 'visible'.

    line 34
  3. Very specific:

    Use opaque inner cards for text-heavy nodes sitting on the orange frame (see 815).

    line 36
  4. Very specific:

    Do not skip lint and build (or tsc -b) after graph or handle changes.

    line 44

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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 architecture diagrams

Canonical rule

Follow rules/815-reactflow-diagrams.mdc for do/don't lists, file globs, and edge semantics. This skill is the playbook; the rule is the contract.

When to use Mermaid vs React Flow

  • Mermaid (see rules/800-markdown.mdc and skills/documentation-standards): static diagrams in Markdown, ADRs, GitHub-rendered docs.
  • React Flow: interactive or animated canvases, custom nodes (logos, multi-line cards), and legend + diagram product pages.

Playbook: add a new diagram to an existing SPA

  1. Pick a reference diagram in the same app (or copy patterns from 815) and reduce scope; keep one story per canvas.
  2. Implement buildNodesAndEdges() (or equivalent) returning { nodes, edges }. Keep nodeTypes and edgeTypes at module scope with memo()-wrapped components.
  3. Add a route page: title, scope (what one request or one flow shows), optional static reference image, How to read bullets that map colors and line styles to meaning, then <YourDiagram />.
  4. Wire the router and home or index links; update README routes and assets tables when paths or figures change.
  5. Run lint and production build from the app directory.

Playbook: Cloudflare-scoped traffic

  1. Add a parent shell node (cfShell or your name) with fixed width/height and overflow: 'visible'.
  2. Nest child nodes with parentId + extent: 'parent'; convert world coordinates to parent-relative positions.
  3. Use opaque inner cards for text-heavy nodes sitting on the orange frame (see 815).

Playbook: identity and edge cases

  • JWKS / metadata fetch is not the same as OIDC login. If both appear, use dashed edges and distinct colors for issuance vs verification, and say so in page copy.

Verification

Do not skip lint and build (or tsc -b) after graph or handle changes; broken Handle ids fail at runtime.

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.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.