diagramming-code

Solid

Generates Mermaid diagrams from Trailmark code graphs. Produces call graphs, class hierarchies, module dependency maps, containment diagrams, complexity heatmaps, and attack surface data flow visualizations. Use when visualizing code architecture, drawing call graphs, generating class diagrams, creating dependency maps, producing complexity heatmaps, or visualizing data flow and attack surface paths as Mermaid diagrams.

Data & Documents 8,273 stars 715 forks Updated 6 days ago CC-BY-SA-4.0

Install

View on GitHub

Quality Score: 90/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Diagramming Code Generates Mermaid diagrams from Trailmark's code graph. A pre-made script handles Mermaid syntax generation; Claude selects the diagram type and parameters. ## When to Use - Visualizing call paths between functions - Drawing class inheritance hierarchies - Mapping module import dependencies - Showing class structure with members - Highlighting complexity hotspots with color coding - Tracing data flow from entrypoints to sensitive functions ## When NOT to Use - Querying the graph without visualization (use the `trailmark` skill) - Mutation testing triage (use the `genotoxic` skill) - Architecture diagrams not derived from code (draw by hand) ## Prerequisites **trailmark** must be installed. If `uv run trailmark` fails, run: ```bash uv pip install trailmark ``` **DO NOT** fall back to hand-writing Mermaid from source code reading. The script uses Trailmark's parsed graph for accuracy. If installation fails, report the error to the user. --- ## Quick Start ```bash uv run {baseDir}/scripts/diagram.py \ --target {targetDir} --type call-graph \ --focus main --depth 2 ``` Output is raw Mermaid text. Wrap in a fenced code block: ````markdown ```mermaid flowchart TB ... ``` ```` --- ## Diagram Types ``` ├─ "Who calls what?" → --type call-graph ├─ "Class inheritance?" → --type class-hierarchy ├─ "Module dependencies?" → --type module-deps ├─ "Class members and structure?" → --type containment ├─ "Wher...

Details

Author
trailofbits
Repository
trailofbits/skills
Created
10 months ago
Last Updated
6 days ago
Language
Python
License
CC-BY-SA-4.0

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

mermaid-diagram

Generate a Mermaid diagram from a description, codebase, or schema. Output a Mermaid code block for supported Markdown renderers. Use for flowcharts, ERDs, sequence diagrams, C4 context, class diagrams, gantt, pie charts, mindmaps, git graphs, and quadrant charts. Triggers: 'buat diagram', 'create diagram', 'flowchart', 'ERD', 'sequence diagram', 'mermaid', 'diagram alur', 'flow diagram', 'visualisasi', 'visualization', 'database diagram', 'class diagram', 'pie chart', 'mindmap', 'git graph', 'quadrant chart', 'C4'.

0 Updated today
ongkipro
AI & Automation Listed

mermaid-diagrams

Create diagrams and visualizations using Mermaid syntax. Use when generating flowcharts, sequence diagrams, class diagrams, entity-relationship diagrams, Gantt charts, or any visual documentation. Triggers on Mermaid, flowchart, sequence diagram, class diagram, ER diagram, Gantt chart, diagram, visualization.

3 Updated 1 months ago
Makiya1202
Code & Development Listed

diagram-authoring

Use whenever a diagram goes into a plugin-produced markdown artifact — a /board plan or epic/issue body, a handoff, a status update, KNOWLEDGE.md, the README, or a blog entry. Emit diagram-as-code (Mermaid by default), NEVER hand-drawn ASCII art. Covers flowcharts, architecture, sequence, state, ER and gantt diagrams; escalate to D2/Graphviz (rendered via Kroki) only when a graph is too dense for Mermaid. Triggers — "draw a diagram", "add a flowchart/architecture/sequence/state diagram", "diagrama", "haz un diagrama", "visualiza este flujo", "add a diagram to the plan/issue/handoff/README".

3 Updated today
CSalcedoDataBI