usmananwar11

ChainSec — Security skill for Claude Code

Security community

ChainSec is a multi-chain smart-contract security audit skill pack for AI coding agents like Claude Code, OpenCode, Codex, Antigravity, Hermes, etc. It has one shared audit engine and one pack per.

How to install ChainSec

This entry records only its repository, not the path inside it, so there is no exact command to give. Open usmananwar11/ChainSec and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What ChainSec does

ChainSec is a multi-chain smart-contract security audit skill pack for AI coding agents like Claude Code, OpenCode, Codex, Antigravity, Hermes, etc. It has one shared audit engine and one pack per chain.

Alternatives in Security

  • /web3 Audit — Smart contract security audit using the 10-bug-class methodology 927 ★
  • Bountyforge — All-round bug bounty skill for Claude Code parallelized agents for smart contract audits (EVM, Move, Solana, T 399 ★
  • Airsec — Find Security Issues in your code by using coding CLIs like Claude, Codex & CommandCode 162 ★

README

ChainSec

Multi-chain smart-contract security audits for AI coding agents (Claude Code, OpenCode, Codex, Antigravity, and other tools that load Agent Skills from a folder).

One audit engine, one pack per chain. Solidity, Starknet Cairo (preview) and Stellar Soroban (preview) today.

What it does

`chainsec-audit` runs a fixed pipeline against your repository:

  1. Preflight — checks the chain's required/optional tools and stops or degrades gracefully.
  2. Fact extraction — compiler-based facts via forge build (Solidity). Regex mode applies when forge build fails or there is no foundry.toml (e.g. Hardhat-only projects); forge is still required. Soroban: a source parser builds the facts, and a time-limited cargo check records whether the project compiles.
  3. Deterministic risk scoring — ranks files by risk from the extracted facts.
  4. Recon — protocol summary, actors, invariants, known issues.
  5. Detection — an unrestricted Pass 1 sweep, then four parallel lenses (A access/state, B value/economic, C external, D edge/math), a consensus merge, and a Pass 3 "what's missing" sweep.
  6. Rescan — a further pass over the merged candidates.
  7. Per-unit deep dives — one focused pass per cluster of units (skipped with --quick).
  8. State-inconsistency analysis — cross-function/cross-transaction state bugs (skipped with --quick).
  9. Verification — kill gates A–H plus the Impact Premise, applied to every candidate.
  10. Code-enforced validation — scripts/validate-findings.py checks the verdicts against the finding schema before anything is reported.
  11. Report — a markdown report and a findings.json per chain, merged across chains.

Supported chains

Chain Status
Solidity Supported
Cairo (Starknet) Preview: Cairo 1+, benchmark in progress
Soroban (Stellar) Preview: soroban-sdk ≥ 20; smoke test and contest benchmark pending (details)