Midnight Skill banner
ADAvault ADAvault

Midnight Skill

Testing community

Description

Claude Code skill for writing and testing Compact smart contracts on Midnight

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Midnight Compact Smart Contract Skill

An [Agent Skill](https://agentskills.io) for writing, testing, and deploying **Compact smart contracts** on the **Midnight blockchain**. Built from Discord community knowledge, compiler validation, and real-world gotchas. This project extends the [Midnight Network](https://midnight.network) with additional developer tooling.

Supports Claude Code, Cursor, Gemini CLI, VS Code Copilot, and 30+ other AI coding assistants.

**Important:** These examples are educational references. Any smart contract generated using this skill should be professionally audited before deployment to mainnet. AI-assisted code generation does not replace security review.

Compiler-Validated

All examples compiled and tested against **Compact 0.30.0** (`compact-runtime` 0.15.0, ledger v8). Also compatible with Compact 0.29.0 (ledger v7). See gotcha #74 for migration guide.

✅ Re-validated 2026-08-17 — all 29 examples compile on Compact 0.31.1

Every published example was recompiled from source against the current compiler.

set result
10 standalone validation contracts 10/10 PASS
19 remaining + new contracts 19/19 PASS
vendored OpenZeppelin compact-contracts 9/10 — see below

**Toolchain:** `compact` CLI **0.5.1**, compiler **0.31.1**, `compact-runtime` **0.16.0**, Midnight.js **4.1.1**, Node 1.0.1, Ledger 8.1.0. ([support matrix](https://docs.midnight.network/relnotes/support-matrix))

⚠ `compact --version` reports the **CLI wrapper** (0.5.1), not the compiler (0.31.1). Easy to confuse when checking which you are on.

**🔴 Compact 0.31.0 has a soundness bug** that can silently drop a range constraint. Use **0.31.1**+. If you deployed anything built with 0.31.0, diff the verifier key — source review is explicitly *not* reliable for finding it. Details in `SKILL.md`.

**Breaking changes found, and what they mean for older code:**

  • CoinInfo is now an **unbound