---
title: "Mermaid to ProVerif: review, setup & limitations · Undominated.ai"
canonical: https://undominated.ai/skills/trailofbits-trailmark-mermaid-to-proverif/
description: "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."
---

# Mermaid to ProVerif: review, setup & limitations · Undominated.ai

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

[← Explore all skills](/skills/)

SECURITY REVIEW / Trail of Bits

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

 [See setup guidance ↓](#setup)[Original source ↗](https://github.com/trailofbits/skills/tree/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/plugins/trailmark/skills/mermaid-to-proverif)

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/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/LICENSE)
 Revision f0dd11d2b1da
 [Read what was—and wasn’t—checked ↓](#review)

“Translates Mermaid sequenceDiagrams describing cryptographic protocols into ProVerif formal verification models (.pv files). Use when generating a ProVerif model, formally verifying a protocol, converting a Mermaid diagram to ProVerif, verifying protocol security properties (secrecy, authentication, forward secrecy), checking for replay attacks, or producing a .pv file from a sequence diagram.”

 [Trail of Bits · upstream description ↗](https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/plugins/trailmark/skills/mermaid-to-proverif/SKILL.md) Our analysis follows below.

01 / THE REASONING

## Why this made the selection.

 - Translates a Mermaid sequenceDiagram, typically the output of crypto-protocol-diagram, into a ProVerif .pv model with queries for secrecy, authentication and forward secrecy.
- It adds reachability queries first and explains how to read them: ProVerif's `RESULT not event(endR(...)) is false` means the event is reachable, and `is true` means a structural bug.

### A good fit for

 - Produce a ProVerif .pv model from a protocol sequence diagram
- Check a protocol for secrecy, authentication and forward secrecy
- Look for replay attacks in a modelled handshake

### Weigh up before choosing

 - Its stated tools are Read, Write, Grep and Glob, with no Bash: it writes the .pv model and the user runs ProVerif on it.
- Running ProVerif on an existing .pv file is outside its scope; the skill says to run `proverif model.pv` directly.
- It is for cryptographic protocols; state machines and access control are out of scope, and a Mermaid sequenceDiagram must exist first.
- Installs with the whole `trailmark` plugin, not as a standalone Mermaid to ProVerif skill; this SKILL.md does not call the Trailmark CLI that the plugin README lists.
- Last commit touching plugins/trailmark/skills/mermaid-to-proverif at the pinned revision: 2026-10-14.
- 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/mermaid-to-proverif/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

 - Mermaid to ProVerif's SKILL.md frontmatter declares no allowed-tools; its body states the tools used are Read, Write, Grep and Glob.
- The forward-secrecy test leaks both long-term secret keys after the sessions, in phase 1, and checks that a past session key stays secret.
- The decision tree adds a noselect directive when verification does not terminate after several minutes.
- The model is written to a .pv file named from the protocol, followed by a summary of its queries and assumptions.

### Not established by this review

 - Not executed: it was not installed or run.
- The Mermaid to ProVerif 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/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/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 Mermaid to ProVerif skill with the other trailmark skills listed in the trailmark plugin README.
- Run the generated model yourself with `proverif model.pv`; the skill's stated tools include no Bash.

### Before you start

 - A Mermaid sequenceDiagram of the protocol, for example from crypto-protocol-diagram
- ProVerif, to run the generated model (`proverif model.pv`) outside this skill

### Compatibility

Claude Code

### Reads a Mermaid sequence diagram and writes a ProVerif model

 - Stated tools: Read, Write, Grep and Glob
- Read a Mermaid sequence diagram
- Write a ProVerif .pv model named after the protocol

### Cost model

CC-BY-SA-4.0. The Mermaid to ProVerif 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.

 - [Mermaid to ProVerif SKILL.md ↗](https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/plugins/trailmark/skills/mermaid-to-proverif/SKILL.md) Checked 2026-10-22 https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/plugins/trailmark/skills/mermaid-to-proverif/SKILL.md Supports: upstreamDescription, summary, whySelected, bestFor, limitations, access, review.findings
- [trailmark plugin README ↗](https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/plugins/trailmark/README.md) Checked 2026-10-22 https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/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/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/plugins/trailmark/agents/code-slice-worker.md) Checked 2026-10-22 https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/plugins/trailmark/agents/code-slice-worker.md Supports: compatibility
- [trailofbits/skills README ↗](https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/README.md) Checked 2026-10-22 https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/README.md Supports: install.steps, license
- [trailofbits/skills LICENSE ↗](https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/LICENSE) Checked 2026-10-22 https://raw.githubusercontent.com/trailofbits/skills/f0dd11d2b1da17a1ff8c403741fbe1f6bca0f871/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.

 [### 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.](/skills/trailofbits-trailmark-crypto-protocol-diagram/)[### Constant-time analysis ↗ Routes a timing review by language and says when not to use the analyzer.](/skills/trailofbits-constant-time-analysis/)[### False Positive Check ↗ Forces a true-positive or false-positive verdict on one suspected bug, and refuses to be used as a bug hunter.](/skills/trailofbits-fp-check/)

 [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/)
