Help us improve
Share bugs, ideas, or general feedback.
From midnight-verify
Verification 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.
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-sourceThe summary Claude sees in its skill listing — used to decide when to auto-load this 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.
Hub skill for the midnight-verify plugin. Classifies claims by domain, routes to the appropriate domain skill, dispatches sub-agents based on the domain skill's routing, and synthesizes final verdicts. Loaded by the /midnight-verify:verify command — the main thread acts as orchestrator.
This skill should be used when reviewing Compact smart contract code, TypeScript witness implementations, or test files for a Midnight project. Applies when a user asks to "review my Compact contract", "audit this smart contract", "check my Midnight code", or "run a code review checklist". Provides category-specific checklists covering privacy, security, cryptographic correctness, token economics, concurrency, compilation, performance, architecture, code quality, testing, and documentation, plus mechanical verification via /midnight-verify:verify.
This skill should be used when extracting testable claims from Midnight documentation or source content. Covers how to identify verifiable statements about Compact syntax, types, APIs, compiler behavior, and runtime errors. Defines the JSON output schema for structured claim lists. Relevant when asked to "extract claims", "find testable statements", "parse documentation for verifiable facts", or "produce a claim list from content chunks". Used by the claim-extractor agent in the midnight-fact-check pipeline.
Share bugs, ideas, or general feedback.
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: