For the complete documentation index, see llms.txt
Midnight Expert
Midnight Expert is a suite of Claude Code plugins for building on Midnight. It works as a human-in-the-loop coding assistant: you steer and approve while it writes and reviews Compact, scaffolds DApps, and checks its own output against the real compiler and source. That last part is the point, so you get working code instead of hallucinations. It is built as Claude Code plugins today.
This quick start takes you from install to your first compiled contract in a few minutes.
Prerequisites
- Claude Code (the CLI or an IDE extension).
- macOS or Linux. On Windows, run everything inside WSL2.
jqand the GitHub CLI. The installer checks for these and helps you install any that are missing.- The Compact toolchain. If you do not have it yet, Step 2 sets it up so Step 3 can compile.
Step 1: install the plugins
Run the guided installer. It registers the marketplace, enables the plugins, and checks that everything it needs is in place.
curl -fsSL https://midnightntwrk.expert/install.sh | bash
You can also add the marketplace from inside Claude Code by running /plugin and pasting https://midnightntwrk.expert, or from the command line with claude plugin marketplace add https://midnightntwrk.expert. Slash commands from a plugin installed mid-session only appear after you restart Claude Code; skills and agents activate right away.
Step 2: check your setup
Run /midnight-expert:doctor to confirm your environment is ready. It reports on plugin installation, external tools, and connectivity. If it flags a missing Compact CLI or proof server, ask your assistant to install it, then run doctor again.
Step 3: your first verified result
Open Claude Code in an empty folder and type:
Write a minimal Compact counter contract in
contracts/Counter.compactand compile it.
Here is what happens:
- The plugins steer the assistant to work from checked Compact knowledge and the real compiler rather than its training data, which is unreliable for Compact.
- It writes
Counter.compact: aCounterledger field, anincrementcircuit, and areadcircuit that returns the value. - It compiles the file with the real Compact CLI. If it tries to finish without compiling a contract it just wrote or changed, a check catches that and prompts it to compile first.
- If the compile fails, it reads the actual compiler error, fixes the source, and compiles again.
What you see: a Counter.compact file in your repo and a successful compile, with the generated TypeScript types and ZK artifacts in the output directory. You went from a one-line prompt to a contract that compiles.
To watch the verification directly, ask the assistant to check a fact:
/midnight-verify:verify "A Compact Counter ledger field supports increment and read"
It compiles and runs a tiny test contract, then returns Confirmed, Refuted, or Inconclusive with the evidence.
If a compile fails or the assistant seems to be guessing, run /midnight-expert:doctor for the ecosystem, and /midnight-tooling:doctor for the Compact CLI itself.
Next steps
Pick the path that matches what you are building. Describe the goal in plain language and the right plugin activates on its own.
- Smart contracts. "Write a Compact contract for a sealed-bid voting system and walk me through the disclosure rules." More in the
compact-coreREADME. - DApp frontends. "Scaffold a Vite and React DApp wired to my counter contract and connect it to the Lace wallet." More in the
midnight-dapp-devREADME.
Also worth trying:
- Run a local devnet and check its health: "Is my local proof server healthy, and is the indexer caught up to the node?"
- Look up any error code: "The node rejected my transaction with code 166. What does that mean?"
- Review your own contract before you push: "Review
contracts/Report.compactfor potential privacy leaks before I push."
For the full set of plugins, skills, and agents, browse the marketplace or the GitHub repository. Each plugin ships a detailed README.
Go deeper
- Midnight Expert marketplace: install instructions and an overview.
- GitHub repository: source, per-plugin READMEs, and issues.
- File a bug or request with
/midnight-expert:feedback. - Show proof server and Compact CLI status in your status bar with
/midnight-tooling:install-statusline-script.
Updates reach the marketplace 3 to 5 days after they merge, which gives the community time to test them. To live on the bleeding edge, use the GitHub repository devrelaicom/midnight-expert as your marketplace address instead.