Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/zunmax/fhevm-skill/fhevm-frontendgit clone --depth 1 https://github.com/zunmax/fhevm-skillWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00536 | $0.04780 |
| Opus 5 | $0.00268 | $0.02390 |
| Sonnet 5 | $0.00107 | $0.00956 |
| Haiku 4.5 | $0.00054 | $0.00478 |
Grade A, and why
fhevm-frontend scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 337 lines — stays where its author put it; the contents beside it link to each section on GitHub.
FHEVM Frontend SDK Rules
SDK Choice (NEW vs LEGACY)
Two SDK families ship from npm; both are supported.
- New high-level SDK (
@zama-fhe/sdk@^3.0.0+@zama-fhe/react-sdk@^3.0.0,node >= 22): use for confidential ERC-7984 dApps. ProvidesZamaSDKorchestrator,TokenAPI (shield / unshield / confidentialTransfer / balanceOf), session model with one-signature decrypt unlock,RelayerWeb/RelayerNode/RelayerCleartext, signer adapters (ViemSigner/EthersSigner/WagmiSigner), storage adapters, delegated decryption, activity feeds, 59 React hooks. Detail in.cursor/references/zama-sdk-overview.mdand the otherzama-sdk-*.mdfiles. - Legacy primitive SDK (
@zama-fhe/[email protected]exact): use for rawcreateInstance/createEncryptedInput/createEIP712against custom non-ERC-7984 confidential contracts (voting, sealed auctions). Still required as a transitive install for the contract toolchain. This file's lower sections cover its surface.
Encrypt + Decrypt Quick Reference (new SDK)
/* Encrypt user input (browser, React) - "use client" required in Next.js */
import { useEncrypt } from "@zama-fhe/react-sdk";
const { mutateAsync: encrypt } = useEncrypt();
const { handles, inputProof } = await encrypt({
values: [{ value: 1000n, type: "euint64" }],
contractAddress, userAddress,
});
/* Decrypt confidential token balance - one EIP-712 prompt, then silent. Returns bigint. */
const balance = await token.balanceOf();
const handle = await token.confidentialBalanceOf(); /* raw bytes32 handle */
import { useConfidentialBalance } from "@zama-fhe/react-sdk";
const { data } = useConfidentialBalance({ tokenAddress: cUSDT });
/* Decrypt arbitrary handles (custom contract) */
await sdk.allow([contract.address]);
const values = await sdk.userDecrypt([{ handle, contractAddress: contract.address }]);
const cleartext = values[handle]; /* bare Record */
/* Public decrypt (3-step bound flow) */
import { usePublicDecrypt } from "@zama-fhe/react-sdk";
const { mutateAsync: publicDecrypt } = usePublicDecrypt();
const { clearValues } = await publicDecrypt({ handles: [handle] });
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 337 lines · 536 tokens per session scan A b612047c9de3
fhevm-frontend is a cursor rule published in the GitHub repository zunmax/fhevm-skill (2 stars, last pushed 2mo ago), licensed MIT. It adds 536 tokens to every session and 4,780 once invoked, about $0.0027 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
phantom-wallet
Phantom Connect SDK integration rules for frontend Solana apps (React, React Native, browser).
zama-protocol-zama-typescript--setups-react-wagmi
Detailed reference for react wagmi (zama-typescript skill).
fhevm-frontend
Zama fhEVM frontend integration rules — applies to TypeScript/JavaScript source files. Covers SDK initialization, encryption, re-encryption, and React patterns.
wagmi
Cursor rule "wagmi" from devridge0/basilic-evm, covering wagmi v2 best practices, hooks and state management rules, account connection, smart contract interaction rules and reading from contracts.
frontend-patterns
React/TypeScript patterns for src/ code.
frontend-architecture
Vite + React SPA architecture - directory layout, providers, bundle splitting. Tailwind styling in tailwind.mdc.