/midnight-verify:verify-zkirfrom midnight-verify
Classifies ZKIR claims and routes them to the correct verification method: WASM checker, circuit inspection, or source investigation. Handles opcode semantics, constraint behavior, field arithmetic, transcript protocol, and compiled circuit properties.
Ships in midnight-verify. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill classifies ZKIR-related claims and determines which verification method to use. The /midnight-verify:verify command loads this alongside the midnight-verify:verify-correctness hub skill.
When you receive a ZKIR-related claim, classify it using this table to determine which agent(s) to dispatch:
| Claim Type | Example | Dispatch |
|---|---|---|
| Opcode semantics | "add wraps modulo r", "mul by zero produces zero" | @"midnight-verify:zkir-checker (agent)" (checker method) |
| Constraint behavior | "assert requires boolean input", "constrain_eq fails on unequal values" | @"midnight-verify:zkir-checker (agent)" (checker method) |
| Field arithmetic | "there are no negative numbers, -1 is r-1", "(r-1) + 1 = 0" | @"midnight-verify:zkir-checker (agent)" (checker method) |
| Transcript protocol | "publicTranscript encodes ledger ops as field elements", "popeq bridges public_input" | @"midnight-verify:zkir-checker (agent)" (checker method) |
| Cryptographic opcodes | "persistent_hash produces two field elements", "ec_mul_generator derives public key" | @"midnight-verify:zkir-checker (agent)" (checker method) |
| Proof data validity | "extra private transcript outputs cause rejection", "tampered public transcript is detected" | @"midnight-verify:zkir-checker (agent)" (checker method) |
| Type encoding | "encode converts a curve point to two field elements", "decode is the inverse of encode" | @"midnight-verify:zkir-checker (agent)" (checker method) |
| Claim Type | Example | Dispatch |
|---|---|---|
| Instruction count | "this contract produces N instructions" | @"midnight-verify:zkir-checker (agent)" (inspection method) |
| Opcode usage | "guard counter uses persistent_hash for authority" | @"midnight-verify:zkir-checker (agent)" (inspection method) |
| Transcript encoding | "increment circuit uses 3 transcript ops", "disclosure compiles to declare_pub_input" | @"midnight-verify:zkir-checker (agent)" (inspection method) |
| I/O shape | "this pure circuit has no private_input instructions" | @"midnight-verify:zkir-checker (agent)" (inspection method) |
| ZKIR version format | "compiled output uses v2 format with implicit variable numbering" | @"midnight-verify:zkir-checker (agent)" (inspection method) |
| Claim Type | Example | Dispatch |
|---|---|---|
| ZKIR version differences | "v3 uses named variables, v2 uses integer indices" | @"midnight-verify:source-investigator (agent)" |
| Compiler internals | "zkir-passes.ss handles v2 serialization" | @"midnight-verify:source-investigator (agent)" |
| Checker implementation | "the WASM checker enforces transcript integrity" | @"midnight-verify:source-investigator (agent)" |
| Claim Type | Example | Dispatch |
|---|---|---|
| Compact → ZKIR mapping | "this Compact disclosure compiles to these ZKIR constraints" | @"midnight-verify:zkir-checker (agent)" (both methods) + @"midnight-verify:contract-writer (agent)" (concurrent) |
| Behavior + structure | "the guard circuit uses persistent_hash AND correctly rejects wrong keys" | @"midnight-verify:zkir-checker (agent)" (both methods) |
| ZKIR + runtime agreement | "the checker and JS runtime agree on this circuit's behavior" | @"midnight-verify:zkir-checker (agent)" (checker) + @"midnight-verify:contract-writer (agent)" (concurrent) |
When in doubt:
When multiple methods apply, dispatch concurrently. Checker and inspection are independent and can run in parallel within the same agent.
The ZKIR reference document below catalogs the opcodes across 8 categories. The exact opcode set is tied to the installed Compact compiler — confirm the current version with compact compile --version (current toolchain: compactc 0.31.1) since ZKIR output may change between compiler versions. When a claim is about a specific opcode, mention the category to help the @"midnight-verify:zkir-checker (agent)" write an appropriate test contract:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub midnightntwrk/midnight-expert --plugin midnight-verify19 skills in this plugin
/verify-by-cli-executionmidnight-verify:verify-by-cli-executionVerification by running Compact CLI commands and observing output. Checks CLI availability, runs commands, captures stdout/stderr/exit code, inspects filesystem changes, and interprets results. Covers flag existence, flag behavior, output structure, error messages, exit codes, version info, and CLI-vs-compactc comparisons. Loaded by the cli-tester agent./verify-by-devnetmidnight-verify:verify-by-devnetVerification by running E2E scripts against a local Midnight devnet. Writes SDK test scripts (raw or using testkit-js) that exercise the full transaction pipeline: deploy, call circuits, observe state. Checks devnet health before proceeding. Loaded by the sdk-tester agent. Loads the `midnight-tooling:devnet` skill for infrastructure management./verify-by-executionmidnight-verify:verify-by-executionVerification by compilation and execution. Translates a Compact claim into a minimal test contract, compiles it with the Compact CLI, runs the compiled output with @midnight-ntwrk/compact-runtime, and interprets the result. Loaded by the contract-writer agent. Covers workspace setup (lazy init), contract writing, compilation, runner script creation, execution, and result interpretation. References midnight-tooling:compact-cli for compilation details./verify-by-ledger-sourcemidnight-verify:verify-by-ledger-sourceVerification by source code inspection of the Midnight ledger Rust codebase. Searches and reads the actual Rust implementation to verify claims about transaction structure, token mechanics, cost model, on-chain VM, contract execution, and cryptographic primitives. Routes claims to specific crates within the 24-crate workspace. Uses octocode-mcp for quick lookups, falls back to local cloning for deep investigation. Loaded by the source-investigator agent when the claim domain is ledger/protocol./verify-by-sourcemidnight-verify:verify-by-sourceVerification by source code inspection. Searches and reads the actual compiler, ledger, and runtime source code to verify structural or architectural claims about Compact and Midnight that cannot be tested via compilation. Uses octocode-mcp for quick lookups, falls back to local cloning for deep investigation. Loaded by the source-investigator agent./verify-by-type-checkmidnight-verify:verify-by-type-checkVerification by TypeScript compilation. Writes TypeScript test files that exercise SDK type claims, then runs tsc --noEmit to check if types match. Also verifies user .ts files that import @midnight-ntwrk packages. Loaded by the type-checker agent. Covers workspace setup (lazy init), two modes (claim mode and file mode), type assertion patterns, and result interpretation.Other plugins' skills for the same job