w-diagram — Claude Code skill: diagrams and setup
The w-diagram Claude Code skill turns code, architecture, or data flows into Mermaid diagrams. For product and architecture requests, it compares named MDX or DESIGN.md files with the code.
MIT 647 installs ★ 1 updated 2026-10-02
npx skills add blockmatic-icebox/basilic-skills --skill w-diagram -a claude-codeWhat w-diagram does
w-diagram inspects the code or documentation named in a request, then chooses a Mermaid diagram that fits the question, such as a flowchart, sequence, or class diagram. Labels stay brief, and oversized graphs are split. It adds a short explanation of the diagram.
For product, journey, or architecture documentation, the skill reads the named MDX files or DESIGN.md and produces no more than two diagrams. It flags conflicts between documentation and code. Every node and edge must come from inspected sources; the skill does not fill in missing architecture. The result goes to chat unless the request includes a file path.
What it helps with
- map a data flow through code
- show the steps in a user journey
- visualize relationships between classes
- spot conflicts between docs and code
Example prompts for the agent
- Draw a data-flow diagram for
src/api.ts. - Show the sequence of actions in the journey described in
journey.mdx. - Compare the architecture in
DESIGN.mdwith the code and diagram it.
How to install w-diagram
1Skills CLI (Vercel)
npx skills add blockmatic-icebox/basilic-skills --skill w-diagram -a claude-code2Manually: put the files in place
~/.claude/skills/w-diagram/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/w-diagram/
1Skills CLI (Vercel)
npx skills add blockmatic-icebox/basilic-skills --skill w-diagram -a codex2Manually: put the files in place
.agents/skills/w-diagram/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add blockmatic-icebox/basilic-skills --skill w-diagram -a cursor2Manually: put the files in place
.cursor/skills/w-diagram/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install blockmatic-icebox/basilic-skills skills/workflow/w-diagram2Manually: put the files in place
.github/skills/w-diagram/SKILL.md1Skills CLI (Vercel)
npx skills add blockmatic-icebox/basilic-skills --skill w-diagram -a gemini-cli2Platform CLI
gemini skills install https://github.com/blockmatic-icebox/basilic-skills --path skills/workflow/w-diagramManually: put the files in place
.devin/skills/w-diagram/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add blockmatic-icebox/basilic-skills --skill w-diagram -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about w-diagram
How do I install w-diagram in Claude Code?
Run npx skills add blockmatic-icebox/basilic-skills --skill w-diagram -a claude-code. The skill file is at ~/.claude/skills/w-diagram/SKILL.md.
What does w-diagram do?
It examines the specified code or documentation and creates a Mermaid diagram suited to the request. The output goes to chat unless a file path is supplied.
How many diagrams can w-diagram make from architecture documentation?
For product, journey, or architecture requests, it reads the named MDX files or DESIGN.md and produces at most two diagrams.
Source text
SKILL.md · MIT
--- name: w-diagram description: Produce a Mermaid diagram of the requested code, architecture, or data flow. disable-model-invocation: true --- Visualize relationships, flow, or structure. Chat output unless the user gave a file path. Do not invent architecture that is not in the sources. Do not invent `PRODUCT.md`. 1. If the request is product, journey, or architecture docs, read named MDX/`DESIGN.md` and emit at most two Mermaid diagrams from those sources. Flag contradictions between docs and code without proposing a new methodology. 2. Otherwise inspect the named code or docs. Choose flowchart, sequence, class, er, state, or journey only when it matches the question. 3. Keep labels short. Split oversized graphs. Wrap output in a mermaid fence. 4. Explain what the diagram shows in a few sentences. Nodes and edges must map to inspected sources.
© blockmatic-icebox · MIT · blockmatic-icebox/basilic-skills