circom-remix-zk
Circom 2 + Remix IDE Zero-Knowledge Circuits
This skill covers the full loop of building zero-knowledge circuits with circom 2, entirely inside Remix IDE (remix.ethereum.org), using its bundled circuit-compiler plugin (backed by circom_wasm) and the Remix terminal's built-in Node-like script runner, which has snarkjs, circomlibjs, and ethers available via require(...).
Do not assume a local Node/circom CLI environment unless the user says so — default to the Remix-native workflow described here, because remix.call(...) and the in-browser circuit-compiler plugin are how compilation and file I/O actually happen in Remix (there is no local filesystem or child_process).
The four things this skill produces
- Circuits —
.circomfiles with correct signal/template/constraint syntax. - Trusted setup scripts — Remix scripts that run Groth16's circuit-specific setup (
snarkjs.zKey.*) from a.r1csand a Powers-of-Tau file, producing azkeyandverification_key.json. - Proof generation scripts — Remix scripts that compute a witness, generate a Groth16 proof, verify it off-chain, and export a Solidity verifier contract + calldata.
- Verification — either the off-chain
snarkjs.groth16.verifycall, or the exported Solidity verifier deployed and called viaethersin a Remix script.
Read references/circom-language.md before writing or editing any .circom file — it has the exact assignment operator semantics (<== vs <--), public/private signal rules, and control-flow constraints that are easy to get subtly wrong and that silently produce insecure circuits (under-constrained signals) rather than compile errors.
Read references/remix-workflow.md before writing any Remix script (setup, witness, proof, or verifier deployment) — it covers the Remix project file layout, the exact remix.call('circuit-compiler', ...) and remix.call('fileManager', ...) calls available, where Powers-of-Tau files come from, and common failure modes specific to running snarkjs in the browser (memory limits, type: "mem" vs file-based keys, BigInt/JSON serialization of signals).