diagramming-code

Generates Mermaid diagrams from Trailmark code graphs for architecture visualization.

Updated May 17, 2026
One-click install
npx skills add https://github.com/irrit-us/agent_misc --skill diagramming-code-irrit-us
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: diagramming-code
Source: https://github.com/irrit-us/agent_misc/tree/main/skills/trailmark-diagramming-code
Command: npx skills add https://github.com/irrit-us/agent_misc --skill diagramming-code-irrit-us

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires trailmark, and includes scripts (resource) and references (resource) components.

What problem does it solve? Manually drawing call graphs, class hierarchies, and dependency maps from source code is slow and error-prone. This Skill generates accurate Mermaid diagrams directly from Trailmark's parsed code graph, so visualizations reflect the actual code structure rather than guesswork. ## Core Features & Use Cases - Six Diagram Types: Call graphs, class hierarchies, module dependency maps, containment diagrams, complexity heatmaps, and attack surface data flow visualizations. - Graph-Accurate Output: Diagrams are built from Trailmark's parsed code graph with edge confidence styling (solid, dashed, dotted arrows) instead of hand-written approximations. - Use Case: When reviewing an unfamiliar codebase, generate a call graph centered on an entrypoint function with depth 2 to quickly understand which functions call which, or produce a complexity heatmap to locate hotspots before refactoring. ## Quick Start Ask the AI to generate a call graph diagram of your project directory centered on a specific function using the diagramming-code skill.

Frequently Asked Questions about diagramming-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a call graph diagram from source code?▼

Run the diagram.py script with --type call-graph, a --target directory, and a --focus function to center the graph. The script queries Trailmark's parsed code graph and outputs Mermaid flowchart syntax with arrow styles reflecting call confidence.

What diagram types can I create from a code graph?▼

Six types are supported: call-graph, class-hierarchy, module-deps, containment, complexity heatmap, and data-flow. Each maps to a Mermaid flowchart or classDiagram with appropriate styling such as color-coded complexity levels.

Does the diagram generator support languages other than Python?▼

Yes, pass --language auto for polyglot repositories or specify languages like rust or a comma-separated list. Note that languages without class inheritance, such as Go or C, produce empty class hierarchy diagrams with an explanatory note node.

Why is my Mermaid diagram empty or malformed?▼

Empty output usually means no edges of the requested type exist, such as no inheritance edges in a Go codebase. Malformed output can result from reserved Mermaid words or unescaped labels; consult the mermaid-syntax reference for sanitization rules.

What are the limitations of Mermaid code diagrams?▼

Mermaid renderers struggle with more than 100 nodes, so the script warns when this limit is exceeded and suggests using --focus to scope the diagram. Large codebases should always use a focus node with limited depth.