/zama-protocol:zama-solidityfrom zama-protocol
Write, review, or debug confidential Solidity on Zama FHEVM — encrypted types, ACL, public decryption, ERC-7984 tokens, Hardhat/Foundry setup, and HCU cost for auctions, escrow, swaps, and batchers.
Ships in zama-protocol. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Load zama-protocol first. Open a reference only when the task needs it:
| Task | Read |
|---|---|
| Tokens, payments, escrow, wrappers | references/erc7984.md |
| Public reveals, operation limits, tests vs production | references/fhe-advanced.md |
| Design and cost, learning from deployed apps | references/code-map.md |
| Project setup | references/setups/hardhat.md or references/setups/foundry.md |
Complete, maintained contracts with tests are in the Zama code examples. Start from the closest one, such as the sealed-bid auction or the ERC-7984 to ERC-20 swap, and check it against the rules below: examples can lag the current API.
Ordinary Solidity safety still applies: checks-effects-interactions, nonReentrant around token calls, and access control.
FHE.fromExternal(input, proof) works only in the contract the client encrypted for. To pay with it, call FHE.allowTransient(amount, address(token)), then token.confidentialTransferFrom(msg.sender, address(this), amount). Passing the input and proof on to the token fails. Grant the same temporary access before handing a stored handle to another contract.
Credit the amount the transfer returns, never the amount requested: an ERC-7984 transfer the sender cannot pay moves an encrypted zero instead of reverting.
FHE.selectif, require and revert cannot read an encrypted condition. Compute both values and pick one with FHE.select(condition, a, b). Nothing reverts on the encrypted outcome.
Each operation returns a new handle that nobody can use after the transaction. Call FHE.allowThis on handles you store and FHE.allow(handle, user) for users who should read them. When a function accepts an existing handle as an argument, check FHE.isSenderAllowed(handle).
Mark the handle with FHE.makePubliclyDecryptable and store it. Accept the clear value only through FHE.checkSignatures against that stored handle, never one the caller passes, and advance a stage so settlement runs once. Reveal only what settlement needs: an auction can reveal the winner and pay the seller the encrypted price. references/fhe-advanced.md has the full flow.
FHEInherit the config for your chain from @fhevm/solidity/config/ZamaConfig.sol, for example contract Auction is ZamaEthereumConfig. Proxies and clones skip constructors, so call FHE.setCoprocessor(ZamaConfig.getEthereumCoprocessorConfig()) in their protected initializer.
FHE.div and FHE.rem need a plaintext divisor. A bounded random value needs a power-of-two bound. Arithmetic wraps on overflow, so bound values where it matters. Use the smallest type that fits and plaintext operands for public values. Check the installed FHE.sol or the function reference for supported overloads.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
zama, fhevm, confidential-solidity, encrypted-contracts, erc7984
Other plugins' skills for the same job
npx claudepluginhub zama-ai/skills --plugin zama-protocol3 skills in this plugin
/zama-protocolExplain or plan Zama FHEVM applications — encrypted state, handles, access control (ACL), decryption, costs, package choice and deployed addresses. Load first for any Zama Solidity or TypeScript work, then load zama-solidity for contracts or zama-typescript for client code./zama-typescriptBuild, review, or debug TypeScript or JavaScript clients for Zama FHEVM with @zama-fhe/sdk and @zama-fhe/react-sdk — encrypting inputs, decrypting results, permits, ERC-7984 tokens (shield, unshield, transfer), operators, wagmi/viem/ethers, browser apps and Node services. Load zama-protocol first; use zama-solidity for contracts.