groth16-prove

star 1

Generate zero-knowledge proofs with snarkjs for zkVerify. Use when the user wants to create proofs, generate witness, or run the prover with their circuit inputs.

HorizenLabs By HorizenLabs schedule Updated 2/3/2026

name: groth16-prove description: Generate zero-knowledge proofs with snarkjs for zkVerify. Use when the user wants to create proofs, generate witness, or run the prover with their circuit inputs. argument-hint: [circuit-name]

Generate ZK Proofs for zkVerify

Help the user generate zero-knowledge proofs using their compiled Circom circuit.

Arguments

If invoked with an argument (e.g., /groth16-prove password_hash), use it as the circuit name.

If no argument provided, look for compiled circuits in build/ (files ending in .zkey) or ask the user which circuit to prove.

Pre-flight Check

Before generating proofs, verify all prerequisites exist:

ls build/*.zkey build/*_js/*.wasm build/verification_key.json 2>/dev/null
ls inputs/*.json 2>/dev/null
Check If Missing
build/<circuit>.zkey Run /groth16-compile first
build/<circuit>_js/<circuit>.wasm Run /groth16-compile first
build/verification_key.json Run /groth16-compile first
inputs/<input>.json Create input file (see examples.md)

If prerequisites are missing, stop and help user get them first.

Scope

This skill generates Groth16 proofs from compiled Circom circuits using snarkjs.

What this covers:

  • Witness generation from circuit inputs
  • Groth16 proof generation
  • Local proof verification

Prerequisites (from /groth16-compile):

  • Compiled circuit (.wasm file)
  • Proving key (.zkey file)
  • Verification key (verification_key.json)

Proof Generation Steps

Step 1: Generate Witness

node build/<circuit_name>_js/generate_witness.js \
    build/<circuit_name>_js/<circuit_name>.wasm \
    inputs/input.json \
    build/witness.wtns

Step 2: Generate Proof

mkdir -p proofs

snarkjs groth16 prove \
    build/<circuit_name>.zkey \
    build/witness.wtns \
    proofs/proof.json \
    proofs/public.json

Step 3: Verify Locally

snarkjs groth16 verify \
    build/verification_key.json \
    proofs/public.json \
    proofs/proof.json

Expected output: [INFO] snarkJS: OK!

Expected Output

proofs/
├── proof.json      # The ZK proof (safe to share)
└── public.json     # Public signals (revealed in verification)

After Generating Proof

  1. Verify locally passed - If not, check inputs and circuit
  2. Run /groth16-submit to submit proof to zkVerify
  3. Keep proofs/public.json - These values are revealed during verification
  4. The proof.json is safe to share - It doesn't reveal private inputs

Checklist

  • Prerequisites verified (zkey, wasm, vk exist)
  • Input file created with valid values
  • Witness generated successfully
  • Proof generated successfully
  • Local verification passed (OK!)
  • Reminded user of next steps

Additional Resources

  • examples.md - Input file examples, output format, batch proof generation
  • reference.md - TypeScript prover, bash script, performance optimization, rapidsnark
  • troubleshooting.md - Common errors and debugging tips
Install via CLI
npx skills add https://github.com/HorizenLabs/hl-claude-marketplace --skill groth16-prove
Repository Details
star Stars 1
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator