Use with your AI agent
- Install — run
npx skills add Kali-Decoder/Midnight-skills --skill midnight-doctorfor this skill, ornpx skills add Kali-Decoder/Midnight-skillsfor all - Prompt — copy the example prompt and paste it into Cursor, Claude Code, or Codex
- Build — the agent loads this skill and scaffolds your Midnight work
Doctor
Agent picks this when: Check my setup and project against the tested versions
Health-check a Midnight project and machine against the pinned version set: Compact toolchain, Docker images, proof server, package pins, duplicate runtimes, and pragmas.
Good for
- Read-only script: Node, Compact devtools/toolchain, Docker images, proof server, package.json pins, pragmas.
- FAIL/WARN report with one exact fix per finding; run it before debugging version errors.
Preview in agent
Suggested promptsCheck my setup and project against the tested versions. Use the "midnight-doctor" skill from MIDSKILLS. Follow Compact smart-contract best practices, wire wallet flows where needed, and explain each step as you implement. Target Midnight Preprod unless I specify otherwise.
Loaded skill midnight-doctor
What the skill guides the agent to do:
- Read-only script: Node, Compact devtools/toolchain, Docker images, proof server, package.json pins, pragmas.
- FAIL/WARN report with one exact fix per finding; run it before debugging version errors.
Illustrative — based on the skill's description, not recorded agent output.
Try it without installing: npx skills use Kali-Decoder/Midnight-skills@midnight-doctor
What changed in v1.0.16
All registry changesNew skill — first published in v1.0.16 (not in v1.0.14).
On this page · 5 sections
Midnight Doctor
One command that compares Node, the Compact devtools and toolchain, Docker images, the proof server, every package.json Midnight dependency, duplicate runtimes, and pragma language_version against the pins in midnight-version-matrix.
What this skill produces: a FAIL / WARN / OK report with one fix per finding. It never installs or edits anything.
Workflow
-
Run the doctor from the project root (or pass the path):
node <this-skill>/scripts/doctor.mjs # current directory node <this-skill>/scripts/doctor.mjs ./my-dapp # another project node <this-skill>/scripts/doctor.mjs --json # for parsing<this-skill>is where this skill is installed, e.g..agents/skills/midnight-doctoror.claude/skills/midnight-doctor. Node 18+ is enough to run it; it has no dependencies. -
Read the
INFO [pins]line first: it says which pin set was used.- Live:
https://midskills.sevryn.xyz/api/versions(the current pins). - Bundled:
pins.jsonnext to this file, a copy ofreferences/versions.jsonmade at release time. Use--offlineto force it, or--pins <file-or-url>to use another set.
- Live:
-
Fix every FAIL before touching application code. Most "my code is wrong" reports are a FAIL here: a toolchain/runtime mismatch, a removed package, two scopes of Midnight.js, or two copies of
compact-runtime. -
Treat WARN as a decision for the user: ranges (
^/~) instead of exact pins, packages without a tested pin, an older pragma, no proof server running. -
Re-run until it reports
0 fail. Then, if the original error persists, look it up inmidnight-common-errors.
What it checks
| Area | Check | Fails when |
|---|---|---|
node | Node.js version | older than 18 (warns below 22) |
compact | compact --version, compact compile --version | toolchain differs from the pin, or compact is missing |
docker | daemon, running proof-server / indexer / node images | a running Midnight image has a different tag than the pin |
proof-server | something listening on localhost:6300 | never fails, warns |
project | each package.json (3 levels deep) | a removed package, a version off the pin, installed version off the pin, mixed @midnight-ntwrk / @midnightntwrk Midnight.js, several compact-runtime versions |
contracts | pragma language_version in every .compact file | never fails, warns if it differs from the toolchain's language version |
Exit codes
0 no FAIL · 1 at least one FAIL · 2 the doctor could not load any pins.
Troubleshooting
| Symptom | Fix |
|---|---|
No pins: live endpoint unreachable | You are offline and the bundled pins.json is missing (partial install). Pass --pins with a path to references/versions.json from this repo. |
| Live pins differ from what a skill shows | The live set is newer. Follow the live set and the support matrix; skills are synced to it on the next release. |
| A package you need "has no tested pin" | Do not pick a version yourself. Tell the user, and check the support matrix. |
Related skills
| Task | Skill |
|---|---|
| See the full pinned set and install commands | midnight-version-matrix/ |
| Decode an error message or code | midnight-common-errors/ |
| Install missing tooling | midnight-environment-setup/ |
Related skills
Midnight Environment Setup
Automatically prepare a Midnight dev environment — Compact, PATH, Docker, proof server, and VS Code extension. Run before building or deploying.
Why Midnight
What Midnight is, why it exists, and how it works — public/private state, selective disclosure, and ZK proofs.
ZK vs FHE vs MPC
Compare ZK, FHE, and MPC for privacy-focused DApps — tradeoffs, platforms, and why Midnight uses zk-SNARKs.
Compact
The Compact smart contract language for Midnight Network. TypeScript-like DSL that compiles to ZK circuits.