Claude Code

Install

/plugin marketplace add theguysaccount/bitcursor-crypto-coding-client
/plugin install chain-preflight@chain-preflight

or from a terminal:

claude plugin install chain-preflight --marketplace theguysaccount/bitcursor-crypto-coding-client

Restart Claude Code so the hook loads. It needs Node.js 18+ on your PATH.

What you get

PartNameWhat it does
Skillsolidity-securityRules Claude follows when it writes or reviews .sol files
Skillanchor-securityRules for Anchor programs under programs/
Command/chain-preflight:audit [path]Scans, explains each high and medium finding, proposes fixes
Command/chain-preflight:predeployWalks through a pre-deploy checklist
HookPreToolUse on BashScans before deploy commands; asks or blocks per the policy
binpreflight.mjsThe CLI, for the skills and for you

What happens when Claude deploys

Say Claude runs forge script script/Deploy.s.sol --rpc-url $MAINNET_RPC --broadcast. Before the command runs, the hook:

  1. sees a broadcast to an RPC URL it can't classify (an environment variable), so treats it as unknown;
  2. scans the project: quick checks, then Slither and Solhint if they're installed (and Aderyn, if you still have it);
  3. saves .chain-preflight/latest.md;
  4. if there are high-severity findings, asks you in Claude Code's permission prompt, with the reason; Claude also gets the summary and the report path.

For a mainnet RPC with high findings, the command is blocked; Claude sees why and proposes fixes. Local deploys (anvil, hardhat in-process, localnet) run without a scan.

The hook never approves anything on its own: when it has no concern, Claude Code's normal permission rules apply.

Notes

  • The first Slither run on a project can take a minute while it compiles. The hook's timeout is ten minutes; analyzerTimeoutSeconds limits each analyzer.
  • If the scan fails (for example, the project doesn't compile), the deploy isn't blocked, and Claude is told the check couldn't run.
  • Nothing leaves your machine. The plugin doesn't sign, deploy, hold keys or give financial advice.