midnightntwrk/midnight-expert/compact-init-project
Claude Code and agent skill by midnightntwrk/midnight-expert
- community
Checking that the SKILL.md file is still in the repository.
This skill should be used when the user asks to create a new Midnight project, scaffold a Compact smart contract project, initialize a DApp, set up a new Midnight application, start a new project, use a project template, or set up a Midnight development environment for the first time. Also triggered by "new project", "start a project", "init project", "scaffold", or "create-mn-app" (the former scaffolding tool, now replaced by this skill's built-in generator).
Install
npx vskill@latest install midnightntwrk/midnight-expert/compact-init-projectSKILL.md
Initialize a New Midnight/Compact Project
This skill scaffolds a new, self-contained Midnight project using a vendored, deterministic generator bundled with the skill (scripts/new-example.mjs + templates/example/). It replaces the former create-mn-app tool: the generator is zero-dependency (Node built-ins only), fetches nothing, and produces byte-identical output for the same inputs. Follow the workflow in references/new-example-workflow.md step by step.
Note:create-mn-appis being sunset. If a user asks for it by name, route them here — this skill'sgenerator is its replacement.
What Gets Scaffolded
| Template | Description | |
|---|---|---|
| example (default, and only) | A self-contained Midnight project: a Compact contract stub, a TypeScript test harness (vitest), and a local Docker network. The user writes the contract and test bodies. Pass --witnesses to also generate a witnesses.ts stub for contracts with off-chain private logic. |
Quick Start
Follow references/new-example-workflow.md phases in order:
- Environment Check — Run
/midnight-tooling:doctorto verify Node 22+, Docker, and Compact CLI - Project Setup — Get a kebab-case project name; decide whether the contract needs witnesses
- Scaffolding — Resolve the plugin root, then run
node "$PLUGIN_ROOT/skills/compact-init-project/scripts/new-example.mjs" <name> [--witnesses] - Local Network —
cd <name> && yarn install && yarn env:up(the project ships its owncompose.yml) - Compile — Write the contract, then
yarn compile; verifycontract/managed/<name>/ - Summary — Show what was created, the available scripts, and the test-run flow
Key Dependencies
This skill delegates to midnight-tooling plugin commands:
/midnight-tooling:doctor— prerequisite verification/midnight-tooling:install-cli— Compact compiler installation (if needed)/midnight-tooling:proof-server— proof server / Docker troubleshooting/midnight-tooling:devnet— optional shared local devnet (alternative to the project's bundledcompose.yml)
Not For
- Existing project troubleshooting → use
midnight-tooling:troubleshooting - Writing custom Compact contracts → use
compact-structure,compact-ledger, etc. - Deploying to a remote network → out of scope (the scaffold's tests can target Preview/Preprod with a funded seed, but wallet creation and funding are separate)
- Adding features to an existing project → use domain-specific compact-core skills
Reference Files
| Topic | Reference | |
|---|---|---|
| Step-by-step workflow (follow this) | references/new-example-workflow.md | |
| Project layout, SDK/toolchain versions, network URLs | references/project-structure.md | |
| Common init failures and fixes | references/troubleshooting.md |
Bundled Assets
| Asset | Path | |
|---|---|---|
| Deterministic scaffolder | scripts/new-example.mjs | |
| Project template tree | templates/example/ |
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/compact-core/skills/compact-init-project/SKILL.md
Popularity
- Repository stars
- 45
- Repository forks
- 14
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/midnightntwrk/midnight-expert/compact-init-project)