Back to Browse

Use with your AI agent

  1. Install — run npx skills add Kali-Decoder/Midnight-skills --skill midnight-doctor for this skill, or npx skills add Kali-Decoder/Midnight-skills for all
  2. Prompt — copy the example prompt and paste it into Cursor, Claude Code, or Codex
  3. Build — the agent loads this skill and scaffolds your Midnight work

Doctor

FoundationBeginnerReviewedNewUpdated 3 days agov1.0.0

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 prompts

Check 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:

  1. Read-only script: Node, Compact devtools/toolchain, Docker images, proof server, package.json pins, pragmas.
  2. 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 changes

New skill — first published in v1.0.16 (not in v1.0.14).

On this page · 5 sections
SKILL.md

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

  1. 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-doctor or .claude/skills/midnight-doctor. Node 18+ is enough to run it; it has no dependencies.

  2. 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.json next to this file, a copy of references/versions.json made at release time. Use --offline to force it, or --pins <file-or-url> to use another set.
  3. 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.

  4. 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.

  5. Re-run until it reports 0 fail. Then, if the original error persists, look it up in midnight-common-errors.

What it checks

AreaCheckFails when
nodeNode.js versionolder than 18 (warns below 22)
compactcompact --version, compact compile --versiontoolchain differs from the pin, or compact is missing
dockerdaemon, running proof-server / indexer / node imagesa running Midnight image has a different tag than the pin
proof-serversomething listening on localhost:6300never fails, warns
projecteach 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
contractspragma language_version in every .compact filenever 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

SymptomFix
No pins: live endpoint unreachableYou 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 showsThe 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.
TaskSkill
See the full pinned set and install commandsmidnight-version-matrix/
Decode an error message or codemidnight-common-errors/
Install missing toolingmidnight-environment-setup/

Start in 2 steps

  1. 1. Install — one skill or the full set
  2. 2. Prompt — paste the example into your agent

Install all skills (recommended)

npx skills add Kali-Decoder/Midnight-skills

One command adds every Midnight skill to Cursor, Claude Code, and similar agents.

Install this skill only

npx skills add Kali-Decoder/Midnight-skills --skill midnight-doctor

Installs only "midnight-doctor" into every detected agent (Cursor, Claude Code, Codex, …).

Example agent prompt

Check 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.

Paste into Cursor, Claude Code, or Codex after installing.

Author
Tusharpamnani
Category
Foundation
Difficulty
beginner
Version
v1.0.0

Tags

DoctorSetupVersionsDebugging

Files included

SKILL.md
Create Social CardLive HackathonsGallery
Mock Demo
Doctor