nickthelegend/fhenix-skills/fhenix-encrypted-comparisons

Claude Code and agent skill by nickthelegend/fhenix-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Encrypted comparisons returning ebool — eq/ne (all types incl. eaddress), lt/lte/gt/gte and min/max (euint8..128). Comparisons can't branch directly; pair the ebool with FHE.select. Covers operand-type rules and the bid/threshold pattern.

Install

npx vskill@latest install nickthelegend/fhenix-skills/fhenix-encrypted-comparisons

SKILL.md

The same SKILL.md was published earlier as nickthelegend/fhenix-skills/fhenix-encrypted-comparisons.

Fhenix Encrypted Comparisons

Overview

Comparisons evaluate homomorphically and return an `ebool` (encrypted boolean) — you can't read the result directly. To act on it, feed the ebool into FHE.select (see fhenix-encrypted-conditionals).

FunctionResultOperand types
eq / neeboolall encrypted types including `eaddress`
lt / lte / gt / gteebooleuint8…128
min / maxeuintXXeuint8…128
solidity
ebool isHigher = FHE.gt(newBid, highestBid);
ebool sameAddr = FHE.eq(owner, candidate); // eaddress equality
euint32 higher = FHE.max(newBid, highestBid);

Comparisons + select (the core pattern)

solidity
// Keep the larger bid without revealing either value
ebool isHigher = bid.gt(highestBid);
euint32 newHigh = FHE.select(isHigher, bid, highestBid);
FHE.allowThis(newHigh);
highestBid = newHigh;

Eligibility / threshold example

solidity
function isEligible(euint32 reputation) public returns (ebool) {
ebool ok = FHE.gte(reputation, FHE.asEuint32(MIN_REP));
FHE.allowThis(ok);
return ok; // reveal later via decrypt flow if needed
}

Common pitfalls

  • Trying to `if`/`require` on an `ebool` — impossible; it's encrypted. Use FHE.select and resolve true/false off-chain via decryption when you must branch.
  • Ordering ops (lt/gt/min/max) on ebool/eaddress — unsupported; only eq/ne apply there.
  • Mismatched widths — convert first.

Source docs

AI Agent Prompt

"Implement a private auction placeBid(InEuint32) that compares the new bid to the stored highest with FHE.gt, updates via FHE.select, and re-grants ACL — never branching on the encrypted comparison."

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Grok Build (Cursor)
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/nickthelegend/fhenix-skills/fhenix-encrypted-comparisons/badge)](https://verified-skill.com/skills/nickthelegend/fhenix-skills/fhenix-encrypted-comparisons)

Something wrong with this skill or its page? Tell us.