- Home
- Skills
- Code Quality & Review
- Aegis-Formal-Verifier
More screenshots
Works with the AI Agents you already use
Aegis-Formal-Verifier
Neuro-symbolic formal verification and Z3-powered model checking for Python logic and distributed state machines.
$59
Aegis-Formal-Verifier
Example session with this skill installed
Formally verify our ledger transfer function against non-negativity and balance conservation invariants using Z3, and run bounded model checking on our escrow commit state machine to guarantee zero deadlocks.
- Read your context and instructions
- Compiled the aegis-formal-verifier
I have executed symbolic AST path extraction and Z3 SMT theorem proving via verify_python_function_contract, followed by bounded state-machine model checking via check_state_machine_model.
Aegis-Formal-Verifier L8 Proof-Carrying Audit
| Target Artifact | Verification Method | Mathematical Verdict | Solve Latency | Cryptographic Certificate / Witness |
|---|---|---|---|---|
execute_safe_transfer | Python AST + Z3 SMT (UNSAT) | PROVED_SAFE_UNSAT | 14.2 ms | sha256:9f84c2e1...b73a (Verified) |
compute_net_payout (Draft) | Python AST + Z3 SMT (SAT) | VIOLATION_FOUND_SAT | 15.1 ms | Witness: balance=100, amount=100, fee_bps=50 |
escrow_commit_fsm | Bounded TLA+-Style Model Check | PROVED_SAFE_UNSAT | 11.8 ms | 0 deadlocks across 12 state depth |
Formal Governance & CEGIS Summary
Silent Logic Bug Detection: Intercepted an overdraft edge case in compute_net_payout (result = -1) that passed standard unit tests, and generated a minimal CEGIS guard (amount + fee <= balance).
State-Machine Integrity: Verified all reachable transitions in escrow_commit_fsm with 0.0% deadlock or invariant breach risk.
Proof Ledger: Stored the verified SMT-LIB2 certificate in Qdrant (aegis_formal_proofs) for <3ms future recall.
Next Steps
1.
Apply CEGIS Patch: Apply the synthesized amount + fee <= balance guard and re-run verify_python_function_contract to issue a PROVED_SAFE_UNSAT certificate.
2.
Gate Production Merges: Enforce proof_hash_sha256 verification in your CI/swarm pipeline before merging critical financial or concurrency modules.
Connects securely to your tools. The creator never sees your data.
About this skill
Unit tests only probe finite happy paths. They fail to catch edge-case overflows, rounding errors, or race conditions that crash production systems. This skill provides a neuro-symbolic verification layer to mathematically prove your code is safe before you ship it.
What it does
- Symbolic Python Verification analyzes Python AST to prove function contracts or find the exact input values that trigger a failure.
- Algebraic Invariant Proving verifies financial conservation laws and risk bounds using Z3 SMT solving for integer and real number domains.
- Model Checking detects deadlocks and invariant violations in distributed state machines or concurrent workflows using bounded BFS reachability.
- CEGIS Repair Synthesis generates minimal code patches and regression assertions automatically when a counterexample witness is found.
- Proof Memory caches theorem results in a Qdrant vector store for sub-3ms retrieval of recurring bug signatures and verified proofs.
How it works
- Define the contract by providing Python source code along with explicit preconditions and postconditions.
- Execute formal verification to check if the logic can ever violate the defined invariants or trigger implicit hazards like division-by-zero.
- Analyze counterexamples if the solver finds a violation, providing the exact variable assignments that break the logic.
- Synthesize a repair by passing the failure witness to the CEGIS tool to receive a hardened guard patch.
Frameworks & tools
Built on the Z3 SMT Theorem Prover, Python AST symbolic extraction, TLA+-style model checking, and Qdrant for vector-based proof storage.
Why this beats prompting it yourself
LLMs often hallucinate safety for complex edge cases or miss subtle integer overflows. This skill replaces probabilistic guessing with deterministic mathematical proofs, generating an SMT-LIB2 certificate that guarantees correctness.
Use cases
- Financial Ledger Math proving that debits and credits always balance across all possible transaction amounts.
- Concurrency Controls verifying that distributed locks or multi-step escrow workflows cannot enter a deadlock state.
- Boundary Arithmetic checking that quota guards and margin leverage constraints hold under extreme numerical inputs.
- Smart Contract Logic validating state transition rules for complex protocols before deployment.
Known limitations
The bounded model checker is limited to a default depth of 12 states. Non-linear constraints may trigger solver timeouts if variable bounds are not sufficiently narrowed.
Symbolic AST extraction supports pure/deterministic Python numeric, boolean, branching, and dict-return functions (external network/DB side effects and unbounded dynamic loops should be abstracted into state-machine transition specs). Uses embedded in-memory Qdrant by default unless an external Qdrant URL is configured.
How to use
- 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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
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 2 days ago
Requires
Permissions
Allowed Hosts
File Scopes