midnight-tooling:midnight-setup

Use when setting up Midnight development environment, installing Compact compiler and developer tools, configuring proof server, verifying prerequisites, or getting started with Midnight development.

16 stars

Best use case

midnight-tooling:midnight-setup is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use when setting up Midnight development environment, installing Compact compiler and developer tools, configuring proof server, verifying prerequisites, or getting started with Midnight development.

Teams using midnight-tooling:midnight-setup should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/midnight-tooling-midnight-setup/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/tools/midnight-tooling-midnight-setup/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/midnight-tooling-midnight-setup/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How midnight-tooling:midnight-setup Compares

Feature / Agentmidnight-tooling:midnight-setupStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use when setting up Midnight development environment, installing Compact compiler and developer tools, configuring proof server, verifying prerequisites, or getting started with Midnight development.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Midnight Development Environment Setup

Guide developers through setting up a complete Midnight development environment for building zero-knowledge smart contracts and dApps.

## Prerequisites Overview

Before installing Midnight-specific tools, verify these prerequisites:

| Requirement | Minimum | Recommended | Check Command |
|------------|---------|-------------|---------------|
| Node.js | 18.x | 20.x LTS | `node --version` |
| npm | 9.x | Latest | `npm --version` |
| Docker | 20.x | Latest | `docker --version` |
| Git | 2.x | Latest | `git --version` |
| Chrome | Latest | Latest | Required for Lace wallet |

Run the prerequisite check script to verify:
```bash
bash ${CLAUDE_PLUGIN_ROOT}/skills/midnight-setup/scripts/check-prerequisites.sh
```

For detailed prerequisite verification:
```bash
python3 ${CLAUDE_PLUGIN_ROOT}/skills/midnight-setup/scripts/check-prerequisites.py
```

## Installation Steps

### 1. Install Node.js via nvm (Recommended)

Using nvm provides easy version management:

```bash
# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

# Restart terminal or source profile
source ~/.zshrc  # or ~/.bashrc

# Install Node.js 18 LTS
nvm install 18 --lts
nvm alias default 18
```

**Important**: After installing or switching Node versions, open a new terminal window. Simply sourcing the profile may leave stale references.

### 2. Install Docker Desktop

