midnight-verify:verify-by-zkir-inspection

Compile Compact contracts and inspect .zkir JSON to verify circuit structure claims.

37|9|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/devrelaicom/midnight-expert --skill midnight-verify-verify-by-zkir-inspection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: midnight-verify:verify-by-zkir-inspection
Source: https://github.com/devrelaicom/midnight-expert/tree/main/plugins/midnight-verify/skills/verify-by-zkir-inspection
Command: npx skills add https://github.com/devrelaicom/midnight-expert --skill midnight-verify-verify-by-zkir-inspection

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps verify claims about compiled circuit structure by generating and inspecting a ZKIR representation from a Compact contract. It focuses on extracting the .zkir JSON, analyzing instruction streams, and ensuring reported properties align with the compiler output.

Core Features & Use Cases

  • Inspect compiled circuits to verify opcode counts and data-flow structures.
  • Compare claims across full vs. skip-zk builds to validate consistency.
  • Useful for developers and auditors validating compiler behavior and circuit layouts.

Quick Start

Create a minimal Compact contract, run a full or skip-zk compilation, and run the ZKIR inspection to generate a report.

Frequently Asked Questions about midnight-verify:verify-by-zkir-inspection

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

FAQPage Schema
How do I inspect compiled circuits to verify opcode counts and data-flow structures?

Inspect compiled circuits by compiling a Compact contract to generate .zkir JSON output, then parse opcodes, instruction counts, and data-flow traces to verify alignment with claimed structural properties. The inspection produces a structured report.

What is ZKIR inspection and when do I need it for a Compact contract?

ZKIR inspection analyzes the .zkir JSON compiled from a Compact contract to verify the compiled circuit structure. You need it when validating compiler behavior, auditing instruction streams, or confirming reported circuit properties match actual output.

How do I compare full vs skip-zk compilation paths for circuit consistency?

Compare full and skip-zk compilation paths by running both builds on the same Compact contract, extracting the .zkir JSON from each, and inspecting instruction streams to validate that reported properties align consistently across both outputs.

Does the ZKIR inspection record compiler version and schema information?

Yes, the ZKIR inspection records the compiler version and zkir schema during analysis. It coordinates between full and skip-zk compilation paths and extracts opcodes, instruction counts, and data-flow traces into a structured verification report.

What limitations should I expect when verifying compiled circuit properties with .zkir JSON?

Verification is limited to the structural properties visible in the .zkir JSON output, such as opcodes, instruction counts, and data-flow traces. It does not validate cryptographic execution semantics or runtime behavior beyond what the compiled representation contains.