agentleFS
dustinkeetondustinkeeton/wafflestack/.claude/skills/diagram/SKILL.md

diagram

Skill2 starsChanged 3 months agoApache-2.0View on GitHub

Produce an architecture, workflow, sequence, data-flow, or lifecycle/state diagram through the best diagram provider present on this machine — the archify skill when it is installed (interactive standalone HTML), otherwise a Mermaid block embedded in the target doc. Detects the provider at invocation, never installs one, and names the provider it used in the result. Use when a doc needs a system diagram (ARCHITECTURE.md), when asked to visualize architecture, a request flow, an API call sequence, a pipeline, or a state machine, or to turn a Mermaid sketch into a richer form. Invokable by users and agents.

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 9 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

2 rules. 0 are common, 1 is distinctive, and 1 is 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.

  • 1

    Very specific

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

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

    Confirm the winner actually runs: If archify is present, run its self-check (node <archify dir>/bin/archify.mjs doctor) once.

    line 31
  2. Distinctive:

    Every result — the reply to the caller and, for agent-granted use, the docs-pass report — carries one line in this exact shape, so a reader …

    line 58

“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 — one capability, the best available provider

When this skill is invoked, produce the diagram the caller asked for through the first provider whose detection passes, then say which provider ran. If invoked with an argument (e.g., /diagram the render pipeline into ARCHITECTURE.md), diagram that subject and place the result in that doc. If invoked without arguments, diagram the thing you are currently documenting.

This is a proxy skill: it is named for the capability (diagram), not for a provider, so a doc or agent can ask for a diagram without knowing what is installed. The provider list below is ordered by preference and ends in a provider that needs nothing installed, so the skill always produces something.

This skill is both user-invocable and agent-granted:

  • User-invoked — run /diagram <what> to get a diagram of that subject.
  • Agent-granted — agents that list diagram in their skills: frontmatter use it whenever a doc they write calls for a diagram, without an explicit invocation.

1. Providers, in order

PriorityProviderDetectOutput
1archify (external, optional)A SKILL.md at .claude/skills/archify/ or .agents/skills/archify/ (project install), or at ~/.agents/skills/archify/ or ~/.claude/skills/archify/ (global install)A self-contained interactive HTML file, produced by archify's own workflow, linked from the target doc
2Mermaid (built-in fallback, always present)None — nothing to detectA fenced ```mermaid block embedded directly in the target doc

The last row is the floor: it must never require an install, a network call, or a credential, and every provider above it is optional.

2. Resolve the provider

  1. Try the providers in table order and use the first whose detection passes. For archify, check the four paths above with a plain file-exists test (ls/test -f); the first hit is the install to use.
  2. Confirm the winner actually runs. If archify is present, run its self-check (node <archify dir>/bin/archify.mjs doctor) once. A non-zero exit means "present but broken" — fall through to the next provider and say so in the result.
  3. Never install a provider yourself. Not npx skills add, not a clone, not a package install. Offering archify is the job of the toolkit's setup wizard (it is listed under the docs stack's recommended plugins); this skill only uses what the user has already accepted. If you fell back to Mermaid, mention the install command once in the result so the reader can opt in — and stop there.
  4. The content of the diagram is the same whichever provider wins. Components, edges, and labels come from the source and the machine docs you actually read, never from memory — a provider changes the rendering, not the facts. Where the source does not name a component, leave it out rather than invent it.

3. Provider: archify

Read the detected SKILL.md and follow its workflow end to end — it identifies the diagram type, reads the matching schema and example, authors a JSON spec, validates it (archify.mjs validate), and delivers the HTML (archify.mjs deliver). Do not shortcut its validation step: an unvalidated spec is how a diagram ships with a dangling edge.

  • Where the HTML lands — a docs-adjacent path the repo already uses for assets (docs/diagrams/<slug>.html when nothing else exists). Never drop it at the repo root.
  • How the doc refers to it — a link plus a one-sentence caption of what the diagram shows. The HTML is not readable in a git diff or on a Markdown viewer, so the caption carries the point for anyone who cannot open the file.
  • Unattended runs — in CI, a worktree, or a delegate run, set ARCHIFY_UPDATE_CHECK_DISABLED=1 so archify's update check cannot stall a non-interactive session.

4. Provider: Mermaid (fallback)

Embed a fenced ```mermaid block in the target doc where the diagram belongs. Pick the Mermaid form from the diagram type:

Diagram typeMermaid form
Architecture, data flow, pipelineflowchart LR (or TB when the flow is layered top-down), edges labelled with what moves along them
Workflow, request lifecycleflowchart TD with decision diamonds for branches
API call sequencesequenceDiagram
Lifecycle, state machinestateDiagram-v2

Keep it scannable: stable, meaningful node IDs; a subgraph per boundary (service, package, process); no more than about thirty nodes — past that, split into one overview and one diagram per boundary rather than shrinking the font. Do not lean on renderer-specific styling; the block must read as plain text too.

5. Name the provider in the result

Every result — the reply to the caller and, for agent-granted use, the docs-pass report — carries one line in this exact shape, so a reader knows whether a richer provider was skipped:

  • Diagram provider: archify — followed by the HTML path.
  • Diagram provider: Mermaid (archify not detected — install with \npx skills add tt-a1i/archify -g` to upgrade)`.
  • Diagram provider: Mermaid (archify detected at <path> but its self-check failed).

The doc itself needs no provider annotation; the line belongs to the result, not the artifact.

6. Extending the provider list

A new provider is a new row in §1 — placed by preference, with a detection step that needs nothing more than a file or command -v check — and, if it is external, one recommendedPlugins: entry in the owning stack scoped to this skill. The Mermaid row stays last. Nothing else changes: callers keep asking for diagram.

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.