@jaydearcadian/fhevm-agent-skill
v3.7.1
Published
Production-ready SKILL.md + battle-tested contracts enabling AI agents to write, test, and deploy confidential smart contracts using FHEVM
Downloads
19
Maintainers
Readme
@jaydearcadian/fhevm-agent-skill
A full-stack AI agent skill for building FHEVM confidential smart contracts and frontends with Zama.
Install
npm install @jaydearcadian/fhevm-agent-skillPoint your agent at ./node_modules/@jaydearcadian/fhevm-agent-skill/SKILL.md.
What this enables AI agents to do
Load this skill into Claude Code, Cursor, Codex, Hermes, or any skills-compatible agent, and it can:
- Write production-quality FHEVM Solidity contracts from natural language
- Build ERC-7984 confidential tokens, lockbox apps, blind auctions, escrows, task markets
- Wire frontends with encrypt → submit → confirm → decrypt lifecycle
- Debug 8 Silent Zero failures (no error, no revert) that Zama docs don't document
- Test with Hardhat or Foundry — adversarial suites covering 21 Key Rules
- Audit existing Solidity for FHEVM migration readiness
- Deploy to Sepolia testnet with coprocessor-aware configs
What's inside
| File | Purpose |
|------|---------|
| SKILL.md | Core — 21 Key Rules, Silent Zero (8 failures), Debug Triage (11 steps), Verification Checklist (7 items), Intent Router (15 rows) |
| examples/escrow/ | Runnable — ConfidentialEscrow.sol + MockERC7984.sol + 21 passing tests |
| templates/FHEVMContract.sol | Skeleton contract with all boilerplate pre-written |
| templates/fhevm-app-setup.tsx | Pre-patched Next.js + RainbowKit + FHEVM app setup |
| examples/frontend/encrypt-and-bid.tsx | Frontend integration — encrypt flow with retry |
| examples/frontend/reveal-and-claim.tsx | Frontend integration — decrypt flow with tx confirmation |
References (loaded on demand via Intent Router)
| File | Purpose |
|------|---------|
| references/encrypted-types-ops.md | All 6 encrypted types, FHE operations, ACL cheat sheet |
| references/erc7984.md | ERC-7984 token — mint, transfer, public decryption 3-step flow |
| references/fhevm-client.md | Client SDK reference — encrypt, decrypt, transaction lifecycle |
| references/testing-hardhat.md | Hardhat test patterns, mock setup, signer matching |
| references/testing-foundry.md | Foundry FHEVM test guide, FhevmTest helpers |
| references/testing-pitfalls.md | Anti-patterns discovered from real builds |
| references/battle-tested-patterns.md | Patterns that survived adversarial testing |
| references/deposit-credit-line.md | Two-step deposit flow, credit-line tracking |
| references/frontend-setup-guide.md | Diagnostic flow and fix order for frontend issues |
| references/frontend-setup-pitfalls.md | Silent breakers in the fhevmjs integration |
| references/setup-hardhat.md | Hardhat environment scaffold + compile |
| references/setup-foundry.md | Foundry environment setup + configuration |
| references/contract-structure.md | Contract anatomy — imports, initialize, modifiers |
| references/local-chain-architecture.md | Mental model: blockchain, coprocessors, KMS, ACL |
| references/codex-usage.md | Codex CLI sandbox quirks + proven workflow |
| references/distribution.md | Package distribution guidance |
| references/contracts/ | 4 deployable reference contracts (Auction, TaskMarket, PaymentRails, VestingWallet) |
Validated
- 62 passing tests across 5 contracts (Hardhat,
@fhevm/[email protected],@fhevm/[email protected]) - Hermes subagent built ConfidentialScoreTracker from natural language — 61 lines Solidity, 207 lines tests, all passing
- Codex CLI escrow build log — 7 self-corrected errors using Debug Triage, 21/21 tests passing
- Getter leak found and fixed in ConfidentialEscrow via adversarial audit — ACL now enforced on all decrypt paths
Zama Developer Program
Built for the Zama Developer Program Season 2 Bounty Track.
