← Explore all skills

SECURITY REVIEW / Trail of Bits

Diagramming Code

Turns a Trailmark code graph into Mermaid diagrams: call graphs, class hierarchies, module-dependency maps, containment diagrams, complexity heatmaps and attack-surface data-flow views.

“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.”

01 / THE REASONING

Why this made the selection.

  • Emits call graphs, class hierarchies, module-dependency maps, containment diagrams, complexity heatmaps and data-flow views as Mermaid from a Trailmark graph.
  • Probes for the native `trailmark diagram` command with --help and otherwise runs the bundled scripts/diagram.py.

02 / THE REVIEW RECORD

What we actually inspected.

Source review has boundaries.
A clear record is more useful than a “safe” badge.

Material inspected

  • plugins/trailmark/skills/diagramming-code/SKILL.md
  • plugins/trailmark/README.md (prerequisites and version notes)
  • plugins/trailmark/agents/code-slice-worker.md (host note)
  • README.md (installation and licence sections)
  • LICENSE

Our findings

  • Diagramming Code's SKILL.md frontmatter declares no allowed-tools.
  • If `uv run trailmark` fails, its Prerequisites tell the agent to run `uv tool install trailmark`.
  • Step 1 says not to run engine.preanalysis() for a diagram, because the diagram command builds its own graph.
  • Output is raw Mermaid text, wrapped in a fenced block in the reply.

Not established by this review

  • Not executed: it was not installed or run.
  • The Diagramming Code skill and any bundled scripts were not run.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

Add a skill to your workflow.

Upstream setup instructions ↗
  1. `/plugin marketplace add trailofbits/skills` (repository README) adds the whole Trail of Bits marketplace, not one skill.
  2. Install the `trailmark` plugin from `/plugin menu`; it bundles the Diagramming Code skill with the other trailmark skills listed in the trailmark plugin README.
  3. `uv tool install trailmark` (trailmark plugin README) installs the Trailmark CLI that this skill drives.

Before you start

  • The Trailmark CLI, installed with `uv tool install trailmark` (trailmark plugin README)
  • uv

04 / FOLLOW THE EVIDENCE

The source trail.

Our notes are separate from the original resource.
Check upstream before adopting a new version.

  1. https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/plugins/trailmark/skills/diagramming-code/SKILL.md

    Supports: upstreamDescription, summary, whySelected, bestFor, limitations, access, review.findings

  2. trailmark plugin README ↗Checked

    https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/plugins/trailmark/README.md

    Supports: install.prerequisites, install.steps

  3. https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/plugins/trailmark/agents/code-slice-worker.md

    Supports: compatibility

  4. https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/README.md

    Supports: install.steps, license

  5. https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/LICENSE

    Supports: license

Evidence & Ask