Help us improve
Share bugs, ideas, or general feedback.
From midnight-verify
Verification 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.
npx claudepluginhub devrelaicom/midnight-expert --plugin midnight-verifyHow this skill is triggered — by the user, by Claude, or both
Slash command
/midnight-verify:verify-by-cli-executionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are verifying a Compact CLI claim by running the actual command and observing what happens. Follow these steps in order.
Compact CLI tooling claim classification and method routing. Determines what kind of CLI claim is being verified and which verification method applies: CLI execution (primary for behavioral claims) or source investigation (for internal/architectural claims). Handles claims about compact compile flags, compactc behavior, compiler output structure, error messages, exit codes, version management, and CLI installation. Loaded by the /midnight-verify:verify command alongside the hub skill.
This skill should be used when the user asks about the Compact CLI, Compact Dev Tool, Compact Developer CLI, or compact devtools for Midnight Network smart contract development, including setting up the Compact toolchain on a new machine, resolving "compact: command not found" or "No default compiler set" errors, validating that Compact source code compiles correctly, switching between compiler versions, pinning a project to a specific compiler version, understanding why compilation is slow or how to speed it up, figuring out which version of the compiler or language they're running, setting up a project-local toolchain directory, configuring import search paths for multi-file contracts, understanding error messages or exit codes from the compiler or formatter, setting up or uninstalling the Compact toolchain, resolving GitHub API rate limiting when listing or updating versions, or troubleshooting why format or fixup is reporting failures
Drives CLI binaries with representative inputs, captures stdout/stderr/exit code as separate evidence channels, and asserts behavior via golden-file comparison with volatile-field redaction.
Share bugs, ideas, or general feedback.
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 .midnight-expert/verify/compact-workspace/jobs/$JOB_ID
# Write minimal contract
cat > .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 .midnight-expert/verify/compact-workspace/jobs/$JOB_ID/test.compact \
> .midnight-expert/verify/compact-workspace/jobs/$JOB_ID/stdout-without.txt 2>&1
ls -R .midnight-expert/verify/compact-workspace/jobs/$JOB_ID/test/build/ \
> .midnight-expert/verify/compact-workspace/jobs/$JOB_ID/listing-without.txt 2>&1
# Clean compiled output
rm -rf .midnight-expert/verify/compact-workspace/jobs/$JOB_ID/test/
# Compile WITH the flag
compact compile --skip-zk .midnight-expert/verify/compact-workspace/jobs/$JOB_ID/test.compact \
> .midnight-expert/verify/compact-workspace/jobs/$JOB_ID/stdout-with.txt 2>&1
ls -R .midnight-expert/verify/compact-workspace/jobs/$JOB_ID/test/build/ \
> .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 .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 > .midnight-expert/verify/compact-workspace/jobs/$JOB_ID/bad.compact << 'COMPACT_EOF'
<intentionally invalid code targeting the claimed error>
COMPACT_EOF
compact compile .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 .midnight-expert/verify/compact-workspace/jobs/$JOB_ID
Do NOT remove the base compact-workspace — it is shared across jobs.