/midnight-skills:midnight-security-checklistfrom midnight-skills
Pre-ship security and privacy checklist for Midnight dApps. Covers Compact contracts, witnesses, transaction semantics, frontend, and key management. Use before deploying to preprod/mainnet, before releases/audits, or when reviewing PRs touching .compact files or witnesses.
Ships in midnight-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A gate, not a tutorial: go through every box, mark it pass / fail / n.a., and report the failures. The why and the fixes live in midnight-security/ (section numbers below).
What this skill produces: a filled checklist with a verdict (ship / fix first) and one line per failed item.
.compact file, every witness implementation (witnesses.ts), and every place the frontend handles secrets.midnight-testing-checklist too: every security property you rely on needs a negative test that proves it.midnight-security section.export ledger field is meant to be public; per-user data that only its owner needs stays in private state.disclose() is intentional: you can say in one sentence why that value may become public.Map keys are not sensitive (keys are public on insert and lookup).MerkleTree / HistoricMerkleTree, not Set.member (which reveals the element).emit(...) sends only disclosed values: events are public, indexed, and permanent (§5b).submitVote call reveals that someone voted).persistentHash over a small value space (bool, vote, role, small amount): use persistentCommit with a fresh nonce.persistent*, never transient*.secp256k1EcdsaVerify) verify a hash you computed in-circuit with domain separation, the result is asserted, and no signature or signature hash is used as a nullifier or replay key (§5b).assert before it drives logic: the proof only guarantees what the circuit checks.kernel.caller() with is_some checked); none trusts the frontend.assert, not a comment.assert in a fallible path can be tripped by state an attacker changes between proving and submission (fees are forfeited).Uint<N> widths hold every value (Uint<64> for Unix seconds, bigint amounts in Stars); casts are bounds-checked..env file is committed (git log -p / a secret scanner).midnight-doctor reports 0 fail: the deployed contract was compiled by the pinned toolchain.compiler/, keys/, zkir/) come from the same build as the audited source.| Task | Skill |
|---|---|
| Explanations, leak patterns, defensive code | midnight-security/ |
| Prove each property with tests | midnight-testing-checklist/ |
| Version and toolchain gate | midnight-doctor/ |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
midnight, dapp-security, privacy-audit, smart-contract-review
npx claudepluginhub kali-decoder/midnight-skills --plugin midnight-skills43 skills in this plugin
/1am-walletIntegrate the 1AM wallet for dust-free contract deployment and transaction flow on Midnight Network. Use this skill whenever a user is building a Midnight Network dApp, connecting to the 1AM browser extension, deploying or calling a Compact contract, handling ZK proving, setting up providers, or asking about dust-free transaction flow. Also use it for indexer patching, private state providers, payload encryption, or any question involving window.midnight['1am']./android-example-votingBuild a voting/poll dApp on Midnight Network using the Kuira Android SDK — Compact smart contract with create/cast/close circuits, passkey-derived identity, embedded wallet, Compose UI, reactive ledger reads via observeLedger(), and on-device ZK proving. Use when building a poll or voting dApp targeting Android./ankr-midnightIntegrate Ankr as a Midnight Network RPC provider for testnet and mainnet. Covers creating an Ankr project, copying HTTPS/WSS endpoints with API key, wiring the node URL into midnight-js / multinetwork configs, and calling Midnight JSON-RPC methods (midnight_*, system_*, chain_*, state_*). Use when the user asks about Ankr + Midnight, Ankr.js for Midnight, Ankr RPC endpoint, or replacing public Midnight RPC with Ankr.
/compactWrite, reason about, and debug Compact smart contracts for the Midnight blockchain. Use this skill whenever a user asks about Compact syntax, ledger state, witnesses, circuits, disclosure, ZK patterns, data types, standard library functions, security patterns, nullifier design, Merkle trees, or anything related to writing .compact files. Also trigger for questions about compiling contracts, debugging circuit errors, choosing between ledger ADTs, and implementing privacy-preserving patterns like commitments, hash-based auth, and anonymous membership proofs./compact-language-engineeringBuild and maintain language tooling for Midnight's Compact language (parsers, grammars, syntax highlighters, formatters, linters, language servers, IntelliJ/Grammar-Kit plugins, tree-sitter grammars) without changing what the language accepts. Use this skill when a user asks to write or fix a Compact grammar, port the grammar to tree-sitter, Grammar-Kit, JFlex, ANTLR, Lezer, or TextMate, check operator precedence or associativity, track down parser ambiguities or nullable and left-recursive rules, generate parser regression tests, compare a third-party parser against the compiler, or build an LSP or editor extension for `.compact` files. Also use it for questions like "what tokens does Compact have", "is `/` or unary minus valid Compact", "why does my highlighter break on block comments", "tree-sitter-compact rejects valid code", or "how does the Nite language server get its diagnostics".
/dust-gas-sponsorshipLet one wallet pay Midnight transaction fees for another wallet's transaction, so users with zero DUST can transact from their first click. Use whenever a dApp onboards new users, offers a free tier, or covers usage for its users: the two-sided sponsorship flow (user proves and binds, sponsor adds DUST and submits), the sponsor service and its acceptance policy, sponsor economics and monitoring, and the hosted alternatives (NIGHTGATE, Capacity Exchange).Other plugins' skills for the same job