---
title: "Crypto Protocol Diagram: review, setup & limitations · Undominated.ai"
canonical: https://undominated.ai/skills/trailofbits-trailmark-crypto-protocol-diagram/
description: "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."
---

# Crypto Protocol Diagram: review, setup & limitations · Undominated.ai

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

[← Explore all skills](/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.

 [See setup guidance ↓](#setup)[Original source ↗](https://github.com/trailofbits/skills/tree/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/trailmark/skills/crypto-protocol-diagram)

SOURCE REVIEW

 Reviewed 2026-10-22
 Evidence 5 linked sources
 Publisher Trail of Bits
 Licence [CC-BY-SA-4.0 ↗](https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/LICENSE)
 Revision 8e54050ae63c
 [Read what was—and wasn’t—checked ↓](#review)

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

 [Trail of Bits · upstream description ↗](https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/trailmark/skills/crypto-protocol-diagram/SKILL.md) Our analysis follows below.

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`.

### A good fit for

 - Diagram a TLS, Noise, Signal, X3DH or FROST handshake as a sequence diagram
- Extract message flow from an RFC or academic paper into Mermaid
- Turn a ProVerif .pv or Tamarin .spthy model into a readable sequence diagram

### Weigh up before choosing

 - It diagrams protocol flow; for formal verification its SKILL.md points to mermaid-to-proverif.
- Inputs without protocol semantics (no parties, no message exchange) are out of scope.
- A spec given as a URL is fetched with WebFetch.
- Installs with the whole `trailmark` plugin, not as a standalone Crypto Protocol Diagram skill; this SKILL.md does not call the Trailmark CLI that the plugin README lists.
- Last commit touching plugins/trailmark/skills/crypto-protocol-diagram at the pinned revision: 2026-09-16.
- Not executed: it was not installed or run.

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 ↗](https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/README.md)
 - `/plugin marketplace add trailofbits/skills` (repository README) adds the whole Trail of Bits marketplace, not one skill.
- 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.
- 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

### Compatibility

Claude Code

### Reads protocol code or specs and writes a Mermaid diagram file

 - Stated tools: Read, Write, Grep, Glob, Bash and WebFetch
- Read protocol source code or a spec file; fetch a spec URL with WebFetch
- Write a Markdown file holding the Mermaid diagram, named after the protocol, and print an ASCII diagram inline

### Cost model

CC-BY-SA-4.0. The Crypto Protocol Diagram skill's files name no paid service.

04 / FOLLOW THE EVIDENCE

## The source trail.

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

 - [Crypto Protocol Diagram SKILL.md ↗](https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/trailmark/skills/crypto-protocol-diagram/SKILL.md) Checked 2026-10-22 https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/trailmark/skills/crypto-protocol-diagram/SKILL.md Supports: upstreamDescription, summary, whySelected, bestFor, limitations, access, review.findings
- [trailmark plugin README ↗](https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/trailmark/README.md) Checked 2026-10-22 https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/trailmark/README.md Supports: install.prerequisites, install.steps
- [trailmark code-slice-worker agent (names Claude Code as host) ↗](https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/trailmark/agents/code-slice-worker.md) Checked 2026-10-22 https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/trailmark/agents/code-slice-worker.md Supports: compatibility
- [trailofbits/skills README ↗](https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/README.md) Checked 2026-10-22 https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/README.md Supports: install.steps, license
- [trailofbits/skills LICENSE ↗](https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/LICENSE) Checked 2026-10-22 https://raw.githubusercontent.com/trailofbits/skills/8e54050ae63c2f62224c35b1616efe71865b4777/LICENSE Supports: license

KEEP COMPARING

## Other approaches to consider.

Related by category or shared topics. These are alternatives to inspect, not a measured quality order.

 [### 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.](/skills/trailofbits-trailmark-diagramming-code/)[### Mermaid to ProVerif ↗ Reads a Mermaid sequence diagram of a cryptographic protocol and writes a ProVerif .pv model, with queries for secrecy, authentication and forward secrecy, that can be passed to the ProVerif verifier.](/skills/trailofbits-trailmark-mermaid-to-proverif/)[### Constant-time analysis ↗ Routes a timing review by language and says when not to use the analyzer.](/skills/trailofbits-constant-time-analysis/)

 [AI Tools ↗](/tools/)[Skills ↗](/skills/)[Agents ↗](/agents/)[MCP Servers ↗](/mcp-servers/)[Workflows ↗](/workflows/)

## Continue your investigation

 - [Choose a toolkit](/tools/)
- [Inspect execution hosts](/agents/)
- [Check tool access](/mcp-servers/)
- [Check project dependencies](/check-repo/)
