midnight-environment-setup
Skill18 starsChanged 17 days agoMITView on GitHub
Automatically prepare a complete Midnight development environment — Compact compiler, PATH, Docker, proof server, and VS Code extension. Use before building, compiling, or deploying any Midnight application when tooling is missing. Triggers: "set up Midnight", "install Compact", "proof server", "compact: command not found", "environment setup", "first time Midnight dev".
- Pipes a download into a shell
In this repository36 other files it gives its agents.
- AGENTS.mdAGENTS.md
- 1am-walletSkill
- android-example-votingSkill
- ankr-midnightSkill
- compactSkill
- dynamic-midnight-walletSkill
- example-counterSkill
- example-hello-worldSkill
- example-leaderboard-dappSkill
- example-locker-dappSkill
- example-passport-dappSkill
- example-payment-dappSkill
- example-private-party-dappSkill
- example-private-reserve-auction-dappSkill
- example-zk-loan-applicationSkill
- gsap-coreSkill
- gsap-utilsSkill
- indexerSkill
- midnight-consensusSkill
- midnight-cryptographySkill
- midnight-jsSkill
- midnight-onchain-logicSkill
- midnight-p2p-networkingSkill
- midnight-passportSkill
- midnight-rpcSkill
- midnightskillSkill
- midnight-storageSkill
- midnight-transactionsSkill
- multinetworkSkill
- nftSkill
- react-wallet-connectorSkill
- midnight-securitySkill
- testingSkill
- token-transfersSkill
- why-midnightSkill
- zk-vs-fhe-vs-mpcSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 14 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Only if a step cannot be completed because of permission limitations, operating system restrictions, missing GUI access, or unavailable …
- Distinctive: line 27
Never immediately paste installation documentation.
- Distinctive: line 59
If Compact is not installed:
- Distinctive: line 65
Wait until installation finishes.
- Distinctive: line 85
If Compact still cannot be found, append:
- Distinctive: line 97
Always install the latest compiler.
- Distinctive: line 125
If Docker is unavailable:
- Distinctive: line 149
If port 6300 is occupied, retry using:
- Distinctive: line 161
If VS Code exists:
- Distinctive: line 213
Ask the user to launch Docker Desktop and wait until the engine is fully started.
- Distinctive: line 235
Always prefer automation over explanation.
- Distinctive: line 237
Only request manual intervention when automation is impossible due to permission, GUI, or operating system limitations.
- Distinctive: line 239
After every automated action, verify success before proceeding.
- Distinctive: line 241
Never assume a command succeeded without checking its output.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: Midnight Environment Setup
Goal
Automatically prepare a complete Midnight development environment for the user.
This skill should always be executed before attempting to build, compile, or deploy any Midnight application if the required tooling is not already installed.
Responsibilities
The AI assistant should attempt to perform every installation step automatically.
Only if a step cannot be completed because of permission limitations, operating system restrictions, missing GUI access, or unavailable terminal access should the assistant ask the user to complete that specific step manually.
Never immediately paste installation documentation.
Step 1 — Detect Environment
Determine:
- Operating System
- Shell (bash/zsh)
- Docker availability
- VS Code availability
- Compact installation
- Current PATH
- Existing compiler version
Commands that may be useful:
uname -a
which compact
compact --version
compact compile --version
docker --version
code --version
echo $SHELLStep 2 — Install Compact
If Compact is not installed:
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/midnightntwrk/compact/releases/latest/download/compact-installer.sh | shWait until installation finishes.
Step 3 — Refresh PATH
Determine shell.
If zsh:
source ~/.zshrcIf bash:
source ~/.bashrcIf Compact still cannot be found, append:
export PATH="$HOME/.compact/bin:$PATH"Reload shell again.
Step 4 — Update Compiler
Always install the latest compiler.
compact updateStep 5 — Verify Installation
Run
compact --version
compact compile --version
which compactInstallation is considered successful only if all commands execute without errors.
Step 6 — Docker
Check Docker availability.
If Docker is unavailable:
Explain that Docker Desktop must be installed manually.
https://www.docker.com/products/docker-desktop/
Pause until Docker is running.
Step 7 — Start Proof Server
Run
docker run -p 6300:6300 midnightntwrk/proof-server:latest midnight-proof-server -vVerify logs indicate:
Listening on http://localhost:6300If port 6300 is occupied, retry using:
docker run -p 6301:6300 midnightntwrk/proof-server:latest midnight-proof-server -vInform the user that applications must now use port 6301.
Step 8 — VS Code Extension
If VS Code exists:
Guide the user to install the Compact VS Code extension (VSIX package).
AI agents cannot reliably install VS Code extensions through GUI interactions unless the environment explicitly supports it.
Provide concise instructions:
- Download the Compact VSIX package.
- Open VS Code.
- Extensions.
- Install from VSIX.
- Select the downloaded file.
Final Verification Checklist
Confirm:
- Compact installed
- Latest compiler installed
- PATH configured
- Docker running
- Proof Server running
- VS Code extension installed (or user informed)
Troubleshooting
compact: command not found
Reload shell.
If needed:
export PATH="$HOME/.compact/bin:$PATH"
source ~/.zshrcor
source ~/.bashrcDocker not running
Ask the user to launch Docker Desktop and wait until the engine is fully started.
Port 6300 already in use
Use:
docker run -p 6301:6300 midnightntwrk/proof-server:latest midnight-proof-server -vand configure applications to use:
http://localhost:6301Agent Behavior
Always prefer automation over explanation.
Only request manual intervention when automation is impossible due to permission, GUI, or operating system limitations.
After every automated action, verify success before proceeding.
Never assume a command succeeded without checking its output.
The goal is to leave the user with a fully working Midnight development environment ready to build, compile, and deploy DApps.
Author: Kali-Decoder
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

