Skip to content
Conduit

skill

crypto-protocol-diagram

Claude Skill: extract cryptographic protocol message flow from code, RFCs, ProVerif or Tamarin models into Mermaid + ASCII sequence diagrams

Set up

Skills are installed by placing their folder where your agent loads skills.

The download comes from github.com/chenxihuang1028-a11y/crypto-protocol-diagram itself, not from our server, so what you get is exactly what its author published.

Install instructions come from the README

Skills do not use an MCP config. Follow the steps in the README below.

README

synced Oct 17, 2026

Crypto Protocol Diagram Skill

A standalone Claude Skill that extracts a cryptographic protocol's message flow and renders it as a Mermaid sequenceDiagram (written to file) plus an ASCII sequence diagram (printed inline).

This repository is a redistribution of an upstream skill published by Trail of Bits — see ATTRIBUTION.md for provenance, source revision, and licensing.

What it does

It accepts either of two input kinds:

  • Source code implementing a handshake, key exchange, or multi-party protocol
  • A specification — RFC, academic paper, pseudocode, informal prose, or a formal model in ProVerif (.pv) or Tamarin (.spthy)

and extracts protocol semantics: who sends what to whom, which cryptographic transformation happens at each step, and what protocol phases exist.

Unlike a code-structure diagramming skill, it does not produce call graphs, class hierarchies, or module dependency maps.

Tools used: Read, Write, Grep, Glob, Bash, WebFetch (for URL specs).

Contents

PathWhat it is
SKILL.mdThe skill itself — workflows, decision tree, and output contract
references/mermaid-sequence-syntax.mdMermaid sequenceDiagram syntax reference
references/ascii-sequence-diagram.mdASCII sequence-diagram rendering rules
references/protocol-patterns.mdCommon handshake / key-exchange patterns
references/spec-parsing-patterns.mdExtracting message flow from specs and formal models
examples/simple-handshake/Source-code input + expected output
examples/simple-proverif/ProVerif model input + expected output
agents/openai.yamlUpstream agent manifest (unchanged)

Install

Drop the repository into your Claude Skills directory:

git clone https://github.com/chenxihuang1028-a11y/crypto-protocol-diagram.git \
  ~/.claude/skills/crypto-protocol-diagram

No dependencies to install. Rendering the generated .mmd files to images requires a Mermaid renderer (mermaid.live, @mermaid-js/mermaid-cli, or any Markdown viewer with Mermaid support) — the skill itself only emits the diagram source.

Usage

The skill activates on requests such as:

  • "Diagram this protocol" / "visualize this handshake"
  • "Extract the message flow from this RFC"
  • "Diagram this ProVerif model"
  • Naming a protocol directly: TLS, Noise, Signal, X3DH, Double Ratchet, FROST, DH, ECDH

Worked inputs and their expected outputs live in examples/ — start with examples/simple-handshake/ for the code path and examples/simple-proverif/ for the formal-model path.

See SKILL.md for the full workflow, the spec workflow (S1–S5), and the decision tree.

License

Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) — see LICENSE.

No endorsement by Trail of Bits or the upstream author is implied. The license does not grant trademark rights; the included Trail of Bits mark is retained only because the unchanged upstream agents/openai.yaml references it.

↑↓ navigate openesc close