compact-core:compact-init-project

Scaffold a Midnight Compact project and compile contract artifacts.

37|9|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/devrelaicom/midnight-expert --skill compact-core-compact-init-project
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compact-core:compact-init-project
Source: https://github.com/devrelaicom/midnight-expert/tree/main/plugins/compact-core/skills/compact-init-project
Command: npx skills add https://github.com/devrelaicom/midnight-expert --skill compact-core-compact-init-project

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill removes the friction of initializing a new Midnight Compact project by guiding developers through environment checks, template selection, scaffolding, proof server setup, and contract compilation so projects are created reproducibly and with correct tooling.

Core Features & Use Cases

  • Template scaffolding: Create Hello World or Counter projects using create-mn-app and initialize workspace structure and dependencies.
  • Environment validation: Verify Node 22+, Docker, and Compact CLI presence and provide remediation steps via midnight-tooling commands.
  • Proof server & compile orchestration: Start the Docker-based Midnight proof server and compile contracts to produce managed artifacts ready for testing.
  • Use case: A developer new to Midnight can scaffold a project, resolve missing tooling, start the proof server, and obtain compiled contract artifacts in a guided flow.

Quick Start

Run npx create-mn-app@latest my-midnight-app --template hello-world, then start the proof server and compile the contract to verify the managed output.

Frequently Asked Questions about compact-core:compact-init-project

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a new Midnight Compact project from scratch?

To scaffold a Midnight Compact project, run npx create-mn-app@latest with your project name and a template like hello-world. The skill validates your Node 22+, Docker, and Compact CLI environment, then initializes the workspace structure and dependencies.

What templates are available when creating a Midnight Compact app?

Midnight Compact project scaffolding offers Hello World and Counter templates. These initialize a workspace structure with managed dependencies, compile contract outputs, and produce build artifacts ready for testing in your project directory.

Do I need Docker and Node 22 to start a Midnight Compact project?

Yes, starting a Midnight Compact project requires Node 22+, Docker, and the Compact CLI. The skill validates these dependencies during scaffolding and provides remediation steps via midnight-tooling commands if any are missing.

How does the Midnight proof server work during project initialization?

The Midnight proof server runs in Docker and is started during project initialization. It orchestrates contract compilation to produce managed artifacts, ensuring your scaffolded project is ready for testing immediately.

Why is my Midnight Compact contract compilation failing after scaffolding?

Midnight Compact compilation can fail if Node 22+, Docker, or the Compact CLI are missing or misconfigured. The skill validates these prerequisites during scaffolding and provides remediation steps to resolve environment issues.

What's the best way to set up a Midnight Compact development environment?

The best way to set up a Midnight Compact environment is using the scaffold skill to validate Node 22+, Docker, and Compact CLI, then start the proof server and compile contracts to verify managed build artifacts are produced correctly.