/midnight-verify:verify-by-cli-executionfrom midnight-verify
Verifies Compact CLI claims by running commands and inspecting stdout/stderr/exit codes and filesystem changes. Covers flag existence, behavior, output structure, error messages, and version info.
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.
You are verifying a Compact CLI claim by running the actual command and observing what happens. Follow these steps in order.
CLI output is primary evidence. The command ran and produced this output — that's definitive for behavioral claims. Source code is secondary evidence for internal claims that can't be observed via CLI.
You may load the midnight-tooling:compact-cli skill to understand what flags exist and how the CLI works. This is a hint only — the CLI output is your evidence, not the skill content.
compact --version 2>&1
compactc --version 2>&1
If both commands fail (command not found), report Inconclusive (cli unavailable) and stop:
The Compact CLI is not installed or not on PATH. Install it via
Load the `midnight-tooling:install-cli` skill for installation instructions and retry.
If only one is available, note which one and proceed — some claims are about compact specifically vs compactc.
Based on the claim, choose the appropriate test:
Check if a flag appears in help output:
compact compile --help 2>&1 | grep -i '<flag-name>'
If found → flag exists. If not found → flag does not exist.
Compile a minimal contract with and without the flag, compare results:
# Get language version
LANG_VER=$(compact compile --language-version 2>&1)
# Create job directory
JOB_ID=$(uuidgen | tr '[:upper:]' '[:lower:]')
mkdir -p "$HOME/.midnight-expert/verify/compact-workspace/jobs/$JOB_ID"
# Write minimal contract
cat > "$HOME/.midnight-expert/verify/compact-workspace/jobs/$JOB_ID/test.compact" << COMPACT_EOF
pragma language_version $LANG_VER;
import CompactStandardLibrary;
export circuit test(): Field {
0
}
COMPACT_EOF
# Compile WITHOUT the flag
compact compile "$HOME/.midnight-expert/verify/compact-workspace/jobs/$JOB_ID/test.compact" \
> "$HOME/.midnight-expert/verify/compact-workspace/jobs/$JOB_ID/stdout-without.txt" 2>&1
ls -R "$HOME/.midnight-expert/verify/compact-workspace/jobs/$JOB_ID/test/build/" \
> "$HOME/.midnight-expert/verify/compact-workspace/jobs/$JOB_ID/listing-without.txt" 2>&1
# Clean compiled output
rm -rf "$HOME/.midnight-expert/verify/compact-workspace/jobs/$JOB_ID/test/"
# Compile WITH the flag
compact compile --skip-zk "$HOME/.midnight-expert/verify/compact-workspace/jobs/$JOB_ID/test.compact" \
> "$HOME/.midnight-expert/verify/compact-workspace/jobs/$JOB_ID/stdout-with.txt" 2>&1
ls -R "$HOME/.midnight-expert/verify/compact-workspace/jobs/$JOB_ID/test/build/" \
> "$HOME/.midnight-expert/verify/compact-workspace/jobs/$JOB_ID/listing-with.txt" 2>&1
Compare the two directory listings to identify what the flag changed.
Compile a minimal contract and inspect the build directory:
# After compilation
find "$HOME/.midnight-expert/verify/compact-workspace/jobs/$JOB_ID/test/build/" -type f | sort
Compare the actual file tree against the claimed structure.
Feed invalid input and capture stderr:
# Write intentionally invalid contract
cat > "$HOME/.midnight-expert/verify/compact-workspace/jobs/$JOB_ID/bad.compact" << 'COMPACT_EOF'
<intentionally invalid code targeting the claimed error>
COMPACT_EOF
compact compile "$HOME/.midnight-expert/verify/compact-workspace/jobs/$JOB_ID/bad.compact" 2>&1
echo "Exit code: $?"
Check that stderr contains the claimed error message (or doesn't, if refuting).
Run the command and capture the exit code:
compact compile <args> 2>&1
echo "Exit code: $?"
compact --version 2>&1
compact compile --language-version 2>&1
compactc --version 2>&1
Parse and compare against the claim.
Run both and compare behavior:
# Via wrapper
compact compile <args> > stdout-compact.txt 2>&1
echo "compact exit: $?"
# Via compactc directly
compactc <args> > stdout-compactc.txt 2>&1
echo "compactc exit: $?"
# Compare
diff stdout-compact.txt stdout-compactc.txt
Compare the actual output against the claim.
Report format:
### CLI Execution Report
**Claim:** [verbatim]
**Command(s) run:**
\`\`\`bash
[exact commands with arguments]
\`\`\`
**Exit code:** [0 / non-zero value]
**stdout:**
\`\`\`
[captured output — full, not truncated]
\`\`\`
**stderr:**
\`\`\`
[captured output — full, not truncated]
\`\`\`
**Filesystem changes:** [new files/directories created, or "N/A" if not relevant]
**Interpretation:** [Confirmed / Refuted / Inconclusive] — [explanation of how the output matches or contradicts the claim]
Remove the job directory if one was created:
rm -rf "$HOME/.midnight-expert/verify/compact-workspace/jobs/$JOB_ID"
Do NOT remove the base compact-workspace — it is shared across jobs.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub midnightntwrk/midnight-expert --plugin midnight-verify19 skills in this plugin
/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.Other plugins' skills for the same job