Help us improve
Share bugs, ideas, or general feedback.
From compact-examples
Use this skill when an agent needs real, compilable examples of Compact smart contracts, TypeScript witnesses, or tests. Covers beginner contracts (counter, bulletin board), reusable modules (access control, security, tokens, math, crypto, data structures, identity, utils), composed token contracts (fungible, NFT, multi-token, shielded), and full applications (CryptoKitties, ZK lending, real-world assets). All examples compile with pragma language_version >= 0.22 and full proof generation.
npx claudepluginhub devrelaicom/midnight-expert --plugin compact-examplesHow this skill is triggered — by the user, by Claude, or both
Slash command
/compact-examples:code-examplesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Compilable Compact smart contracts, TypeScript witnesses, and tests sourced from 8 repositories. All code uses `pragma language_version >= 0.22` and passes `compact compile` with full proof generation.
examples/applications/kitties/Nft.compactexamples/applications/kitties/kitties.compactexamples/applications/kitties/witnesses.tsexamples/applications/midnight-rwa/crypto.compactexamples/applications/midnight-rwa/midnight-rwa.compactexamples/applications/midnight-rwa/passportidentity.compactexamples/applications/midnight-rwa/witnesses.tsexamples/applications/tbtc/tbtc.compactexamples/applications/zkloan/schnorr.compactexamples/applications/zkloan/witnesses.tsexamples/applications/zkloan/zkloan-credit-scorer.compactexamples/getting-started/bboard/bboard.compactexamples/getting-started/bboard/witnesses.tsexamples/getting-started/counter/counter.compactexamples/getting-started/counter/witnesses.tsexamples/modules/access/AccessControl.compactexamples/modules/access/Ownable.compactexamples/modules/access/ZOwnablePK.compactexamples/modules/access/test/AccessControl.test.tsexamples/modules/access/test/Ownable.test.tsThis 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, export patterns, or disclosure rules. Also triggered by mentions of "pragma language_version", "CompactStandardLibrary", circuit definitions, or Compact common mistakes.
Develops secure smart contracts by integrating OpenZeppelin libraries for ERC tokens, access control, pausability, governance, and accounts. Supports Solidity, Cairo, Stylus, Stellar.
Provides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.
Share bugs, ideas, or general feedback.
Compilable Compact smart contracts, TypeScript witnesses, and tests sourced from 8 repositories. All code uses pragma language_version >= 0.22 and passes compact compile with full proof generation.
.compact and witness files you needDo NOT load all examples into context. Use the reference files to pick precisely what you need.
| Topic | Reference | When to use |
|---|---|---|
| Beginner examples | references/getting-started.md | Simple contracts, learning basics, minimal state management |
| Reusable modules | references/modules.md | Access control, math, crypto, data structures, utils — building blocks you import |
| Token contracts | references/tokens.md | Fungible, NFT, multi-token, shielded tokens — complete deployable contracts |
| Privacy & cryptography | references/privacy-and-cryptography.md | ZK patterns, signatures, identity proofs, privacy techniques |
| Full applications | references/applications.md | Multi-module DApps, real-world architecture, how pieces compose |