/sc-docs:sc-mermaid <system, flow, or data to draw>from sc-docs
Selects the appropriate diagram type (flowchart, sequence, state, ER, etc.) based on user intent, then writes and validates Mermaid diagrams grounded in the codebase.
Ships in sc-docs. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The table below covers twelve common kinds of mermaid diagram. The default pull is toward
flowchart for everything, and most requests that arrive as "diagram this" are better served by something
else. Pick the type first.
| What the user has | Draw |
|---|---|
| Services, components, and how they connect | flowchart |
| Who calls whom, in order, over time | sequenceDiagram |
| One thing moving between statuses | stateDiagram-v2 |
| Tables and their relationships | erDiagram |
| Types, fields, and inheritance | classDiagram |
| Steps a person goes through, with how each one feels | journey |
| Dated events, with no durations or dependencies | timeline |
| Options scored on two axes | quadrantChart |
| Branches and merges | gitGraph |
| Amounts splitting and flowing between stages | sankey-beta |
| Loose ideas hanging off one topic | mindmap |
| System context for a non-technical reader | C4Context |
Mermaid has more types than the table lists. Use gantt for a schedule with durations or
dependencies, and pie for shares of a whole. For anything else, check the type list in the
Mermaid documentation (https://mermaid.js.org/intro/) rather than forcing the request into a
table row.
State the type you chose and the reason, in one line, before drawing. When two types fit,
name both and say why you picked one. When the request is too vague to choose, ask rather
than defaulting to flowchart.
Signals worth acting on: the words "status", "state", or "lifecycle" point at
stateDiagram-v2 rather than a flowchart with status boxes. A schema question points at
erDiagram. "What happens when a user does X" points at sequenceDiagram. A comparison
of options points at quadrantChart.
Read the relevant files before drawing anything. A diagram that does not match the codebase is worse than no diagram, because it carries authority it has not earned.
Name things in domain terms. "Payment reconciliation worker" tells the reader more than "Service B". Label every arrow with what crosses it.
Write the diagram to {descriptive-name}.mmd in the current directory, or ask where it
should go, then validate it:
mmdc -i <file>.mmd -o <file>.svg -q
It prints nothing and exits 0 on success. On invalid syntax it exits 1 and prints a
Parse error with a line number, so check the exit code: a nonzero exit or a Parse error
on stderr means the diagram is invalid. Fix the error and re-run. Never hand over a diagram
that has not passed this check.
mmdc needs a real output path ending in .svg, .png, .pdf, or .md, so /dev/null
does not work. The .svg it writes is the preview; mention it, and delete it if the user
wanted only the source. To validate without leaving a preview, render to a temporary SVG
instead (-o "$(mktemp -d)/check.svg"); the exit code means the same thing.
If mmdc is missing, tell the user to run npm install -g @mermaid-js/mermaid-cli and
stop. Do not skip validation.
Give the user four things:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub kylesnowschwartz/simpleclaude --plugin sc-docs3 skills in this plugin
/cold-readerA document is done when a reader with no project context can understand it; this skill runs that check as a Vale lint plus a context-free reviewer pass and a scorecard. This skill SHOULD be used when reviewing, finalizing, or being asked to critique a persisted project document: a spec, blueprint, RFC, ADR, design or discovery document, research or solution document, proposal, planning doc, runbook, README, or Jira ticket. It SHOULD also be used when the user asks whether a document makes sense to someone new, or asks for a jargon or clarity check. Do NOT invoke while a draft is still being written; the human-writing skill invokes this skill once a persisted project document draft is complete. Do NOT use on Slack messages, emails, code review comments, commit messages, pull request descriptions, or any text that is not a persisted document./human-writingMUST be used for any request to draft, write, compose, or reword text another person will read, including 'draft a message', 'draft a reply', 'draft a Slack message', 'write an email', 'draft a PR description', 'write a GitHub issue', 'write a Jira ticket', 'draft a card', 'draft an announcement', 'write release notes', 'draft an RFC', 'write a README'. Covers Slack, email, PR bodies, GitHub issues, Jira tickets, code review comments, bug reports, agendas, Reddit posts, and persisted project documents (READMEs, specs, RFCs, ADRs, design and planning docs, runbooks); for documents, use this skill for the drafting even when a documentation-writing skill also applies. Applies plain, literal writing with per-format conventions, then routes persisted project documents to the cold-reader review. Not for review-only requests on an existing document; use cold-reader alone for those.Other plugins' skills for the same job