agentleFS
npownpow/claude-skills/diagram/SKILL.md

diagram

Skill4 starsChanged 7 months agoApache-2.0View on GitHub

Renders interactive diagrams in the browser using Cytoscape.js. Use when the user asks to visualize, diagram, draw, render, or show a graph, flowchart, dependency tree, roadmap, architecture diagram, or any node-and-edge structure. Always renders live in browser — never as a static image.

31 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use benchmark-models, setup-gbrain and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • mahiunfilteredSkill

    benchmark-models

    Cross-model benchmark for gstack skills. Runs the same prompt through Claude, GPT (via Codex CLI), and Gemini side-by-side — compares latency, tokens, cost, and optionally quality via LLM judge. Answers "which model is actually best for this skill?" with data instead of vibes. Separate from /benchmark, which measures web page performance. Use when: "benchmark models", "compare models", "which model is best for X", "cross-model comparison", "model shootout". (gstack) Voice triggers (speech-to-text aliases): "compare models", "model shootout", "which model is best".

    Also in 3 projects that use this

  • chloropineSkill

    setup-gbrain

    Set up gbrain for this coding agent: install the CLI, initialize a local PGLite or Supabase brain, register MCP, capture per-remote trust policy. One command from zero to "gbrain is running, and this agent can call it." Use when: "setup gbrain", "connect gbrain", "start gbrain", "install gbrain", "configure gbrain for this machine". (cgstack)

    Also in 3 projects that use this

  • seek888Skill

    open-gstack-browser

    Launch GStack Browser — AI-controlled Chromium with the sidebar extension baked in. Opens a visible browser window where you can watch every action in real time. The sidebar shows a live activity feed and chat. Anti-bot stealth built in. Use when asked to "open gstack browser", "launch browser", "connect chrome", "open chrome", "real browser", "launch chrome", "side panel", or "control my browser". Voice triggers (speech-to-text aliases): "show me the browser".

    Also in 3 projects that use this

  • Kit4SomeSkill

    unfreeze

    Also in 3 projects that use this

  • chloropineSkill

    scrape

    Pull data from a web page. First call on a new intent prototypes the flow via $B primitives and returns JSON. Subsequent calls on a matching intent route to a codified browser-skill and return in ~200ms. Read-only — for mutating flows (form fills, clicks, submissions), use /automate. Use when asked to "scrape", "get data from", "pull", "extract from", or "what's on" a page. (cgstack)

    Also in 3 projects that use this

  • MicrosoftSkill

    worktree

    Create, reuse or clean up a dedicated git worktree for working on a pull request or a private branch. Use from any PR-scoped workflow that needs an isolated checkout to keep current code and build output untouched.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 25 edited versions we read keep these.

  • 1

    Distinctive

    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. Distinctive:

    Before delivering, verify ALL:

    line 28
  2. Very specific:

    Never render to PNG: Always write /tmp/diagram.html and open in browser.

    line 44
  3. Very specific:

    Always use new_page for first open: Use mcp__chrome-devtools__new_page with url: file:///tmp/diagram.html.

    line 46
  4. Very specific:

    Always wait before screenshotting: Call wait_for on a text string that appears after Cytoscape renders (legend text or a node label).

    line 47
  5. Very specific:

    Never set node dimensions to label: Always use explicit pixel widths and heights (e.g.

    line 48

“Common” is measured: kept by at least 6 in 10 of the 25 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

Diagram

Renders interactive, draggable diagrams in the browser using Cytoscape.js from context-supplied nodes and edges.

Workflow

  1. Extract nodes and edges — read labels, connections, and any grouping/color hints from the user's request or conversation context.
  2. Assign colors and positions — choose a color scheme and set x/y coordinates for a readable layout. See TEMPLATE.md for layout patterns.
  3. Write the HTML file — write a complete self-contained file to /tmp/diagram.html using the Cytoscape.js template. See TEMPLATE.md for the full template.
  4. Render in browser — follow _shared/chrome-devtools-render.md to open /tmp/diagram.html, wait for render, screenshot, and fix-and-reload if needed. wait_for a string from the legend or a node label. See TROUBLESHOOTING.md for diagram-specific fixes.

Self-review checklist

Before delivering, verify ALL:

  • Screenshot shows all nodes with readable text — no overflow, no overlap
  • Solid edges are solid, dashed edges are dashed (check dashed: 'yes' not dashed: true)
  • cy.fit(cy.elements(), 60) is the last line of the script
  • CDN URL is exactly https://cdnjs.cloudflare.com/ajax/libs/cytoscape/3.29.2/cytoscape.min.js
  • Legend matches the color scheme used in the diagram
  • Hint text drag nodes · scroll to zoom · drag background to pan is present
  • No node has width or height set to label — always use explicit pixel values
  • wait_for is called before take_screenshot

Golden rules

Hard rules. Never violate these.

  1. Never use boolean edge attributes. Cytoscape selectors do not reliably match boolean data values. Always store edge style flags as strings: dashed: 'yes' or dashed: 'no'. Use selector edge[dashed = "yes"].
  2. Never render to PNG. Always write /tmp/diagram.html and open in browser. Static images cannot be dragged or zoomed by the user.
  3. Always call cy.fit last. cy.fit(cy.elements(), 60) must be the final line in the script block. Without it, the diagram may render off-screen or at wrong zoom.
  4. Always use new_page for first open. Use mcp__chrome-devtools__new_page with url: file:///tmp/diagram.html. Only use navigate_page with type: reload for subsequent reloads.
  5. Always wait before screenshotting. Call wait_for on a text string that appears after Cytoscape renders (legend text or a node label). Never call take_screenshot immediately after new_page.
  6. Never set node dimensions to label. Always use explicit pixel widths and heights (e.g. width: 200px, height: 80px). The label value causes unpredictable sizing.
  7. Always use text-wrap: wrap with text-max-width. Without these, long labels overflow node boundaries invisibly.

Reference files

FileContents
TEMPLATE.mdComplete Cytoscape.js HTML template, color palette, layout patterns for common diagram types
TROUBLESHOOTING.mdFailure diagnosis table: symptoms, causes, fixes

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.