> ## Documentation Index
> Fetch the complete documentation index at: https://fhenix-docs-broken-sample-fixes.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Fhenix Toolkit for Claude Code

> Install the fhenix-toolkit plugin so Claude Code writes, tests, and reviews CoFHE code against the current FHE.sol and @cofhe/sdk

[fhenix-toolkit](https://github.com/FhenixProtocol/fhenix-toolkit) is a Claude Code plugin maintained by Fhenix. It teaches the assistant the rules that make confidential contracts work. Those include `FHE.select` instead of branching on an `ebool`, the access control calls a stored value needs, which decryption flow fits a feature, and how to test against the mocks. Use it when you build with `FHE.sol` or `@cofhe/sdk` in Claude Code.

The plugin carries concepts, decision trees, and a catalog of known mistakes. Function signatures, SDK methods, error codes, and deployed addresses are looked up live from the public Fhenix repositories when they are needed. The guidance therefore tracks new releases instead of freezing at one API version.

## Install

<Steps>
  <Step title="Add the marketplace and install the plugin">
    In a Claude Code terminal session:

    ```text theme={null}
    /plugin marketplace add FhenixProtocol/fhenix-toolkit
    /plugin install fhenix-toolkit
    ```

    In the Claude Code desktop app, open Customize, then Personal Plugins, add the marketplace `FhenixProtocol/fhenix-toolkit`, sync, and add the Fhenix Toolkit plugin.
  </Step>

  <Step title="Ask for something confidential">
    Each skill activates on its own when the context matches, so there is nothing to invoke by hand. Try:

    * "Help me write a confidential ERC-20."
    * "Audit this `FHE.sol` contract."
    * "Write Foundry tests for this encrypted auction."
  </Step>
</Steps>

<Check>
  When the plugin is active, Claude refuses to write `if (FHE.gt(a, b))` and routes the comparison through `FHE.select`. That is the quickest way to confirm it loaded.
</Check>

## What the plugin does

| Skill | Activates on | What it brings |
| - | - | - |
| `fhenix-contracts` | Solidity files that import `FHE.sol` or use `euint*`, `ebool`, or `eaddress` | The hard rules (`FHE.select`, the allow cascade, no encrypted `mul` or `div` where a shift will do), the access control verbs, the decryption flow choices, and a picker for confidential token standards |
| `fhenix-sdk` | Files that import `@cofhe/sdk` or use the `useCofhe*` hooks | The client initialization recipe, `decryptForView` versus `decryptForTx`, the Access Control Permission (ACP) lifecycle, and the encrypted input cast |
| `fhenix-review` | Pull request reviews and "is this safe" questions | A catalog of more than thirty known mistakes, a security checklist, and an audit lens for access control and decryption flows |
| `fhenix-tests` | Test files that import `FHE.sol` or `@cofhe/sdk` | Foundry mocks versus the Hardhat plugin, encrypted input fixtures, decryption flow tests, and the places where mocks and production diverge |

The `fhe-reviewer` subagent backs `fhenix-review` for large diffs and pre-launch audits. It loads the full catalog into a fresh context, walks the code function by function, and returns a prioritized report.

## Using other assistants

The skills are Markdown files under `plugins/fhenix-toolkit/skills/` in the repository. If you work in Cursor, ChatGPT, or another assistant, load the `SKILL.md` for the area you are working in as context, along with its `references/` folder. Every page on this site also carries a menu to open it in ChatGPT, Claude, or Cursor. That is the fastest way to give an assistant the current documentation for one topic.

For prompting techniques that work with any assistant, see [build with AI](/get-started/build-with-ai/build-with-ai).

## Status and feedback

The plugin is public and pre-1.0. Coverage gaps are tracked in the repository's `docs/known-flaws.md`. Report problems or suggest additions by opening an issue on the [fhenix-toolkit repository](https://github.com/FhenixProtocol/fhenix-toolkit/issues).
