Works with the AI Agents you already use

    proof mcp source first verification

    by Yasir Karam

    1

    Generate and verify Lean or TLA+ formal specifications directly from source code using Proof-MCP.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    proof mcp source first verification

    proof mcp source first verification

    Example session with this skill installed

    Verify the inventory reservation logic in src/inventory.py for potential race conditions. Discover the modules first.

    • Read your context and instructions
    • Compiled the proof mcp source

    I have discovered the modules in the repository and identified candidate checks for the inventory system. I have extracted the source for src/inventory.py to analyze the reservation transitions.

    Verification Discovery & Analysis

    ComponentLanguageCandidate CheckDirectory
    inventoryPythonpytest src/test_inventory.py/
    reservation_flowTLA+ (Proposed)TLC Generated.cfg/temp

    Observed Behavior

    The reserve_stock function in src/inventory.py performs a read-modify-write operation on the database. It checks if available > requested before updating.

    Formal Modeling (TLA+)

    To check for race conditions, I have drafted a TLA+ model to verify the

    Safety property: Total reserved stock never exceeds initial inventory.

    ---------------- MODULE Generated ----------------
    EXTENDS Integers, Sequences
    VARIABLE inventory, reserved
    
    Init ==
        /\ inventory = 10
        /\ reserved = 0
    
    Reserve(n) ==
        /\ inventory >= n
        /\ inventory' = inventory - n
        /\ reserved' = reserved + n
    
    Next == \exists n \in {1, 2}: Reserve(n)
    
    Spec == Init /\ [][Next]_<<inventory, reserved>>
    
    Safety == reserved <= 10
    ==================================================
    

    Next steps

    1. Approve the execution of proof_run_approved_checks for the initial Python test suite.
    2. Run proof_check_generated with the TLA+ model above to check for concurrency violations.
    3. Define the upper bound of concurrent users for the model check.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Formal verification is often inaccessible to developers because it requires writing complex specifications before seeing any results. This skill bridges the gap by generating Lean or TLA+ specifications directly from your source code and running them through the Proof-MCP verification server.

    What it does

    • Source discovery identifies languages, modules, and candidate verification checks within a repository.
    • Formal modeling drafts Lean 4 theorems for functional correctness or TLA+ models for concurrency and protocols.
    • Automated checking executes model-checkers and proof-checkers via MCP to verify safety and liveness properties.
    • Evidence reporting generates QA reports that separate runtime test results from formal proof evidence.
    • Structural analysis maps dependencies and cycles to provide context for verification bounds.

    How it works

    1. Use proof_discover_qa to map the codebase and identify which modules require verification.
    2. Provide a specific verification goal to extract the relevant source and structural context.
    3. Review the ledger of observed behaviors versus intended properties and approve specific project commands.
    4. Generate and check a candidate Lean or TLA+ bundle using the proof_check_generated tool.
    5. Review the final evidence report which documents passes, failures, and unmodeled gaps.

    Frameworks & tools

    This skill requires a connection to a Proof-MCP server. It supports Lean 4 for mathematical proofs, TLA+ with the TLC model checker for state transitions, and Python for property-based testing.

    Why this beats prompting it yourself

    Generic prompts often hallucinate proof results or fail to maintain the strict boundary between implementation and abstraction. This skill uses a structured verification workflow that forces explicit documentation of assumptions and prevents the agent from claiming a proof passed without actual checker execution.

    Use cases

    • Verify distributed protocols or state machine transitions using TLA+.
    • Prove functional invariants and mathematical bounds in critical Lean 4 modules.
    • Audit a complex workflow for potential deadlocks or liveness violations.
    • Generate a formal QA report for a specific subset of a legacy codebase.

    Known limitations

    Requires a configured Proof-MCP server to execute checks. It does not prove that executable source is verified unless a refinement relationship is explicitly modeled.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 14 days ago

    Software
    Proof MCPGit

    Permissions

    Read Files
    Network Access
    Terminal / Shell
    Listed14 days ago

    What's inside

    Frequently Asked Questions

    Traditional verification requires manual specification writing; this skill automates the translation of your source code into Lean 4 or TLA+ models, allowing you to catch logical flaws and concurrency issues without being a formal methods expert.

    This skill is designed for any AI agent or IDE that supports the Model Context Protocol (MCP). You will also need access to a Proof-MCP server to execute the generated Lean or TLA+ proofs.

    While generic AI prompts often 'hallucinate' that a proof passed, this skill uses a structured workflow that requires actual verification from the Lean 4 or TLC model checker before reporting a success.

    No, it works with your existing codebase. The `proof_discover_qa` tool maps your repository to identify modules, dependencies, and potential verification targets automatically.

    You receive the complete suite of MCP tools for source discovery, formal modeling, and evidence reporting, along with the documentation required to connect it to your verification server.

    The skill generates formal specifications based on your source, but it does not prove the final compiled binary matches the model unless you explicitly define a refinement relationship within the proof.

    New in Agents & Orchestration

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.