Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

diagramming-code — Claude Code skill: what it does, how to install

Generates Mermaid diagrams from code graphs using Trailmark. Useful for visualizing call paths, module dependencies, and data flows.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add trailofbits/skills --skill diagramming-code -a claude-code
Open on GitHub

What diagramming-code does

This skill creates Mermaid diagrams directly from Trailmark code graphs instead of asking the model to sketch structures from memory. It supports six diagram types: call graphs, class inheritance trees, module dependency maps, containment views, complexity heatmaps, and entrypoint-to-sink data flow paths.

The system requires trailmark installed via uv tool install trailmark. The skill runs a bundled diagram.py script, or falls back to native trailmark diagram if version 0.4.0 or newer is detected. All results arrive as raw Mermaid markup inside standard markdown fences.

Diagrams trigger a warning whenever the graph exceeds 100 nodes. For non-trivial codebases, centering on specific targets with --focus keeps the resulting graph readable.

What it helps with

  • generate function call graphs with a set traversal depth
  • map module dependencies into left-to-right Mermaid flowcharts
  • highlight high cyclomatic complexity functions with a heatmap
  • trace data flow paths from entrypoints to sensitive functions

Example prompts for the agent

  • Generate a Mermaid call graph for parse_file with depth 2
  • Draw a module dependency diagram for src with left-to-right layout
  • Create a complexity heatmap for the project with threshold 5

How to install diagramming-code

1Skills CLI (Vercel)

npx skills add trailofbits/skills --skill diagramming-code -a claude-code

2Manually: put the files in place

~/.claude/skills/diagramming-code/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/diagramming-code/

From the same set35

The whole set →
semgrep trailofbits Runs a Semgrep static security audit on your codebase. It presents a plan for user confirmation and merges all findings into SARIF. Claude Code CX Codex Cursor +1 9,500installs differential-review trailofbits Reviews code changes for security issues using Git history and test coverage. Use it for commits, diffs, and pull requests that need a written review report. Claude Code CX Codex Cursor +1 8,800installs modern-python trailofbits Configures Python projects with a modern tooling stack: uv for dependency management, ruff for linting and formatting, ty for type checking. Use when starting new projects, writing scripts, or migrating from legacy tools. Claude Code CX Codex Cursor +1 8,700installs secure-workflow-guide trailofbits Guides smart contracts through Trail of Bits' 5-step security audit on check-in or before deployment. It runs static analysis, generates visual charts, and prepares fuzzing tests. Claude Code CX Codex Cursor +1 7,400installs sharp-edges trailofbits Audits API designs and configuration schemas for developer footguns. Flags dangerous defaults and fragile interfaces where the easiest path causes security vulnerabilities. Claude Code CX Codex Cursor +1 6,900installs agentic-actions-auditor trailofbits Inspects GitHub Actions workflows for prompt injection risks and insecure AI agent setups. Catches attacker inputs leaking into prompts via event contexts or environment variables. Claude Code CX Codex Cursor +1 6,700installs gh-cli trailofbits A skill that redirects GitHub requests from curl and fetch to authenticated gh CLI for repositories, pull requests, and issues. Use it for private repos and higher API limits. Claude Code CX Codex Cursor +1 6,600installs variant-analysis trailofbits Finds related occurrences of an already identified defect across a repository. Use it after a vulnerability or logic issue turns up and similar code needs checking. Claude Code CX Codex Cursor +1 6,400installs

Similar

visual-explainer nicobailon Generates self-contained HTML visual explanations with SVG diagrams, architectures, and animated flows. Useful for code reviews, system designs, and technical concepts. Claude Code CX Codex Cursor +1 748installs feishu-doc m1heng Reads, creates, and edits Feishu documents using Markdown, and handles document comments directly from your AI agent. Claude Code CX Codex Cursor +1 1,900installs review-docs tldraw Evaluates and iterates on tldraw SDK documentation against style guides and actual code. Useful for auditing articles and catching inaccurate API references. Claude Code CX Codex Cursor +1 390installs user-story deanpeters Turns product requirements into Mike Cohn user stories paired with Gherkin acceptance criteria. Fits backlog refinement and sprint planning. Claude Code CX Codex Cursor +1 4,100installs code-documentation-code-explain sickn33 A skill that transforms tangled code into clear explanations with diagrams and step-by-step walkthroughs. Use it to understand unfamiliar code fast or prepare learning materials. Claude Code CX Codex Cursor +1 1,000installs ml-paper-writing Orchestra Research Guides ML and AI paper drafting from a research repository, with literature checks and preparation for conference submissions. Claude Code CX Codex Cursor +1 2,300installs grill-with-docs Matt Pocock This skill interviews you about a plan or design and creates ADRs and a glossary along the way. Use it when decisions need sharper definition. Claude Code 1,219,756installs skill-creator official anthropics Creates and refines skills, then tests them with prompts, evaluations, and performance checks. Claude Code Claude.ai 414,180installs

Questions about diagramming-code

How to install diagramming-code in Claude Code?

Run npx skills add trailofbits/skills --skill diagramming-code -a claude-code. The tool adds the skill directly to your environment.

What does diagramming-code do?

It turns Trailmark code graphs into Mermaid diagrams. It creates architecture maps, call flows, inheritance hierarchies, and data paths directly from parsed code.

What dependencies does this skill require?

You must have Trailmark available locally. You can install it using uv tool install trailmark.

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor