Skills
Plain markdown skills, focused install commands, direct repo links, and task-specific guidance for building on Zama FHEVM.
▸ 01 · Install
One command.
Fully wired.
Uses the open skills CLI. Most teams should start with the full install. Single-skill commands are available on each catalog card.
Recommended / Default install
Recommendednpx skills add z-korp/fhevm-cookbook --skill '*'Inspect before installing
npx skills add z-korp/fhevm-cookbook --liststart here
fhevm-router
General-purpose skill that triages a Zama FHEVM task, points to the right official docs, and keeps contract and frontend responsibilities separated.
start here
fhevm-router
General-purpose skill that triages a Zama FHEVM task, points to the right official docs, and keeps contract and frontend responsibilities separated.
what it covers
- Classifies the task as contract, frontend, wallet, or review oriented
- Points to the narrowest official Zama docs page to keep open while working
- Calls out trust boundaries, ACL concerns, and decryption boundaries early
- Keeps the repo honest about current scope instead of routing to missing modules
install this skill
npx skills add z-korp/fhevm-cookbook --skill fhevm-routerRepo path: skills/fhevm-router/SKILL.md
FHEVM · 12
Protocol primitives: ACL, encrypted inputs, control flow, decryption, arithmetic, and the patterns that ship confidential contracts.
Core FHE mechanics · 4
fhevm-privacy-constraints
Product and mechanism design when confidential balances, ACL boundaries, and async decryption change what can actually be measured or enforced.
fhevm-privacy-constraints
Product and mechanism design when confidential balances, ACL boundaries, and async decryption change what can actually be measured or enforced.
what it covers
- Separates what is public, hidden, user-readable, or only available after async decrypt
- Explains why balance-based rewards and threshold checks break under confidential transfers
- Forces ACL access plans to be explicit before proposing on-chain reads or enforcement
- Reframes blocked mechanisms toward wrap activity, lockups, utility, or user-initiated proofs
install this skill
npx skills add z-korp/fhevm-cookbook --skill fhevm-privacy-constraintsRepo path: skills/fhevm-privacy-constraints/SKILL.md
fhevm-acl-lifecycle
Managing encrypted value permissions: FHE.allow, FHE.allowThis, FHE.allowTransient, handle re-creation, and the critical rule that new handles carry no permissions.
fhevm-acl-lifecycle
Managing encrypted value permissions: FHE.allow, FHE.allowThis, FHE.allowTransient, handle re-creation, and the critical rule that new handles carry no permissions.
what it covers
- Explains why FHE operations return NEW handles that need fresh ACL grants
- Distinguishes allow, allowThis, and allowTransient for different trust scenarios
- Traces permission chains across multi-step encrypted computations
- Catches the #1 FHEVM bug: assuming permissions transfer to derived values
install this skill
npx skills add z-korp/fhevm-cookbook --skill fhevm-acl-lifecycleRepo path: skills/fhevm-acl-lifecycle/SKILL.md
fhevm-control-flow
Replacing if/else and require patterns with FHE equivalents: FHE.select, silent zeroing, and designing UX around non-reverting failures.
fhevm-control-flow
Replacing if/else and require patterns with FHE equivalents: FHE.select, silent zeroing, and designing UX around non-reverting failures.
what it covers
- Explains why require(ebool) does not exist and what replaces it
- Shows FHE.select as the only way to branch on encrypted conditions
- Covers silent fallback to zero and its impact on user experience
- Guides product design for non-reverting failure modes
install this skill
npx skills add z-korp/fhevm-cookbook --skill fhevm-control-flowRepo path: skills/fhevm-control-flow/SKILL.md
fhevm-encrypted-inputs
Accepting user-encrypted values in contracts: FHE.fromExternal, input proofs, caller binding, and replay prevention.
fhevm-encrypted-inputs
Accepting user-encrypted values in contracts: FHE.fromExternal, input proofs, caller binding, and replay prevention.
what it covers
- Explains the FHE.fromExternal(ciphertext, inputProof) ingestion pattern
- Shows how input proofs bind ciphertext to msg.sender and contract address
- Covers client-side encryption with the Zama SDK
- Prevents replay and cross-contract ciphertext injection attacks
install this skill
npx skills add z-korp/fhevm-cookbook --skill fhevm-encrypted-inputsRepo path: skills/fhevm-encrypted-inputs/SKILL.md
Decryption patterns · 2
fhevm-user-decryption
Client-side decryption: off-chain reencryption, EIP-712 authorization, React hooks, and ACL pre-grant requirements.
fhevm-user-decryption
Client-side decryption: off-chain reencryption, EIP-712 authorization, React hooks, and ACL pre-grant requirements.
what it covers
- Explains the off-chain reencryption flow: sign, decrypt, display
- Shows ACL pre-grant as a prerequisite for user decryption
- Covers EIP-712 typed signatures for reencryption authorization
- Guides React and Next.js integration with the relayer SDK
install this skill
npx skills add z-korp/fhevm-cookbook --skill fhevm-user-decryptionRepo path: skills/fhevm-user-decryption/SKILL.md
fhevm-public-decryption
Two-step decrypt-verify-finalize flows: public decryption, on-chain proof verification, and state-changing plaintext settlement.
fhevm-public-decryption
Two-step decrypt-verify-finalize flows: public decryption, on-chain proof verification, and state-changing plaintext settlement.
what it covers
- Explains the two-step pattern: compute encrypted result, then finalize with proof
- Shows FHE.makePubliclyDecryptable and relayer publicDecrypt flow
- Covers on-chain proof verification with FHE.checkSignatures
- Prevents the single-step unwrap bug where user-claimed plaintext bypasses FHE checks
install this skill
npx skills add z-korp/fhevm-cookbook --skill fhevm-public-decryptionRepo path: skills/fhevm-public-decryption/SKILL.md
Operations · 3
fhevm-arithmetic-ops
FHE arithmetic: add/sub/mul, ciphertext-scalar vs ciphertext-ciphertext costs, division constraints, euint64 limits, and operation chaining.
fhevm-arithmetic-ops
FHE arithmetic: add/sub/mul, ciphertext-scalar vs ciphertext-ciphertext costs, division constraints, euint64 limits, and operation chaining.
what it covers
- Lists supported vs unsupported FHE operations with type constraints
- Explains why ciphertext-scalar is far cheaper than ciphertext-ciphertext
- Shows division requires a plaintext divisor (no encrypted denominators)
- Covers euint64 overflow behavior and safe arithmetic patterns
install this skill
npx skills add z-korp/fhevm-cookbook --skill fhevm-arithmetic-opsRepo path: skills/fhevm-arithmetic-ops/SKILL.md
fhevm-testing
Testing FHE contracts: Hardhat plugin, mock utils, mocked vs real protocol, debug decrypt, and end-to-end validation.
fhevm-testing
Testing FHE contracts: Hardhat plugin, mock utils, mocked vs real protocol, debug decrypt, and end-to-end validation.
what it covers
- Shows @fhevm/hardhat-plugin and @fhevm/mock-utils setup for local testing
- Explains mocked mode vs real protocol: what each catches and misses
- Covers debug decrypt for inspecting encrypted values during development
- Guides end-to-end validation on testnet before mainnet deployment
install this skill
npx skills add z-korp/fhevm-cookbook --skill fhevm-testingRepo path: skills/fhevm-testing/SKILL.md
fhevm-token-registry
Looking up official Zama confidential token deployments, wrappers registry addresses, decimals, and safe indexer start blocks on Sepolia or mainnet.
fhevm-token-registry
Looking up official Zama confidential token deployments, wrappers registry addresses, decimals, and safe indexer start blocks on Sepolia or mainnet.
what it covers
- Looks up official plain-token and confidential-token addresses by network
- Keeps `c*` token decimals and start blocks aligned with the right deployment
- Uses the wrappers registry as the canonical validation layer for official confidential tokens
- Prevents wrong-network or wrong-token wiring in apps, indexers, scripts, and test fixtures
install this skill
npx skills add z-korp/fhevm-cookbook --skill fhevm-token-registryRepo path: skills/fhevm-token-registry/SKILL.md
Security & compliance · 1
fhevm-security-audit
Auditing and reviewing confidential contracts: ACL flow verification, silent fallback tracing, handle lifecycle, and a catalog of common footguns.
fhevm-security-audit
Auditing and reviewing confidential contracts: ACL flow verification, silent fallback tracing, handle lifecycle, and a catalog of common footguns.
what it covers
- Provides a systematic audit checklist for FHEVM contracts
- Traces ACL permission flows across multi-step operations
- Catalogs known footguns: missing ACL, silent zero, wrong unwrap, handle reuse
- Covers arithmetic constraint verification and overflow behavior
install this skill
npx skills add z-korp/fhevm-cookbook --skill fhevm-security-auditRepo path: skills/fhevm-security-audit/SKILL.md
Advanced patterns · 2
fhevm-frontend-integration
Integrating the Zama SDK into web apps: React, Next.js, relayer setup, SSR boundaries, and browser-side encryption.
fhevm-frontend-integration
Integrating the Zama SDK into web apps: React, Next.js, relayer setup, SSR boundaries, and browser-side encryption.
what it covers
- Shows @zama-fhe/react-sdk and @zama-fhe/sdk setup in React and Next.js
- Explains SSR boundaries: SDK must run client-side only
- Covers relayer SDK integration for reencryption and decryption
- Guides WalletConnect vs Privy auth patterns for different user bases
install this skill
npx skills add z-korp/fhevm-cookbook --skill fhevm-frontend-integrationRepo path: skills/fhevm-frontend-integration/SKILL.md
fhevm-cross-contract
Passing encrypted handles between contracts: multi-contract ACL flows, DeFi composability, and permission chain patterns.
fhevm-cross-contract
Passing encrypted handles between contracts: multi-contract ACL flows, DeFi composability, and permission chain patterns.
what it covers
- Explains how to pass encrypted handles across contract boundaries
- Shows multi-contract ACL grant chains: allowTransient for immediate forwarding
- Covers factory and proxy patterns that preserve encrypted state
- Guides composable DeFi flows where encrypted values traverse multiple protocols
install this skill
npx skills add z-korp/fhevm-cookbook --skill fhevm-cross-contractRepo path: skills/fhevm-cross-contract/SKILL.md
ERC7984 · 4
Confidential token layer: tokens, compliance, governance, and custodian patterns built on top of FHEVM.
Core FHE mechanics · 1
oz-erc7984-confidential-tokens
Designing, implementing, or reviewing ERC7984 confidential tokens, especially wrappers, operators, transfer variants, and unwrap correctness.
oz-erc7984-confidential-tokens
Designing, implementing, or reviewing ERC7984 confidential tokens, especially wrappers, operators, transfer variants, and unwrap correctness.
what it covers
- Frames ERC7984 around token, caller, decryption, and proof-verification boundaries
- Calls out operator semantics instead of drifting back to ERC20 allowance mental models
- Keeps unwrap flows honest as async decrypt-and-verify, not single-step plaintext settlement
- Maps custom designs back to the smallest OpenZeppelin confidential token module set
install this skill
npx skills add z-korp/fhevm-cookbook --skill oz-erc7984-confidential-tokensRepo path: skills/oz-erc7984-confidential-tokens/SKILL.md
Security & compliance · 1
oz-erc7984-compliance-patterns
Implementing regulatory compliance on confidential tokens: observer access, freezing, blocklists, RWA controls, and institutional adoption patterns.
oz-erc7984-compliance-patterns
Implementing regulatory compliance on confidential tokens: observer access, freezing, blocklists, RWA controls, and institutional adoption patterns.
what it covers
- Maps OpenZeppelin compliance modules: ObserverAccess, Freezable, Restricted, Rwa
- Explains selective transparency for auditors without breaking user privacy
- Covers force-transfer, pause, and encrypted freeze amount mechanics
- Guides institutional adoption: how to satisfy regulators while preserving confidentiality
install this skill
npx skills add z-korp/fhevm-cookbook --skill oz-erc7984-compliance-patternsRepo path: skills/oz-erc7984-compliance-patterns/SKILL.md
Advanced patterns · 2
oz-erc7984-confidential-governance
Confidential governance: ERC7984Votes, encrypted voting power, public delegation, private ballot casting, and tally patterns.
oz-erc7984-confidential-governance
Confidential governance: ERC7984Votes, encrypted voting power, public delegation, private ballot casting, and tally patterns.
what it covers
- Explains ERC7984Votes: delegation is public but voting power stays encrypted
- Shows private ballot casting without revealing token holdings
- Covers tally and reveal patterns for confidential vote counting
- Guides integration with existing DAO governance frameworks
install this skill
npx skills add z-korp/fhevm-cookbook --skill oz-erc7984-confidential-governanceRepo path: skills/oz-erc7984-confidential-governance/SKILL.md
oz-erc7984-custodian-omnibus
Omnibus and custodian patterns: ERC7984Omnibus, sub-account management, exchange custody, and reconciliation under encryption.
oz-erc7984-custodian-omnibus
Omnibus and custodian patterns: ERC7984Omnibus, sub-account management, exchange custody, and reconciliation under encryption.
what it covers
- Explains ERC7984Omnibus for managing sub-accounts under one on-chain address
- Shows exchange deposit and withdrawal flows with encrypted amounts
- Covers per-user accounting within omnibus wallets
- Guides reconciliation and audit patterns under encrypted custodian state
install this skill
npx skills add z-korp/fhevm-cookbook --skill oz-erc7984-custodian-omnibusRepo path: skills/oz-erc7984-custodian-omnibus/SKILL.md
OZ Utilities · 1
OpenZeppelin confidential-contracts helper libraries: safe arithmetic, handle access, and building blocks shared across ERC7984 modules.
Operations · 1
oz-utils-safemath
Overflow-safe encrypted arithmetic with the OpenZeppelin FHESafeMath library: tryIncrease, tryDecrease, tryAdd, trySub, uninitialized-handle semantics, and when to prefer it over raw FHE.add/sub.
oz-utils-safemath
Overflow-safe encrypted arithmetic with the OpenZeppelin FHESafeMath library: tryIncrease, tryDecrease, tryAdd, trySub, uninitialized-handle semantics, and when to prefer it over raw FHE.add/sub.
what it covers
- Wraps raw FHE.add/sub with encrypted success flags so overflow does not corrupt balances
- Distinguishes tryIncrease/tryDecrease (fall back to old value) from tryAdd/trySub (fall back to zero)
- Explains uninitialized-handle semantics so mappings with unset slots stay correct
- Calls out the ACL plumbing the library does NOT do for you
install this skill
npx skills add z-korp/fhevm-cookbook --skill oz-utils-safemathRepo path: skills/oz-utils-safemath/SKILL.md