Show Mermaid diagrams in Mission Control's diagram viewer instead of dumping raw syntax in the terminal.

MITAuto-check passedDevelopment

Install Diagram

skills CLI
$ npx skills add AgentSystemLabs/mission-control --skill diagram -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install AgentSystemLabs/mission-control diagram --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/AgentSystemLabs/mission-control.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/diagram .claude/skills/diagram && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
diagram
GitHub stars
159
Used in
1 other repo
Token cost
~1.5k tokens
SKILL.md length
500 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Show Mermaid diagrams in Mission Control's diagram viewer instead of dumping raw syntax in the terminal.

  • Works in 5 steps: Do not override Mermaid theme in source.… → Use plain Mermaid syntax. Let Mission… → Read $MC_THEME. When it is dark, avoid… → …
  • The user asks for a diagram
  • SKILL.md covers When to use, API contract, Theme rules (critical) and Rules, plus 2 more sections
  • Calls curl and jq; needs MC_API_TOKEN

What it does

Diagram is an agent skill from AgentSystemLabs/mission-control. Show Mermaid diagrams in Mission Control's diagram viewer instead of dumping raw syntax in the terminal. Use when the user asks for a diagram, flowchart, sequence diagram, architecture sketch, state machine, ER diagram, or any visual that Mermaid can render — and whenever a diagram would clarify a complex flow. Requires a Mission Control agent session (MCAPIURL and MCAPITOKEN are injected automatically). Not for ASCII art in chat, image generation, or projects running outside Mission Control.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Diagrams. It works with Mermaid. The licence is MIT.

When your agent uses it

  • The user asks for a diagram
  • Sequence diagram
  • Architecture sketch
  • Any visual that Mermaid can render — and whenever a diagram would clarify a complex flow

Example prompts

  • “/diagram”

Requirements

  • A credential in MC_API_TOKEN

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Do not override Mermaid theme in source. Never use %%{init: {'theme':'dark'}}%%, %%{init: {'theme':'base', 'themeVariables': ...}}%%, YAML…
  2. Use plain Mermaid syntax. Let Mission Control's viewer apply accent, surface, text, and border tokens from the active UI theme.
  3. Read $MC_THEME. When it is dark, avoid near-black node/participant fills. When it is light, avoid near-white fills on white backgrounds.
  4. Sequence diagrams: use default participant boxes — do not set actor background colors inline. Example
  5. Flowcharts: prefer unstyled nodes (A[Step], B{Decision?}) over A["Step"]:::darkClass.

What it can do on your machine

Read from SKILL.md and the folder at commit 92b91d0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • MC_API_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Diagram loads about 1.5k tokens when it runs. Until then it costs about 127 tokens; SKILL.md has 500 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~127
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from AgentSystemLabs/mission-control at commit 92b91d0, republished under its MIT licence (© AgentSystemLabs). 500 words, ~1,461 tokens.

