/midnight-verify:verify-ledgerfrom midnight-verify
Classifies ledger/protocol claims and routes them to verification methods: source investigation, type-checking, compilation/execution, or ledger-v8 execution. For Midnight network developers.
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 ledger and protocol claims and determines which verification method to use. The /midnight-verify:verify command loads this alongside the midnight-verify:verify-correctness hub skill.
Ledger claims have a richer verification hierarchy than other domains because the ledger crates produce the compiled output that the contract-writer and zkir-checker already work with.
verify-by-ledger-source for Rust crate-level routing.| Claim Type | Example | Pre-flight | Primary | Secondary |
|---|---|---|---|---|
| Transaction format | "Transactions contain intents, offers, and binding randomness" | — | @"midnight-verify:source-investigator (agent)" | — |
| Segment ordering | "Segment 0 is guaranteed, executes first" | — | @"midnight-verify:source-investigator (agent)" | @"midnight-verify:contract-writer (agent)" (negative test) |
| Causal precedence | "Contract A calling B means A causally precedes B" | — | @"midnight-verify:source-investigator (agent)" | — |
| Replay protection | "Intent hashes stored in TimeFilterMap" | — | @"midnight-verify:source-investigator (agent)" | — |
| Well-formedness | "Disjoint check prevents input/output overlap" | — | @"midnight-verify:source-investigator (agent)" | @"midnight-verify:contract-writer (agent)" (build invalid tx) |
| Proof staging | "UnprovenTransaction transitions to Proven via prove()" | — | @"midnight-verify:source-investigator (agent)" | ledger-v8 execution |
| Claim Type | Example | Pre-flight | Primary | Secondary |
|---|---|---|---|---|
| Night UTXO | "UTXO uniqueness from (intent_hash, output_no)" | — | @"midnight-verify:source-investigator (agent)" | — |
| Zswap commitments | "CoinCommitment = Hash<(CoinInfo, CoinPublicKey)>" | — | @"midnight-verify:source-investigator (agent)" | ledger-v8 execution (call coinCommitment) |
| Zswap nullifiers | "CoinNullifier = Hash<(CoinInfo, CoinSecretKey)>" | — | @"midnight-verify:source-investigator (agent)" | ledger-v8 execution (call coinNullifier) |
| Zswap transients | "Transients use ephemeral single-leaf Merkle tree" | — | @"midnight-verify:source-investigator (agent)" | — |
| Dust generation | "Dust generates proportional to backing Night value" | — | @"midnight-verify:source-investigator (agent)" | — |
| Dust spending | "Dust spend requires ZK proof of generation chain" | — | @"midnight-verify:source-investigator (agent)" | — |
| Token types | "NIGHT is TokenType::Unshielded with raw [0u8; 32]" | — | @"midnight-verify:source-investigator (agent)" | ledger-v8 execution (call nativeToken) |
| Claim Type | Example | Pre-flight | Primary | Secondary |
|---|---|---|---|---|
| Cost dimensions | "SyntheticCost has 5 dimensions: read, compute, block, write, churn" | — | @"midnight-verify:source-investigator (agent)" | — |
| Fee formula | "Fee = max(read, compute, block) + write + churn" | — | @"midnight-verify:source-investigator (agent)" | @"midnight-verify:contract-writer (agent)" (compile, measure cost) |
| Block limits | "Block usage limit is 200,000 bytes" | — | @"midnight-verify:source-investigator (agent)" | — |
| Price adjustment | "Per-dimension price targets 50% block fullness" | — | @"midnight-verify:source-investigator (agent)" | — |
| Guaranteed limits | "Guaranteed section has separate cost bounds" | — | @"midnight-verify:source-investigator (agent)" | — |
| Claim Type | Example | Pre-flight | Primary | Secondary |
|---|---|---|---|---|
| Opcode semantics | "idx loads from Map by key" | — | @"midnight-verify:source-investigator (agent)" | @"midnight-verify:zkir-checker (agent)" (inspect compiled) |
| StateValue types | "5 types: Null, Cell, Map, Array, BoundedMerkleTree" | — | @"midnight-verify:source-investigator (agent)" | — |
| Stack machine | "VM is a stack machine, always exactly 1 item initially" | — | @"midnight-verify:source-investigator (agent)" | — |
| Cached reads | "idxc requires value to be cached in memory" | — | @"midnight-verify:source-investigator (agent)" | — |
| Claim Type | Example | Pre-flight | Primary | Secondary |
|---|---|---|---|---|
| Contract address | "ContractAddress = Hash" | — | @"midnight-verify:source-investigator (agent)" | — |
| Effects system | "Effects declare claimed nullifiers, commitments, calls" | — | @"midnight-verify:source-investigator (agent)" | @"midnight-verify:contract-writer (agent)" (compile + execute) |
| Caller determination | "Caller is calling contract, then single UTXO owner, then None" | — | @"midnight-verify:source-investigator (agent)" | — |
| Transcripts | "Guaranteed transcript executes before fees are taken" | — | @"midnight-verify:source-investigator (agent)" | — |
| Claim Type | Example | Pre-flight | Primary | Secondary |
|---|---|---|---|---|
| Pedersen commitments | "Value commitment = gr + hv where h = hash(type, segment)" | — | @"midnight-verify:source-investigator (agent)" | — |
| Fiat-Shamir binding | "Binding uses challenge c = hash(ErasedIntent, gr, gs)" | — | @"midnight-verify:source-investigator (agent)" | — |
| Signatures | "Schnorr over Secp256k1 per BIP 340" | — | @"midnight-verify:source-investigator (agent)" | — |
| Hashing | "field::hash uses Poseidon" | — | @"midnight-verify:source-investigator (agent)" | — |
| Merkle trees | "Commitment tree uses persistent Merkle tree" | — | @"midnight-verify:source-investigator (agent)" | — |
| Claim Type | Example | Pre-flight | Primary | Secondary |
|---|---|---|---|---|
| Type/export existence | "ledger-v8 exports Transaction class" | @"midnight-verify:type-checker (agent)" | @"midnight-verify:source-investigator (agent)" | — |
| Function signature | "coinCommitment takes (coin, coinPublicKey)" | @"midnight-verify:type-checker (agent)" | @"midnight-verify:source-investigator (agent)" | — |
| Function behavior | "nativeToken() returns the NIGHT raw token type" | @"midnight-verify:type-checker (agent)" | @"midnight-verify:source-investigator (agent)" | ledger-v8 execution |
| Class API | "ZswapLocalState has spend() method" | @"midnight-verify:type-checker (agent)" | @"midnight-verify:source-investigator (agent)" | — |
| CostModel API | "CostModel.initialCostModel() returns default fee config" | @"midnight-verify:type-checker (agent)" | @"midnight-verify:source-investigator (agent)" | ledger-v8 execution |
| Claim Type | Example | Pre-flight | Primary | Secondary |
|---|---|---|---|---|
| Balance preservation | "Total funds preserved except mints, dust, and treasury" | — | @"midnight-verify:source-investigator (agent)" | — |
| Transaction binding | "Assembled transaction cannot be disassembled" | — | @"midnight-verify:source-investigator (agent)" | — |
| Infragility | "Defensively-created tx survives malicious merge" | — | @"midnight-verify:source-investigator (agent)" | — |
| Causality | "Contract call A → B implies A success ⟹ B success" | — | @"midnight-verify:source-investigator (agent)" | — |
| Self-determination | "User cannot spend another user's funds" | — | @"midnight-verify:source-investigator (agent)" | — |
When in doubt:
Source investigation is always primary. Secondary methods (compilation, execution) provide corroborating evidence but are not required for a verdict.
Sub-agents may load these skills for context. They are hints only — never cite skill content as evidence.
compact-core:compact-standard-library skill — stdlib functions that map to ledger primitivesmidnight-tooling:compact-cli skill — how Compact compiles to ZKIR (relevant for VM claims)midnight-tooling:compact-cli skill — compiler behavior and flagsWhat 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