Download from [docker.com/products/docker-desktop](https://docker.com/products/docker-desktop/) for your platform. After installation:

1. Launch Docker Desktop
2. Wait for the Docker daemon to start
3. Verify with `docker info`

### 3. Install Compact Developer Tools

The Compact developer tools manage compiler versions and provide the `compact` CLI:

```bash
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/midnightntwrk/compact/releases/latest/download/compact-installer.sh | sh
```

After installation, add the binary to your PATH. The installer will show the exact path, typically:

```bash
# Add to ~/.zshrc or ~/.bashrc
export PATH="$HOME/.compact/bin:$PATH"
```

Then restart your terminal or source the profile.

### 4. Install the Compact Compiler

With the developer tools installed, download the compiler:

```bash
# Download latest compiler
compact update

# Verify installation
compact --version          # Shows developer tools version
compact compile --version  # Shows compiler version
```

### 5. Pull the Proof Server Image

The proof server generates zero-knowledge proofs locally:

```bash
docker pull midnightnetwork/proof-server:latest
```

To start the proof server (when needed for development):

```bash
docker run -p 6300:6300 midnightnetwork/proof-server -- midnight-proof-server --network testnet
```

### 6. Install VS Code Extension (Optional)

The Midnight Compact VS Code extension provides syntax highlighting and IntelliSense:

1. Download the `.vsix` file from the [Compact releases](https://github.com/midnightntwrk/compact/releases)
2. In VS Code: Extensions → "..." menu → "Install from VSIX..."
3. Select the downloaded file

### 7. Install Lace Midnight Preview Wallet (Optional)

For testing dApps with a wallet:

1. Install from Chrome Web Store: search "Lace Midnight"
2. Create a new wallet and save seed phrase securely
3. Get test tokens from [midnight.network/test-faucet/](https://midnight.network/test-faucet/)

## Verification

After completing setup, verify everything works:

```bash
# Check all tools
node --version      # Should be 18+
docker info         # Should show Docker running
compact --version   # Should show developer tools version
compact compile --version  # Should show compiler version

# Check proof server image
docker images | grep proof-server
```

Or run the environment check command: `/midnight:check`

## Compact Developer Tools Reference

| Command | Purpose |
|---------|---------|
| `compact update` | Download/update to latest compiler |
| `compact update <version>` | Switch to specific version |
| `compact list` | Show all available versions |
| `compact list --installed` | Show locally installed versions |
| `compact check` | Check for updates without downloading |
| `compact compile <file> <outdir>` | Compile a contract |
| `compact compile +0.25.0 <file> <outdir>` | Compile with specific version |
| `compact self update` | Update the developer tools themselves |
| `compact help` | Show help |

## Common Setup Issues

| Issue | Solution |
|-------|----------|
| `compact: command not found` | Add `~/.compact/bin` to PATH, restart terminal |
| Node version wrong after install | Open a **new** terminal window |
| Docker daemon not running | Start Docker Desktop application |
| Proof server won't start | Check Docker is running, port 6300 is free |

## Additional Resources

- **`references/installation-steps.md`** - Detailed platform-specific instructions
- **`references/bun-setup.md`** - Alternative setup using Bun runtime

For troubleshooting, use the `/midnight:doctor` command or consult the `midnight-debugging` skill.

Related Skills

tooling

16
from diegosouzapw/awesome-omni-skill

Python development tooling configuration and best practices

setup-workflow

16
from diegosouzapw/awesome-omni-skill

Initial setup workflow for claude-pilot plugin - directory creation, statusline configuration, documentation sync, GitHub star request

setup-tooluniverse

16
from diegosouzapw/awesome-omni-skill

Install and configure ToolUniverse with MCP integration for any AI coding client (Cursor, Claude Desktop, Windsurf, VS Code, Codex, Gemini CLI, Trae, Cline, Antigravity, OpenCode, etc.). Covers uv/uvx setup, MCP configuration, API key walkthrough, skill installation, and upgrading. Use when setting up ToolUniverse, configuring MCP servers, troubleshooting installation issues, upgrading versions, or when user mentions installing ToolUniverse or setting up scientific tools.

setup-pm

16
from diegosouzapw/awesome-omni-skill

Configures the project management tool by guiding selection from supported options, applying the implementation guide, updating way-of-working adoption, and recording the decision via /record-decision. Idempotent — detects existing configuration.

setup-automation

16
from diegosouzapw/awesome-omni-skill

Set up GitHub Actions + WandB Automation for automatic result analysis

pair-capability-setup-pm

16
from diegosouzapw/awesome-omni-skill

Configures the project management tool by guiding selection from supported options, applying the implementation guide, updating way-of-working adoption, and recording the decision via /pair-capability-record-decision. Idempotent — detects existing configuration.

monorepo-and-tooling

16
from diegosouzapw/awesome-omni-skill

Outlines the monorepo structure and tooling conventions, emphasizing the use of Taskfile.yml, and proper handling of environment variables.

midnight-tooling:midnight-compatibility

16
from diegosouzapw/awesome-omni-skill

Use when checking Midnight version compatibility, understanding pragma language_version, verifying compiler and runtime version relationships, or troubleshooting version mismatch errors between Midnight components.

git-initial-setup

16
from diegosouzapw/awesome-omni-skill

Default git setup to protect main after git init/clone. Use when standardizing repo bootstrap and absorbing environment differences.

gh-cli-setup

16
from diegosouzapw/awesome-omni-skill

Use when gh CLI is not installed, not configured, or authentication fails - provides installation steps, authentication methods, and troubleshooting for all platforms

environment-setup-guide

16
from diegosouzapw/awesome-omni-skill

Guide developers through setting up development environments with proper tools, dependencies, and configurations

cox-tooling-excellence

16
from diegosouzapw/awesome-omni-skill

Write Go code in the style of Russ Cox, Go tech lead. Emphasizes tooling, module design, correctness, and backward compatibility. Use when designing packages, modules, or tools that others will depend on.