compact-examples:code-examples

Provide compilable Compact smart contract, TypeScript witness, and test examples.

37|9|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/devrelaicom/midnight-expert --skill compact-examples-code-examples
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compact-examples:code-examples
Source: https://github.com/devrelaicom/midnight-expert/tree/main/plugins/compact-examples/skills/code-examples
Command: npx skills add https://github.com/devrelaicom/midnight-expert --skill compact-examples-code-examples

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Developers and reviewers need curated, ready-to-run Compact language examples so they can learn, test, and compose real contracts without spending hours assembling compatible code, witnesses, and tests from disparate sources.

Core Features & Use Cases

  • Curated, compilable examples: Provides beginner contracts, reusable modules, token implementations, privacy patterns, and full multi-file DApps that compile under pragma language_version >= 0.22.
  • Witness & test coverage: Includes TypeScript witness implementations and test simulators where applicable so examples can be executed and validated locally.
  • Focused discovery: Routing table and reference files guide users to the exact example needed (getting-started, modules, tokens, privacy, applications) to avoid loading excessive code into context.

Quick Start

Ask the agent to "Show a compilable beginner Compact counter example with its TypeScript witness and test from compact-examples".

Frequently Asked Questions about compact-examples:code-examples

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find compilable Compact smart contract examples with TypeScript witnesses and tests?

Compilable Compact smart contract examples with TypeScript witnesses and tests are provided as ready-to-run references, covering beginner contracts, reusable modules, token implementations, privacy patterns, and full multi-file applications.

What Compact language version do I need to run these smart contract examples?

These Compact smart contract examples target pragma language_version >= 0.22 and compile with full proof generation using the Compact toolchain, requiring no additional external dependencies.

How do I write a TypeScript witness for a Compact privacy smart contract?

TypeScript witness implementations for Compact privacy smart contracts are included alongside test simulators, allowing you to execute and validate privacy patterns locally with full proof generation.

Can I use these Compact examples to learn zero-knowledge smart contract development?

These Compact examples support learning zero-knowledge smart contract development by providing curated, compilable references for privacy patterns, tokens, and modules with accompanying witnesses and tests.

What's the best way to test Compact smart contracts with witness implementations?

The best way to test Compact smart contracts is using the included TypeScript witness implementations and test simulators, which enable local execution and validation with full proof generation via the Compact toolchain.

How do I locate specific Compact contract examples without loading excessive code?

A routing table and reference files guide you to the exact Compact contract example needed across categories like getting-started, modules, tokens, privacy, and applications, preventing excessive code from loading into context.