certora

Write and run Certora CVL formal verification specs for Solidity smart contracts.

6|20|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/andresdefi/cryptoskills --skill certora-andresdefi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: certora
Source: https://github.com/andresdefi/cryptoskills/tree/main/skills/certora
Command: npx skills add https://github.com/andresdefi/cryptoskills --skill certora-andresdefi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Smart contract bugs can lose real funds, and fuzz testing only samples random inputs. This Skill guides you through Certora formal verification, where CVL specifications are translated into SMT formulas and exhaustively proven for all possible inputs, call sequences, and storage states — while avoiding common LLM mistakes like confusing CVL with Solidity or writing vacuously passing rules. ## Core Features & Use Cases - CVL Spec Authoring: Write rules, invariants, ghost variables, hooks, and parametric rules with correct syntax, including env, calldataarg, mathint, and @withrevert patterns. - Protocol-Specific Rule Patterns: Reusable verification patterns for ERC-20 tokens, ERC-4626 vaults, lending protocols, access control, governance, and staking contracts. - Counter-Example Debugging & CI: Interpret verification reports, fix vacuous rules with rule_sanity, resolve timeouts and linking errors, and integrate certoraRun into GitHub Actions. - Use Case: You are auditing an ERC-4626 vault before deployment. Use this Skill to write a spec proving share price monotonicity and deposit-withdraw symmetry, run certoraRun with a proper config, and debug any counter-examples the Prover returns. ## Quick Start Ask the agent to write a Certora CVL spec and config that proves an ERC-20 transfer preserves total supply, then run it with certoraRun.

Frequently Asked Questions about certora

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

FAQPage Schema
How do I write a Certora CVL rule for a smart contract?

Declare contract functions in a methods block, capture state before a call, execute the function with an env argument, then assert the postcondition. Use @withrevert with lastReverted to check revert conditions, and mathint for overflow-free spec arithmetic.

Certora vs Foundry fuzz testing vs Slither — which should I use?

Slither runs fast static analysis for quick vulnerability scans, Foundry fuzzing samples random inputs for property testing, and Certora exhaustively proves properties for all inputs via SMT solving. Use Certora when you need mathematical certainty for critical invariants like token accounting.

Why does my Certora rule pass vacuously with SANITY_FAIL?

A vacuous pass means over-constrained require statements exclude all valid executions, so the assert is never reached. Enable rule_sanity basic or advanced, add a satisfy true reachability check, and remove require statements one at a time to find the conflict.

Does Certora verification require an API key?

Yes, the Prover runs on Certora's cloud infrastructure and requires a CERTORAKEY environment variable. Keys are available at certora.com/signup, with free access for academic and open-source projects.

How do I fix Certora Prover timeout errors?

Increase smt_timeout in the config, split complex rules into smaller ones, bound large values with require, and enable optimistic_loop with a loop_iter of 3-5. Running a single rule with --rule also reduces memory pressure.

How do I verify multi-contract Solidity projects with Certora?

Include all contracts in the files array, link storage references with the link config option, and declare external contracts in CVL using the using keyword. For unknown external call targets, use DISPATCHER or NONDET summaries in the methods block.