/midnight-verify:verify-by-sourcefrom midnight-verify
Verifies structural or architectural claims about Compact and Midnight by reading compiler, ledger, and runtime source code. Uses octocode-mcp for quick lookups, falls back to local cloning for deep investigation.
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 claim about Compact or Midnight by reading the actual source code of the compiler, ledger, runtime, or related repositories. Follow these steps in order.
This method is for claims that cannot be meaningfully tested by compiling and running code:
If the claim CAN be tested by writing and running a contract, the contract-writer agent handles it instead. You only run when execution isn't viable.
You may consult compact-core skills to get a starting point for where to look. They can tell you which stdlib functions are expected to exist, what the type system looks like, etc. But they are hints only — the source code is your evidence, not the skills.
Repository routing — match the claim to the right repo:
| Claim About | Primary Repo | Key Paths / Notes |
|---|---|---|
| Compiler behavior, language semantics, stdlib | LFDT-Minokawa/compact | compiler/ directory, midnight-natives.ss for stdlib exports |
| Compiler-generated docs (good secondary source) | LFDT-Minokawa/compact | docs/ — generated from source, more reliable than general Midnight docs |
| Ledger types, transaction structure, token ops | midnightntwrk/midnight-ledger | Rust source — defines Counter, Map, Set, MerkleTree, transaction validation |
| ZK proof system, circuit compilation | midnightntwrk/midnight-zk | Rust source — proof generation, ZKIR, circuit constraints |
| Node runtime, on-chain execution | midnightntwrk/midnight-node | Rust source — how transactions execute on-chain |
| Compact CLI releases, changelog | midnightntwrk/compact | Release notes — distinct from LFDT-Minokawa/compact compiler source |
| SDK API, TypeScript packages, provider implementations | midnightntwrk/midnight-js | packages/*/src/ — monorepo with 13 packages. llms.txt in repo root is a 10KB API overview useful as a starting point. |
If the claim doesn't clearly map to one repo, start with LFDT-Minokawa/compact for language/compiler claims or midnightntwrk/midnight-ledger for protocol/transaction claims.
Start with targeted lookups using the octocode-mcp tools:
githubSearchCode — search for specific function names, type names, export definitionsgithubGetFileContent — read a specific file once you know the pathgithubViewRepoStructure — understand the repo layout if you're not sure where to lookSearch strategy:
Evaluate results critically:
main or masterIf octocode-mcp results are insufficient — you need to trace through multiple files, count exports across modules, or understand control flow — clone the repo locally:
# Clone to a temp directory
CLONE_DIR=$(mktemp -d)
git clone --depth 1 https://github.com/<org>/<repo>.git "$CLONE_DIR/<repo>"
Use --depth 1 for shallow clones (faster, we usually only need the latest state).
After investigation, clean up:
rm -rf "$CLONE_DIR"
What counts as evidence (ordered by strength):
LFDT-Minokawa/compact/docs/ — good evidence, but note that it's generated from source, not raw source itself. More reliable than general Midnight docs, less authoritative than the code.Watch for:
main may differ from the released version the user is targetingmain might include features not yet in any releaseYour report must include:
https://github.com/LFDT-Minokawa/compact/blob/main/compiler/midnight-natives.ss#L42)Report format:
### Source Investigation Report
**Claim:** [verbatim]
**Searched:** [repo(s) and method — octocode-mcp search / local clone]
**Found:**
- File: [repo/path/to/file.ext:line-range]
- Link: [full GitHub URL]
- Content: [relevant code snippet or summary]
**Interpretation:** [Confirmed / Refuted / Inconclusive] — [explanation of what the source shows and how it relates to the claim]
If inconclusive, explain:
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-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.Other plugins' skills for the same job