fhevm-control-flow

Installation
SKILL.md

FHE Control Flow

Use this skill when writing or reviewing any Solidity logic that needs to branch on encrypted conditions. Normal Solidity control flow does not work with encrypted values. Every if, require, and ternary operator on encrypted state must be replaced with FHE.select for inline encrypted branching, or with an async public-decryption flow if the result must drive plaintext business logic.

When To Use

  • Replacing if/else blocks that depend on encrypted balances or state
  • Replacing require() guards that check encrypted conditions
  • Designing error handling and user feedback for confidential operations
  • Reviewing contracts for illegal branching on encrypted values
  • Planning product UX around silent-failure semantics

Core Mental Model

In standard Solidity, a failed guard often reverts immediately. In FHEVM, a guard that depends

Related skills
Installs
11
First Seen
Apr 14, 2026