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.
git clone --depth 1 https://github.com/zunmax/fhevm-skillWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/zunmax/fhevm-skill/fhevm-testing)<a href="https://agentmods.dev/rules/zunmax/fhevm-skill/fhevm-testing"><img src="https://agentmods.dev/badge/rules/zunmax/fhevm-skill/fhevm-testing/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/zunmax/fhevm-skill/fhevm-testing"><img src="https://agentmods.dev/badge/rules/zunmax/fhevm-skill/fhevm-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00000 | $0.01910 |
| Opus 5.5 | $0.00000 | $0.00764 |
| Sonnet 5.5 | $0.00000 | $0.00382 |
| Haiku 4.5 | $0.00000 | $0.00191 |
Grade A, and why
fhevm-testing 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 3mo 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 — 173 lines — stays where its author put it; the contents beside it link to each section on GitHub.
FHEVM Hardhat Testing Rules
Setup
import { fhevm } from "hardhat";
import { FhevmType } from "@fhevm/hardhat-plugin";
Test Modes
| Mode | Command | Encryption | Speed |
|---|---|---|---|
| Mock | npx hardhat test |
Simulated | Fast |
| Local node | npx hardhat test --network localhost |
Simulated | Fast |
| Sepolia | npx hardhat test --network sepolia |
Real FHE | Slow |
Encrypting Values
const input = fhevm.createEncryptedInput(contractAddress, signer.address);
input.add64(1000n);
const encrypted = await input.encrypt();
/* encrypted.handles[0] - bytes32 handle (order matches add*() call order) */
/* encrypted.inputProof - shared proof for all handles */
Decrypt Functions - Three Different Signatures
/* euint types - FhevmType IS REQUIRED */
const val: bigint = await fhevm.userDecryptEuint(
FhevmType.euint64, handle, contractAddr, signer
);
/* ebool - NO FhevmType parameter */
const flag: boolean = await fhevm.userDecryptEbool(
handle, contractAddr, signer
);
/* eaddress - NO FhevmType parameter */
const addr: string = await fhevm.userDecryptEaddress(
handle, contractAddr, signer
);
This is the #1 testing mistake: adding FhevmType.ebool to userDecryptEbool by analogy with euint.
Public Decrypt - Same Pattern
const val = await fhevm.publicDecryptEuint(FhevmType.euint64, handle);
const flag = await fhevm.publicDecryptEbool(handle);
const addr = await fhevm.publicDecryptEaddress(handle);
/* No signer or contractAddress needed */
Custom Tasks
Custom Hardhat tasks MUST call await fhevm.initializeCLIApi() before using the fhevm API.
Tests auto-initialize - only tasks need this.
Never Use in Tests
fhevmjs- deprecated, use@fhevm/hardhat-plugin@fhevm/sdk- does not existfhevm.createInstance()- exists on the implementation class but NOT on the public typedHardhatFhevmRuntimeEnvironmentinterface; usefhevm.createEncryptedInput()directly
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.
- 3mo ago First seen · 173 lines · 0 tokens per session scan A 5f240e66e794
fhevm-testing is a cursor rule published in the GitHub repository zunmax/fhevm-skill (2 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,910 tokens. 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.
fhevm-testing compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| fhevm-testingzunmax/fhevm-skill | Cursor rule | 2 | 5mo ago | MIT | A | 0 | Cursor |
| use-contract-ir-factoriesprisma/orm | Cursor rule | 48k | today | Apache-2.0 | A | 0 | Codex, Cursor |
| mockitosanjeed5/awesome-cursor-rules-mdc | Cursor rule | 3.6k | 10d ago | CC0-1.0 | A | 1,653 | Cursor |
| gonavi-goSyngnat/GoNavi | Cursor rule | 2.1k | today | Apache-2.0 | A | 0 | Cursor |
| python-general-coding-standardsholtwood/awesome-cursorrules-zh | Cursor rule | 244 | 1mo ago | MIT | A | 140 | Cursor |
| project-conventionskequach/uniqlo-sales-alerter | Cursor rule | 32 | 5d ago | MIT | A | 1,033 | Cursor |
| unit-testing-standardsadobecom/da-express-milo | Cursor rule | 6 | today | Apache-2.0 | A | 2,431 | Cursor |