Download SKILL.mdSave it as .claude/skills/diagram/SKILL.md (or your agent's skills folder).
name
diagram
description
Show Mermaid diagrams in Mission Control's diagram viewer instead of dumping raw syntax in the terminal. Use when the user asks for a diagram, flowchart, sequence diagram, architecture sketch, state machine, ER diagram, or any visual that Mermaid can render — and whenever a diagram would clarify a complex flow. Requires a Mission Control agent session (MC_API_URL and MC_API_TOKEN are injected automatically). Not for ASCII art in chat, image generation, or projects running outside Mission Control.
user-invocable
true

Mission Control agent sessions receive env vars automatically:

  • MC_API_URL — loopback API base (e.g. http://127.0.0.1:54321)
  • MC_API_TOKEN — bearer token for that API
  • MC_TASK_ID — the active task/session id
  • MC_THEME — Mission Control UI theme: dark or light

Do not print Mermaid to the user and stop. POST it to Mission Control so the app opens an interactive viewer modal. The viewer applies Mission Control theme colors automatically — your job is to avoid fighting that styling.

When to use

  • User asks for a diagram, flowchart, sequence diagram, architecture map, or state chart
  • You are explaining a multi-step system and a diagram would land faster than prose
  • You already drafted Mermaid and would otherwise paste it in the terminal

Skip when Mission Control env vars are missing (plain shell outside MC) — fall back to inline Mermaid in markdown.

API contract

http
POST $MC_API_URL/api/diagram?taskId=$MC_TASK_ID
Authorization: Bearer $MC_API_TOKEN
Content-Type: application/json

{
  "source": "<mermaid source>",
  "title": "Optional title shown in the modal",
  "format": "mermaid",
  "theme": "dark"
}

theme is optional metadata — pass "$MC_THEME" when set so Mission Control knows which UI theme was active. The viewer still re-renders using the live app theme; you do not need to bake colors into source for MC.

Success (200): { "ok": true, "id": "<uuid>" } — Mission Control opens the viewer automatically.

Common errors:

  • 400 — missing/invalid body, empty source, or taskId query param missing
  • 401 — bad or missing bearer token
  • 404 — unknown taskId

Theme rules (critical)

Mission Control runs in dark mode by default. Diagrams fail when agents embed colors that disappear on dark backgrounds (dark gray boxes, faint borders, #111 fills).

  1. Do not override Mermaid theme in source. Never use %%{init: {'theme':'dark'}}%%, %%{init: {'theme':'base', 'themeVariables': ...}}%%, YAML frontmatter theme blocks, or classDef / style with hardcoded hex/rgb fills.
  2. Use plain Mermaid syntax. Let Mission Control's viewer apply accent, surface, text, and border tokens from the active UI theme.
  3. Read $MC_THEME. When it is dark, avoid near-black node/participant fills. When it is light, avoid near-white fills on white backgrounds.
  4. Sequence diagrams: use default participant boxes — do not set actor background colors inline. Example:
mermaid
sequenceDiagram
  participant U as User
  participant MC as Mission Control
  U->>MC: POST /api/diagram
  MC-->>U: Open themed viewer
  1. Flowcharts: prefer unstyled nodes (A[Step], B{Decision?}) over A["Step"]:::darkClass.
Show full SKILL.md (175 more words)Show less

Rules

  1. Always send valid Mermaid in source. No markdown fences — raw diagram text only.
  2. Keep diagrams focused. Prefer one concern per diagram; split large maps into multiple POSTs with distinct titles.
  3. Set a short title when the diagram has a clear name (e.g. "Auth flow", "Worktree lifecycle").
  4. Pass "theme": "$MC_THEME" in the JSON body when $MC_THEME is set.
  5. Tell the user briefly that the diagram opened in Mission Control — don't repeat the full source unless they ask.
  6. On HTTP failure, show the error and paste the Mermaid source as a fallback.
  7. Verify env vars before POSTing. If MC_API_URL, MC_API_TOKEN, or MC_TASK_ID is empty, tell the user the session is not running inside Mission Control.

Examples

Minimal POST (preferred — no jq required)
bash
curl -sS -X POST "$MC_API_URL/api/diagram?taskId=$MC_TASK_ID" \
  -H "Authorization: Bearer $MC_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d @- <<EOF
{
  "source": "flowchart LR\n  A[Draft Mermaid] --> B[POST /api/diagram]\n  B --> C[Modal opens]",
  "title": "Diagram pipeline",
  "format": "mermaid",
  "theme": "${MC_THEME:-dark}"
}
EOF
Sequence diagram
bash
curl -sS -X POST "$MC_API_URL/api/diagram?taskId=$MC_TASK_ID" \
  -H "Authorization: Bearer $MC_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d "$(jq -n \
    --arg source 'sequenceDiagram
  participant U as User
  participant MC as Mission Control
  participant A as Agent CLI
  U->>MC: Start session
  MC->>A: Spawn PTY + env
  A->>MC: POST /api/diagram
  MC-->>U: Open diagram modal' \
    --arg title 'Session diagram flow' \
    --arg theme "${MC_THEME:-dark}" \
    '{source:$source,title:$title,format:"mermaid",theme:$theme}')"
Flowchart (minimal)
bash
curl -sS -X POST "$MC_API_URL/api/diagram?taskId=$MC_TASK_ID" \
  -H "Authorization: Bearer $MC_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d "$(jq -n \
    --arg source 'flowchart LR
  A[Draft Mermaid] --> B[POST /api/diagram]
  B --> C[Modal opens]' \
    --arg title 'Diagram pipeline' \
    --arg theme "${MC_THEME:-dark}" \
    '{source:$source,title:$title,format:"mermaid",theme:$theme}')"

Mermaid tips

  • Prefer flowchart TD/LR, sequenceDiagram, stateDiagram-v2, and erDiagram — they render reliably.
  • Quote node labels with special characters: A["Step (retry)"]
  • Avoid click directives and HTML labels — the viewer runs in strict mode.
  • Avoid inline colors — Mission Control themes diagrams to match the app.

© AgentSystemLabs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/diagram of AgentSystemLabs/mission-control.

Open the folder on GitHubat commit 92b91d0

Used in 2 other repositories

We found 6 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in AgentSystemLabs/mission-control, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Diagram next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Diagram compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Diagram this skillAgentSystemLabs/mission-control1591 repos~1.5kAutomated safety check: PassMIT
Archify Diagramstt-a1i/archify81k—~2.9kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design47k1 repos~7.5kAutomated safety check: PassMIT
Draw.io Diagram StudioAgents365-ai/drawio-skill10k—~2.4kAutomated safety check: NotesMIT
Pretty Mermaid Rendererimxv/Pretty-mermaid-skills1.5k—~2kAutomated safety check: PassMIT
Archify Diagram BuilderUnclecheng-li/AI_Animation1.5k2 repos~4.1kAutomated safety check: PassMIT

Similar skills

  • Archify Diagrams

    tt-a1i/archify

    Creates interactive architecture, workflow, sequence, data-flow and lifecycle diagrams as standalone HTML with inline SVG, themes and image or video export.

    81k GitHub stars~2.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    47k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 6 days ago
    DevelopmentAuto-check: notes
  • Pretty Mermaid Renderer

    imxv/Pretty-mermaid-skills

    Writes and renders Mermaid diagrams as themed SVG, PNG or terminal ASCII and Unicode art with a bundled Node.js CLI that needs no browser.

    1.5k GitHub stars~2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Archify Diagram Builder

    Unclecheng-li/AI_Animation

    Builds validated architecture, workflow, sequence, data-flow and lifecycle diagrams as standalone interactive HTML from a small JSON spec, with optional motion and image export.

    1.5k GitHub starsUsed in 2 repos~4.1k tokens
    DevelopmentAuto-check passed
  • Mermaid

    WH-2099/mermaid-skill

    Generate Mermaid diagrams from user requirements. An agent skill from WH-2099/mermaid-skill.

    288 GitHub starsUsed in 4 repos~958 tokens
    DevelopmentAuto-check passed

More from AgentSystemLabs/mission-control

  • Release

    AgentSystemLabs/mission-control

    Cut a Mission Control desktop release — bump package.json (must match the git tag), commit, create an annotated v-tag, push to trigger release.yml CI.

    159 GitHub stars~1.3k tokensUpdated 16 days ago
    Auto-check passed
  • Recall

    AgentSystemLabs/mission-control

    Save durable project knowledge to Mission Control's Recall (project memory) so future sessions start already knowing it, AND navigate this project's indexed code graph.

    159 GitHub stars~1.5k tokensUpdated 16 days ago
    Auto-check passed

Works with

Categories

Questions about Diagram

What does Diagram do?

Show Mermaid diagrams in Mission Control's diagram viewer instead of dumping raw syntax in the terminal. Diagram is an agent skill from AgentSystemLabs/mission-control. Show Mermaid diagrams in Mission Control's diagram viewer instead of dumping raw syntax in the terminal.

When should I use Diagram?

Diagram fits situations like: the user asks for a diagram; sequence diagram; architecture sketch; any visual that Mermaid can render — and whenever a diagram would clarify a complex flow.

How do I install Diagram in Claude Code?

Run `npx skills add AgentSystemLabs/mission-control --skill diagram -a claude-code`. Or copy the skill folder (.agents/skills/diagram in AgentSystemLabs/mission-control) into .claude/skills/diagram in your project. Claude Code loads it when a task matches its description.

How do I install Diagram in Codex?

Run `npx skills add AgentSystemLabs/mission-control --skill diagram -a codex`. Or copy the skill folder (.agents/skills/diagram in AgentSystemLabs/mission-control) into .agents/skills/diagram in your project. Codex loads it when a task matches its description.

Can I use Diagram in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add AgentSystemLabs/mission-control --skill diagram -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/diagram, .gemini/skills/diagram, .github/skills/diagram and .opencode/skills/diagram in your project.

What does Diagram need to run?

Going by SKILL.md and its folder, Diagram needs the command-line tools its instructions call (curl and jq) and credentials named MC_API_TOKEN. Our summary lists: A credential in MC_API_TOKEN.

Does Diagram access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Diagram safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Diagram use?

Diagram is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Diagram use?

About 1.5k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Diagram?

Skills that share tags, products or a category with Diagram: Archify Diagrams (tt-a1i/archify, 81k stars), Diagram Design (cathrynlavery/diagram-design, 47k stars), Draw.io Diagram Studio (Agents365-ai/drawio-skill, 10k stars) and Pretty Mermaid Renderer (imxv/Pretty-mermaid-skills, 1.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Diagram?

AgentSystemLabs (a GitHub organization) maintains it in AgentSystemLabs/mission-control, which has 159 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on September 22, 2026.

Source: AgentSystemLabs/mission-control on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.