Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

mermaid-to-proverif — Claude Code skill: what it does, how to install

Turns a Mermaid sequence diagram of a crypto protocol into a ProVerif model — a .pv file you can check for secrecy, authentication and forward secrecy.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add trailofbits/skills --skill mermaid-to-proverif -a claude-code
Open on GitHub

What mermaid-to-proverif does

Give it a Mermaid sequenceDiagram that spells out a cryptographic exchange and it writes the matching ProVerif model. The output is a .pv file you pass straight to the verifier. It does not draw diagrams: the input is usually what the crypto-protocol-diagram skill produces, with message arrows and notes for Sign, Verify, DH, HKDF, Enc, Dec.

The run goes in order — participants and channels, an inventory of crypto operations, type and function declarations, events, security queries, per-party processes, the main process, then delivery. A worked examples/simple-handshake/ ships with it; look at that before taking on an unfamiliar protocol. Everything is done with Read, Write, Grep and Glob.

One habit it insists on: add reachability queries for events before anything else. If an event never fires, the answers to your other queries prove nothing. The verifier itself is not run for you, so proverif model.pv stays your job — worth having ProVerif installed before you start.

What it helps with

  • turn a protocol sketch into a .pv model ProVerif can check
  • prove secrecy for the session key of a hand-rolled handshake
  • test forward secrecy when ephemeral keys show up in the diagram
  • hunt for replay attacks before the code ships
  • audit which crypto primitives a diagram actually uses

Example prompts for the agent

  • Turn this Mermaid handshake diagram into a ProVerif model and query session key secrecy.
  • Convert the diagram in `examples/simple-handshake/` to `.pv` and add reachability queries for every event.
  • Check forward secrecy for this exchange with ephemeral keys.

How to install mermaid-to-proverif

1Skills CLI (Vercel)

npx skills add trailofbits/skills --skill mermaid-to-proverif -a claude-code

2Manually: put the files in place

~/.claude/skills/mermaid-to-proverif/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/mermaid-to-proverif/

From the same set35

The whole set →
semgrep trailofbits Runs a Semgrep static security audit on your codebase. It presents a plan for user confirmation and merges all findings into SARIF. Claude Code CX Codex Cursor +1 9,500installs differential-review trailofbits Reviews code changes for security issues using Git history and test coverage. Use it for commits, diffs, and pull requests that need a written review report. Claude Code CX Codex Cursor +1 8,800installs modern-python trailofbits Configures Python projects with a modern tooling stack: uv for dependency management, ruff for linting and formatting, ty for type checking. Use when starting new projects, writing scripts, or migrating from legacy tools. Claude Code CX Codex Cursor +1 8,700installs secure-workflow-guide trailofbits Guides smart contracts through Trail of Bits' 5-step security audit on check-in or before deployment. It runs static analysis, generates visual charts, and prepares fuzzing tests. Claude Code CX Codex Cursor +1 7,400installs sharp-edges trailofbits Audits API designs and configuration schemas for developer footguns. Flags dangerous defaults and fragile interfaces where the easiest path causes security vulnerabilities. Claude Code CX Codex Cursor +1 6,900installs agentic-actions-auditor trailofbits Inspects GitHub Actions workflows for prompt injection risks and insecure AI agent setups. Catches attacker inputs leaking into prompts via event contexts or environment variables. Claude Code CX Codex Cursor +1 6,700installs gh-cli trailofbits A skill that redirects GitHub requests from curl and fetch to authenticated gh CLI for repositories, pull requests, and issues. Use it for private repos and higher API limits. Claude Code CX Codex Cursor +1 6,600installs variant-analysis trailofbits Finds related occurrences of an already identified defect across a repository. Use it after a vulnerability or logic issue turns up and similar code needs checking. Claude Code CX Codex Cursor +1 6,400installs

Similar

browser-login ruvnet Authenticates against a site once, sanitizes cookies through AIDefence, vaults the session handle, and lets other skills reuse it without re-logging in. Claude Code CX Codex Cursor +1 729installs iot-witness-verify ruvnet Verifies witness chain integrity for Cognitum Seed devices and detects provenance gaps. Useful for uncovering broken hash chains and missing epochs. Claude Code CX Codex Cursor +1 728installs computer-use-agents sickn33 Guides the architecture of AI agents that control screens, cursors, and keystrokes using Anthropic Computer Use or OpenAI Operator. Useful for sandboxed desktop and GUI automation. Claude Code CX Codex Cursor +1 959installs plaid-fintech sickn33 Provides integration patterns for the Plaid API, covering Link tokens, ACH Auth, transaction sync, balance checks, and webhook handling. Claude Code CX Codex Cursor +1 956installs browser-form-fill ruvnet Fills web forms using a structured JSON field map and saved selector templates. It automates data entry and form submission directly in browser sessions. Claude Code CX Codex Cursor +1 717installs salesforce-component-standards official github Guides Salesforce UI development across LWC, Aura, and Visualforce. Enforces SLDS 2 compliance, accessibility, and platform security. GitHub Copilot 770installs git-guardrails-claude-code Matt Pocock This skill adds a Claude Code hook that stops risky Git commands before they run. Use it when an agent must not push or discard working-tree changes. Claude Code 499,069installs ponytail-review DietrichGebert ponytail-review reviews a change beyond the diff, checking connected code, bugs, risks, load, tests, speed, and unnecessary code. Use it for PRs and commits. Claude Code CX Codex Cursor +1 56,300installs

Questions about mermaid-to-proverif

How do I install mermaid-to-proverif in Claude Code?

Run npx skills add trailofbits/skills --skill mermaid-to-proverif -a claude-code. The skill lands at ~/.claude/skills/mermaid-to-proverif/SKILL.md.

What does mermaid-to-proverif do?

It translates a Mermaid sequenceDiagram of a cryptographic protocol into a ProVerif model as a .pv file, with queries for secrecy, authentication and forward secrecy.

How is it different from crypto-protocol-diagram?

crypto-protocol-diagram builds the diagram; this skill reads one. With no sequenceDiagram on hand yet, start with the first one.

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor