circom

Agent-oriented reference for the circom language and compiler—circuits, constraints, signals, templates, compilation, and safety.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "circom" with this command: npx skills add hairyf/blockchain-master/hairyf-blockchain-master-circom

Skill is based on circom 2.x, generated at 2026-02-24.

circom is a domain-specific language and compiler for defining arithmetic circuits used in zero-knowledge proving systems (e.g. with snarkjs). Circuits are built from parameterized templates and components; the compiler outputs R1CS (and optionally WASM/C++ witness generators). This skill focuses on language semantics, constraint generation, and practical usage for agents.

Core References

TopicDescriptionReference
SignalsInput/output/intermediate, assignment operators, public/private, immutabilitycore-signals
Templates and componentsDefinition, instantiation, dot notation, arrays, parallel and custom templatescore-templates-components
Constraint generationQuadratic constraints, ===, <== vs <-- + ===core-constraints
Main componentEntry point, public input list, single maincore-main-component
Pragma and includeVersion, custom_templates, include, -lcore-pragma-include

Features

TopicDescriptionReference
OperatorsField, boolean, relational, bitwise; precedence; conditional ? :features-operators
Control flowif/for/while, known vs unknown conditions, instantiation orderfeatures-control-flow
FunctionsPure computations, no signals/constraints, return on every pathfeatures-functions
Variables and data typesvar, arrays (known size), field and signal arraysfeatures-variables-data-types
Anonymous components and tuplesInline instantiation, multiple outputs, _, array <==features-anonymous-tuples
TagsSignal tags (e.g. binary, maxbit), inheritance, valued tagsfeatures-tags
BusesStruct-like signal groups, tagging, nested/parameterized, input formatfeatures-buses
CompilationCLI flags (r1cs, wasm, c, sym, O0/O1/O2, prime, -l, inspect)features-compilation
ScopingSignals/components at top-level or known-condition if; var block scopefeatures-scoping

Best Practices

TopicDescriptionReference
Signal safetyPrefer <==/==>; use <-- only when needed and add ===; use --inspectbest-practices-signal-safety
Assert and logCompile-time vs witness-time assert; log() for debuggingbest-practices-assert-log
Known vs unknownSignals unknown; constraints and indices under known control flowbest-practices-unknowns
SimplificationWhen to use O0/O1/O2; PLONK vs Groth16; large circuitsbest-practices-simplification

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Web3

openzeppelin-contracts

No summary provided by upstream source.

Repository SourceNeeds Review
Web3

viem

No summary provided by upstream source.

Repository SourceNeeds Review
Web3

ton

No summary provided by upstream source.

Repository SourceNeeds Review