sb-diagram

sb-diagram is a skill for Claude Code, Codex from stablebaseline/mcp. It costs 125 tokens per session (2,277 once invoked), scanned A, original, MIT.

A tool for turning descriptions into editable diagrams such as flowcharts, sequence diagrams, database relationship diagrams, state machines, and architecture diagrams.

In plain words
What is it for?
Use it to create or edit technical diagrams and save them in a document or whiteboard.
Why use it?
It keeps the diagram’s source alongside its image, so you can correct or update it later without drawing it again.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create or edit technical diagrams and save them in a document or whiteboard.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/stablebaseline/mcp/sb-diagram
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add stablebaseline/mcp --skill sb-diagram
Clone the repo
git clone --depth 1 https://github.com/stablebaseline/mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sb-diagram

README.md
[![agentmods](https://agentmods.dev/badge/skills/stablebaseline/mcp/sb-diagram/github.svg)](https://agentmods.dev/skills/stablebaseline/mcp/sb-diagram)
Your own site
<a href="https://agentmods.dev/skills/stablebaseline/mcp/sb-diagram"><img src="https://agentmods.dev/badge/skills/stablebaseline/mcp/sb-diagram/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sb-diagram

Your own site · 80×15
<a href="https://agentmods.dev/skills/stablebaseline/mcp/sb-diagram"><img src="https://agentmods.dev/badge/skills/stablebaseline/mcp/sb-diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,277 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00125 $0.02277
Opus 5.5 $0.00050 $0.00911
Sonnet 5.5 $0.00025 $0.00455
Haiku 4.5 $0.00013 $0.00228

Measured 20d ago against content hash d48c55f63cd5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sb-diagram scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 20d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

microsoft/cowork-plugin/skills/sb-diagram/SKILL.md · 183 lines

How it starts

The opening of the file, as written. The whole thing — 183 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Stable Baseline: diagrams

What this skill does

Turns a description into real diagram code, renders it, and either hands back the image or persists it inside a document or a whiteboard. Diagrams stay editable: the source DSL is kept alongside the render, so a diagram can be corrected later rather than redrawn.

Every call runs under the signed in user's own Stable Baseline identity.

IDs are never hardcoded. Resolve projectId, documentId and diagramId at runtime from listing calls made in this conversation.

Never guess DSL syntax

This is the single biggest cause of failed diagrams. Two calls, in this order, before you write any diagram code:

  1. listDiagramTypes. Pass query and it searches by name and by intent, semantically, so "wiring harness", "timing waveform", "network topology" or "database schema" all resolve to a real type. Each type lists the diagram families it draws, each with its default renderer: use a family's default renderer as the type unless the user asked for a particular language. default is the platform default renderer, for architecture, process, org chart and other box-and-line diagrams. Use the returned type value verbatim.
  2. getDiagramTypeGuide with that type (or a family's name). It returns the DSL writing instructions and an example for exactly that renderer.

Skipping step 2 because a type looks familiar is how a Mermaid dialect mismatch turns into a render error the user sees.

For an infographic, call searchInfographicTemplates first with a description of the intent, for example "compare two options", "process timeline", "pyramid of priorities". It ranks the 276 infographic templates and returns a key that becomes line 1 of the DSL as infographic <key>, plus a usage note explaining how that family maps to data fields.

For software and cloud architecture, listArchitectureIcons searches an icon library of the cloud vendors, development tools, Kubernetes, networking and general technical subjects. Use the field its answer's usage names: iconKey as the icon in a platform default diagram (default), and d2IconPath in D2 code. A result without an iconKey cannot go in a platform default diagram. When nothing fits, use labelled shapes: do not force an unrelated tech logo onto a general concept.

Read the full file on GitHub · 183 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 20d ago Changed · +2 lines d48c55f63cd5
  2. 1mo ago Changed · +6 lines · -2 tokens per session c8627b2b2cfb
  3. 2mo ago First seen · 175 lines · 127 tokens per session scan A ca472c0558c9

Subscribe to this mod's changes

sb-diagram is a skill published in the GitHub repository stablebaseline/mcp (0 stars, last pushed 3d ago), licensed MIT. It adds 125 tokens to every session and 2,277 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

sb-diagram compared with skills from other repositories

sb-diagram next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sb-diagramstablebaseline/mcpSkill03d agoMITA125Claude Code, Codex
webgl-holographic-foilnexu-io/open-designSkill110ktodayApache-2.0A41Claude Code, Codex
html-ppt-hermes-cyber-terminalnexu-io/open-designSkill110ktodayApache-2.0A53Claude Code, Codex
html-ppt-taste-brutalistnexu-io/open-designSkill110ktodayApache-2.0A78Claude Code, Codex
visual-ralphYeachan-Heo/oh-my-codexSkill34ktodayMITA52Codex
glance-canonical-layoutsandroid/skillsSkill11k4d agoApache-2.0A56Claude Code
accessibilitymicrosoft/hve-coreSkill1.6kyesterdayMITA47Claude Code