Free and open source · Claude Code, Cursor, CLI, GitHub Action

Your coding agent writes the contract. Preflight checks it before it ships.

Chain Preflight gives AI coding agents Solidity and Anchor security rules to follow while they write, and a pre-deploy hook that scans your contracts with open-source analyzers (Slither, Solhint, cargo-audit) the moment a deploy command runs. Mainnet deploys with high-severity findings are stopped until a person decides.

Runs on your machine. No account, no token, no trading, no financial advice: a code-safety tool for developers.

$ forge script script/Deploy.s.sol --rpc-url mainnet --broadcast

Chain Preflight blocked `forge script` to mainnet: 7 high and 1 medium-severity findings.

Fix them, or set "highOnMainnet": "ask" in .chain-preflight.json to decide yourself.

- [high] Initializer anyone can call
    src/VulnerableVault.sol:11
- [high] State written after an external call (reentrancy)
    src/VulnerableVault.sol:24
- [high] Privileged function without access control
    src/VulnerableVault.sol:28
- [high] tx.origin used for authorization
    src/VulnerableVault.sol:29
…
Full report: .chain-preflight/latest.md

Generated when this site was built, by running the hook's own code on the project's deliberately vulnerable sample contract (quick checks only; installed analyzers add more).

How it works

1

Rules while it writes

Skills for Claude Code and rules for Cursor teach the agent the patterns that lose funds: access control, reentrancy, unchecked calls, oracle manipulation, signature replay, missing signers, arbitrary CPIs.

2

A scan before every deploy

When the agent runs forge script --broadcast, hardhat … --network, anchor deploy or solana program deploy, the hook scans the project first: 23 built-in quick checks plus whichever analyzers you have installed.

3

A human decides

Local deploys run untouched. Testnet deploys with high findings ask you first. Mainnet deploys always ask, and are blocked when high findings remain. The agent gets the report and proposes fixes.

Install

Claude Code

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

Then /chain-preflight:audit any time. The hook runs on its own. Details

Cursor

Import the repository as a plugin (it has a Cursor marketplace manifest with the hook, skills and rules), or add the hook to .cursor/hooks.json by hand. Cursor setup

Command line

npx -y github:theguysaccount/bitcursor-crypto-coding-client#v0.1.1 scan .

Exit code 1 on high findings. doctor shows which analyzers are installed. CLI docs

GitHub Actions

- uses: theguysaccount/bitcursor-crypto-coding-client@v0.1.1
  with:
    fail-on: high

Put it in front of your deploy job. Workflow example

What it is, and isn't

  • A safety net for developers and their coding agents: pattern checks, open-source analyzers, and a human checkpoint before deploys.
  • Not an audit. Static analysis finds known bug classes; it can't prove a contract is safe. Get a professional audit before deploying code that will hold value.
  • Not a wallet, a token, a trading tool or financial advice. It never sees keys, signs or sends transactions, and sends nothing anywhere.

Limits and false positives · All 23 rules · Analyzers and versions