claude

compact-core

Core knowledge for writing Midnight Compact smart contracts — contract structure, data types, ledger declarations, circuits, witnesses, and common patterns.

47 on GitHubby Midnight Foundationv0.12.0Apache-2.0updated 15 days ago
/

Plugin compact-core from marketplace midnight-expert in midnightntwrk/midnight-expert. Commands read from the repo's manifest — 12 days ago.

This plugin runs code on your machine — its hooks fire automatically on events like tool use. The exact commands are listed below; read them before installing.

What it installs

Skills (15)

  • compact-core:basic-start

    This skill should be used when the user asks to "build my first Midnight DApp", "getting started from scratch", "verify my environment", "basic DApp tutorial", "test my Midnight setup", "hello world walkthrough", "new to Midnight", "first contract", "walk me through building a contract", or wants a

  • compact-core:compact-circuit-costs

    This skill should be used when the user asks about Compact circuit costs, ZK proof generation costs, gate counts, loop unrolling behavior, hash function cost tradeoffs (transientHash vs persistentHash), commitment function costs (transientCommit vs persistentCommit), pure circuit optimization benefi

  • compact-core:compact-debugging

    This skill should be used when a user needs help debugging Compact smart contract errors, including compiler failures ("parse error", "unbound identifier"), proof generation issues, TypeScript witness type mismatches, disclosure errors ("potential witness-value disclosure must be declared"), or comp

  • compact-core:compact-init-project

    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

  • compact-core:compact-language-ref

    This skill should be used when the user asks about Compact language mechanics, syntax reference, types (Field, Bytes, Uint, Boolean, Opaque, Vector, Maybe, Either, enums, structs), type casting with "as", operators, arithmetic, control flow, for loops, modules, imports, include, pragma, stdlib funct

  • compact-core:compact-ledger

    This skill should be used when the user asks about Compact ledger declarations, ledger modifiers (export, sealed), ledger ADT types (Counter, Map, Set, List, MerkleTree, HistoricMerkleTree), ADT operations and methods, constructor initialization of state, state design choices (Map vs Set vs MerkleTr

  • compact-core:compact-patterns

    This skill should be used when the user asks about Compact contract design patterns, reusable building blocks, or how to combine patterns. Covers access control (owner-only, RBAC, pausable, initializable), state management (state machine, time-locked), commitment schemes (commit-reveal, sealed-bid a

  • compact-core:compact-privacy-disclosure

    This skill should be used when the user asks about Midnight's privacy model, the disclose() function and disclosure rules, how to fix disclosure compiler errors, privacy-by-default design, witness protection program, commitment schemes (persistentCommit, transientCommit), nullifier patterns for doub

  • compact-core:compact-review

    This skill should be used when reviewing Compact smart contract code, TypeScript witness implementations, or test files for a Midnight project. Applies when a user asks to "review my Compact contract", "audit this smart contract", "check my Midnight code", or "run a code review checklist". Provides

  • compact-core:compact-security

    This skill should be used when performing a security review or audit of Compact smart contract code, or when reasoning about Compact's security threat model. Covers the three execution contexts (public ledger, ZK circuit, local witness), the witness trust boundary and the ownPublicKey()-for-authoriz

  • compact-core:compact-standard-library

    This skill should be used when the user asks about the Compact standard library (CompactStandardLibrary), stdlib types (Maybe, Either, JubjubPoint, MerkleTreeDigest, MerkleTreePath, ContractAddress, ZswapCoinPublicKey, UserAddress), deprecated stdlib names (CurvePoint, NativePoint, CoinInfo), stdlib

  • compact-core:compact-structure

    This skill should be used when the user asks to write, structure, or scaffold a Compact smart contract for Midnight, or asks about contract anatomy, pragma and imports, ledger declarations (including sealed ledger), data types (Field, Bytes, Uint, enums, structs), circuits, witnesses, constructors,

  • compact-core:compact-tokens

    This skill should be used when the user asks about Midnight tokens, token types (NIGHT, DUST, shielded, unshielded), minting and burning tokens, token transfers, token colors and domain separators, the zswap protocol, ShieldedCoinInfo, QualifiedShieldedCoinInfo, Kernel mint operations, contract toke

  • compact-core:compact-transaction-model

    This skill should be used when the user asks about Midnight transaction execution, guaranteed vs fallible phases, kernel.checkpoint(), transaction composition, state conflicts, DUST fees, gas limits, proof verification, partial transaction success, transaction merging, atomic swaps, or how Compact c

  • compact-core:compact-witness-ts

    This skill should be used when the user asks about implementing Compact witness functions in TypeScript, the WitnessContext pattern, private state management, Compact-to-TypeScript type mappings (Field to bigint, Bytes to Uint8Array, Uint to bigint), compiler-generated .d.ts files (Witnesses interfa

Slash commands (3)

  • /compact-core:audit-compact

    Deep adversarial security audit of Compact smart contract code. Runs a single security-reviewer specialist over the threat model, then confirms Critical/High findings via midnight-verify and synthesizes a consolidated security report. Security-only; for a full 10-category review use /compact-core:re

  • /compact-core:debug-contract

    Systematic debugging for Compact smart contracts — analyzes errors, investigates root causes, and guides fixes

  • /compact-core:review-compact

    Comprehensive review of Compact smart contract code covering 10 categories including privacy, security, tokens, concurrency, performance, and more, plus mechanical verification via /midnight-verify:verify. Supports parallel execution via agent teams (when enabled) or concurrent subagents.

Subagents (3)

  • compact-dev

    Use this agent when you need to write, generate, review, or fix Compact smart contract code for the Midnight blockchain. This includes creating new contracts, modifying existing ones, fixing compilation errors, implementing privacy patterns, or answering questions about Compact syntax and semantics.

  • reviewer

    Use this agent when you need a focused review of Compact smart contract code in a specific category. Dispatched by the review-compact command with a category assignment. Not intended for direct user invocation. Example 1: Dispatched by review-compact command for privacy review — the command spawns t

  • security-reviewer

    Use this agent to perform a focused, adversarial SECURITY review of Compact smart contract code. Unlike the command-only `reviewer` agent, this agent is directly invocable by users and by other agents. It performs a single coherent threat-model pass (witness trust boundary, access control, cryptogra

Hooks (4)

  • SessionStart

    bash ${CLAUDE_PLUGIN_ROOT}/scripts/SessionStart.sh

  • SessionStart

    bash ${CLAUDE_PLUGIN_ROOT}/scripts/hooks/SessionStart-compact-check.sh

  • Stop

    bash ${CLAUDE_PLUGIN_ROOT}/scripts/hooks/Stop.sh

  • SessionEnd

    bash ${CLAUDE_PLUGIN_ROOT}/scripts/hooks/SessionEnd.sh

View source on GitHub

More from midnightntwrk/midnight-expert

All 16 plugins →

Verification framework for Midnight claims — verifies Compact code by compiling and executing test contracts, SDK/TypeScript claims by type-checking and devnet E2E testing, ZKIR circuits by running through the WASM checker and inspecting compiled structure, witness implementations by cross-domain type-checking and execution against compiled contracts, or by inspecting source code. Multi-agent pipeline with explicit /verify command.

19 skills · 2 commands · 7 agents · hooks

47

Installs, configures, and manages the Midnight Network development toolchain — Compact CLI, compiler version switching, local devnet (node, indexer, proof server), diagnostics, and release notes for all Midnight components.

6 skills · 5 commands

47

Code quality tooling for Midnight Network projects — linting, formatting, type checking, testing, Git hooks, and CI workflows.

7 skills · 2 agents

47

Conceptual foundations for understanding the Midnight Network: architecture, data models, privacy patterns, protocols, tokenomics, and zero-knowledge proofs

6 skills · 1 agent

47

Fact-checking pipeline for Midnight content — extracts testable claims from any source (markdown, code, PDFs, URLs, GitHub repos), classifies them by domain (Compact, SDK, ZKIR, Witness), and verifies each claim using the midnight-verify framework. Produces structured JSON artifacts and human-readable reports.

3 skills · 2 commands · 2 agents

47

Technical reference for the Midnight node — Substrate-based architecture, runtime pallets, RPC interface, configuration, operations, and governance

6 skills

47

Similar plugins

Behavioral skills for AI-specific failure patterns: hidden code debt from agent generation and context compaction amnesia via behavioral self-enforcement

3 skills

wshobson/agents 42,461

Compact the current conversation into a handoff document for another agent to pick up. Configurable save location, redaction enforcement, SessionStart auto-load + SessionEnd reminder, self-check fidelity script, --refresh flag, mtime-guarded cleanup. Inspired by Matt Pocock's handoff (MIT).

1 skill · 2 commands · 1 agent · hooks

alirezarezvani/claude-skills 29,725

engram

claudecodex

Persistent memory with session tracking, compaction recovery, and Memory Protocol. Gives Claude a brain that survives across sessions.

1 skill · hooks

Gentleman-Programming/engram 8,070

Verbatim Jev-guided compaction for Claude Code sessions.

tamaratran/fast-jev-compaction 7,963

The bridge between Claude's working memory and Basic Memory's durable knowledge graph — session briefings, pre-compaction checkpoints, and capture reflexes

8 skills · hooks

basicmachines-co/basic-memory 4,562

aichat

claude

Adds `aichat`-related capabilities (agent support, reusable skills, hooks, and a slash command) for continuing work in CLI agent sessions without compaction, and for searching sessions

2 skills · 1 command · 1 agent · hooks

pchalasani/claude-code-tools 2,034

Maintain compact-core?

This page updates itself from your repo. Add the badge to your README, or get it Featured to pin it above the organic results with a followed link to your site.

claude & codex plugins16 plugins