fhenix-review

fhenix-review is a skill for Claude Code from FhenixProtocol/fhenix-toolkit. It costs 118 tokens per session (1,178 once invoked), scanned A, original, MIT.

A code-review checklist for Fhenix confidential applications, which use encrypted values in smart contracts and TypeScript apps.

In plain words
What is it for?
Use it when reviewing FHE.sol contracts or @cofhe/sdk code, including pull requests and audit work involving encrypted state, permissions, decryption, and transaction privacy.
Why use it?
It helps find access-control mistakes, incorrect decryption flows, accidental plaintext leaks, invalid branching on encrypted values, and privacy claims that confuse confidentiality with anonymity.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents; mentions Claude Code.

Part of the fhenix-toolkit plugin — 4 skills, 1 agent shipped together

Good fit Use it when reviewing FHE.sol contracts or @cofhe/sdk code, including pull requests and audit work involving encrypted state, permissions, decryption, and transaction privacy.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fhenixprotocol/fhenix-toolkit/fhenix-review
Install

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.

Any agent
npx skills add FhenixProtocol/fhenix-toolkit --skill fhenix-review
Clone the repo
git clone --depth 1 https://github.com/FhenixProtocol/fhenix-toolkit

Made for: Claude Code.

Or install fhenix-toolkit, the plugin that ships this one along with the rest of its 4 skills, 1 agent.

Wrote 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.

agentmods badge for fhenix-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/fhenixprotocol/fhenix-toolkit/fhenix-review.svg)](https://agentmods.dev/skills/fhenixprotocol/fhenix-toolkit/fhenix-review)
Your own site
<a href="https://agentmods.dev/skills/fhenixprotocol/fhenix-toolkit/fhenix-review"><img src="https://agentmods.dev/badge/skills/fhenixprotocol/fhenix-toolkit/fhenix-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,178 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00118 $0.01178
Opus 5 $0.00059 $0.00589
Sonnet 5 $0.00024 $0.00236
Haiku 4.5 $0.00012 $0.00118

Measured 8d ago against content hash 374fd3fddb48, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

fhenix-review 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 8d 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.

plugins/fhenix-toolkit/skills/fhenix-review/SKILL.md · 66 lines

How it starts

The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.

fhenix-review — audit confidential code

This skill is for review contexts. The companion skills fhenix-contracts and fhenix-sdk already activate when editing FHE code; this one layers an audit lens on top of (or instead of) them when the task is review rather than authoring.

What to look for, in order

  1. ACL bugs — missing FHE.allowThis after a stored encrypted write; mismatched ACL pairing (e.g., decryptForTx().withoutPermit() without allowPublic); allowSender granted to an attacker-controlled msg.sender for someone else's handle.
  2. Decrypt-flow mismatchesdecryptForView used where decryptForTx is needed (or vice versa); legacy FHE.decrypt(...) / getDecryptResultSafe(...) references that should have been migrated to the SDK-mediated flow.
  3. Plaintext leakstrivialEncrypt(literal) for secret values; plaintext values stored / emitted alongside their encrypted twins; revert paths that branch on what should be private.
  4. Branching on eboolif (FHE.gt(...)), require(FHE.gt(...)), while (...) — must be FHE.select.
  5. Confidentiality ≠ anonymity — the dApp claims privacy but leaks via gas patterns, event-fact, or tx graph.
  6. Encrypted approval / allowance — anywhere code tries to use ERC-20 approve/transferFrom semantics for ciphertexts.
  7. Randomness sourcingFHE.randomEuintXX used where user-contributed entropy is required (auctions, gifts, fair shuffles).
  8. Input validationInEuintXX accepted without "Proof of Plaintext Input" where the protocol's invariants depend on the cleartext meeting bounds.
  9. Permit hygieneexpiration in milliseconds not seconds; stale per-cycle permits; sharing-permit JSONs leaked publicly.
  10. Standards mixing — ERC20Confidential + FHERC20 + ERC-7984 interoperating in one app without an explicit wrapper.

Full catalog: references/gotchas.md.

Default review workflow

Walk the changed code in this order:

  1. Read the contracts. For each function:
    • Trace every encrypted op → confirm FHE.allowThis(result) if stored.
    • For each allow* call → check the pairing matrix.
    • For each FHE.decrypt → confirm async handling on the read side.
    • For each select → confirm both arms are the same encrypted type and neither leaks.
  2. Read the SDK callsites. For each decryptForView / decryptForTx:
    • Pair with the on-chain allow* for the same handle.
    • Confirm permit expiration is in seconds.
    • Confirm error handling uses CofheError, not Result<T>.
  3. Read the events. Any plaintext leaked? Any event whose mere occurrence reveals private state?
  4. Check the threat model, even informally. What's the worst observer? What can they see (values, graph, timing, gas)?

Read the full file on GitHub · 66 lines

Changes

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.

  1. 8d ago First seen · 66 lines · 118 tokens per session scan A 374fd3fddb48

Subscribe to this mod's changes

fhenix-review is a skill published in the GitHub repository FhenixProtocol/fhenix-toolkit (12 stars, last pushed 3mo ago), licensed MIT. It adds 118 tokens to every session and 1,178 once invoked, about $0.0006 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-30.