← Explore all skills

SECURITY REVIEW / Trail of Bits

Crypto Protocol Diagram

Extracts a cryptographic protocol's message flow from source, an RFC, a paper, pseudocode, a ProVerif model or a Tamarin model, writes it as an annotated Mermaid sequence diagram in a Markdown file and prints an ASCII version.

“Extracts protocol message flow from source code, RFCs, academic papers, pseudocode, informal prose, ProVerif (.pv), or Tamarin (.spthy) models and generates Mermaid sequenceDiagrams with cryptographic annotations. Use when diagramming a crypto protocol, visualizing a handshake or key exchange flow, extracting message flow from a spec or RFC, diagramming a ProVerif or Tamarin model, or drawing sequence diagrams for TLS, Noise, Signal, X3DH, Double Ratchet, FROST, DH, or ECDH protocols.”

01 / THE REASONING

Why this made the selection.

  • Produces a Mermaid sequenceDiagram in a Markdown file, plus an ASCII diagram printed inline, from protocol source code or a spec: RFC, paper, pseudocode, prose, ProVerif (.pv) or Tamarin (.spthy).
  • Step S5 flags spec gaps with ⚠️ annotations, including `⚠️ spec omits [step] — canonical protocol requires it`.

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/crypto-protocol-diagram/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

  • Crypto Protocol Diagram's SKILL.md frontmatter declares no allowed-tools; its body states the tools used are Read, Write, Grep, Glob, Bash and WebFetch (for URL specs).
  • When both code and spec exist, it runs the spec workflow first and then annotates code divergences.
  • The Markdown file is named from the protocol, for example noise-xx-handshake.md.

Not established by this review

  • Not executed: it was not installed or run.
  • The Crypto Protocol Diagram 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 Crypto Protocol Diagram skill with the other trailmark skills listed in the trailmark plugin README.
  3. Invoke it with the protocol code or spec to diagram; a spec URL is fetched with WebFetch.

Before you start

  • Protocol source code, or a spec as a file, URL or pasted text

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/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/trailmark/skills/crypto-protocol-diagram/SKILL.md

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

  2. trailmark plugin README ↗Checked

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

    Supports: install.prerequisites, install.steps

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

    Supports: compatibility

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

    Supports: install.steps, license

  5. https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/LICENSE

    Supports: license

Evidence & Ask