crypto-protocol-diagram

Extract cryptographic protocol message flows into Mermaid sequence diagrams.

Updated May 2, 2026
One-click install
npx skills add https://github.com/ayehiaa/my-travel-assistant --skill crypto-protocol-diagram-ayehiaa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: crypto-protocol-diagram
Source: https://github.com/ayehiaa/my-travel-assistant/tree/main/.agents/skills/crypto-protocol-diagram
Command: npx skills add https://github.com/ayehiaa/my-travel-assistant --skill crypto-protocol-diagram-ayehiaa

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill removes the guesswork of diagramming cryptographic protocols by extracting the real message flow and cryptographic operations directly from code or specifications.

Core Features & Use Cases

  • Protocol-to-diagram extraction: Produces a Mermaid sequenceDiagram plus an inline ASCII sequence diagram from crypto protocol source code or spec text.
  • Crypto-aware annotations: Labels key steps such as DH/ECDH, KDF/HKDF, signing/verifying, encryption/decryption, hashes, commits, and secret sharing.
  • Abort and branching clarity: Surfaces success vs failure paths using alt blocks and highlights missing/ambiguous spec details with ⚠️.
  • Spec format coverage: Supports RFC-style prose, pseudocode/academic descriptions, and formal models including ProVerif (.pv) and Tamarin (.spthy).

Quick Start

Ask the assistant to generate an annotated sequence diagram for the protocol you provide (e.g., upload a .pv/.spthy file or paste the RFC/pseudocode), and request output as a Mermaid sequence diagram plus an ASCII diagram.

Frequently Asked Questions about crypto-protocol-diagram

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a sequence diagram from a cryptographic protocol specification?

You can generate a sequence diagram from a cryptographic protocol specification by extracting message flow and cryptographic operations to produce a Mermaid sequenceDiagram with detailed annotations and an inline ASCII diagram.

Can I convert ProVerif or Tamarin models into rendered message sequences?

Yes, you can convert ProVerif (.pv) or Tamarin (.spthy) formal models into rendered message sequences by systematically identifying parties, tracing sender/receiver message order, and emitting both Mermaid and ASCII sequence diagrams.

How do cryptographic operations get annotated in Mermaid sequence diagrams?

Cryptographic operations are annotated in Mermaid sequence diagrams by labeling key steps such as DH/ECDH, KDF/HKDF, signing/verifying, encryption/decryption, hashes, commits, and secret sharing directly within the message flow.

Does this protocol diagramming approach support branching and abort paths in specs?

Yes, this protocol diagramming approach supports branching and abort paths by surfacing success versus failure flows using Mermaid alt blocks and highlighting missing or ambiguous specification details with warning markers.

What is the best way to visualize a crypto handshake from an RFC or pseudocode?

The best way to visualize a crypto handshake from an RFC or pseudocode is to derive a sequence diagram by extracting parties, tracing message order, and labeling cryptographic transformations to output both Mermaid and ASCII diagrams.

What are the limitations when converting formal verification models to sequence diagrams?

When converting formal verification models to sequence diagrams, missing or ambiguous specification details are highlighted with warning markers rather than resolved, and output is strictly limited to Mermaid and ASCII formats.