sb-diagram

sb-diagram is a skill for Claude Code, Codex from stablebaseline/mcp. It costs 127 tokens per session (2,115 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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 127 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,115 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.00127 $0.02115
Opus 5 $0.00063 $0.01058
Sonnet 5 $0.00025 $0.00423
Haiku 4.5 $0.00013 $0.00212

Measured 6d ago against content hash ca472c0558c9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 6d 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 · 175 lines

How it starts

The opening of the file, as written. The whole thing — 175 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. Use the returned type value verbatim.
  2. getDiagramTypeGuide with that type. 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 276 AntV 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 returns an iconPath such as dev/docker.svg that can be used directly in D2 code. The catalogue is software and cloud only. It deliberately returns nothing for non-technical subjects, so do not force an unrelated tech logo onto a general concept.

Choosing where the diagram goes

Intent Tool Notes
Just show me the picture renderDiagram Needs diagramType and source. Nothing is persisted. Returns a temporary link available for one hour, plus the image inline for png and jpeg
Put it in a document insertDiagramInDocument Needs documentId, type, diagramCode, prompt
Put it on a whiteboard insertWhiteboardDiagram Needs documentId (the board), diagramType, source
Show an existing one getDiagramImage Needs diagramId
Change an existing one updateDiagramInDocument Needs diagramId

Read the full file on GitHub · 175 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. 6d 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 today), licensed MIT. It adds 127 tokens to every session and 2,115 once invoked, about $0.0006 per session on Opus 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

Other skills, from other repositories

webgl-holographic-foil

A self-contained WebGL2 hero: thin-film interference over a crushed-foil surface whose palette shifts with the viewing angle; move the cursor to tilt the film.

nexu-io/open-design · 41 tokens

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens

html-ppt-taste-brutalist

16:9 HTML deck in tactical-telemetry / CRT-terminal taste. Deactivated-CRT charcoal slides, white-phosphor monospace, hazard-red accent, scanline overlay, ASCII syntax, density over decoration. Distilled from Leonxlnx/taste-skill brutalist-skill (Tactical Telemetry mode).

nexu-io/open-design · 78 tokens

accessibility

Consolidated accessibility skill entrypoint for WCAG 2.2, ARIA Authoring Practices, cognitive accessibility, Section 508, EN 301 549, design intent verification, and the Accessibility Planner workflow.

microsoft/hve-core · 47 tokens

make-resume

A Chinese-language tool for creating editable HTML resumes that can be changed in a browser and printed to PDF. It uses available resume templates when they are installed and otherwise provides a simpler fallback.

Hisn00w/ASu-skills · 86 tokens

prototype-web

A clickable, high-fidelity web product prototype with navigation, a hero section, feature cards, steps, social proof, and optional pricing. It is designed to resemble a finished landing page while remaining a prototype.

nexu-io/html-anything · 24 tokens