Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Slither

$ slither Official Low Risk
Trail of Bits · Security & Secrets · AGPL-3.0 · macos / linux / windows

Slither (slither) performs fast AST, SSA, and dataflow vulnerability analysis on Solidity and Vyper smart contracts, supporting Foundry, Hardhat, Truffle, and standalone .sol files. Passing --json - streams structured detector findings to stdout, while --exclude-informational and --detect keep agent audits concise.

FCRS-1.0 Score
87 /100
Good
Medium Confidence
Zero-Friction Install
pip install slither-analyzer
CLI vs MCP Decision CLI Preferred vs MCP

Running slither . --json - directly in a Foundry or Hardhat workspace leverages local solc toolchains without shipping entire contract trees over MCP.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

Supports --json - stdout streaming, --sarif, --detect, --exclude-informational, and --list-detectors self-discovery.

  • --json - streams structured detector output to stdout
  • Granular --detect, --exclude-low, and --exclude-informational filters
Trust & Safety 21 / 25

Static analyzer that never deploys or broadcasts transactions, though it invokes solc / Foundry / Hardhat build commands locally.

  • Purely local static analysis; compilation writes project build artifacts
Setup & Portability 12 / 15

Installs cleanly via pip install slither-analyzer, though projects require matching solc versions (usually via solc-select).

  • PyPI package plus external solc compiler dependency
Utility & Efficiency 14 / 15

Industry-standard Solidity static analyzer with 90+ detectors, printers (human-summary, call-graph), and upgradeability checks.

  • Deep Solidity/Vyper IR (SlithIR) analysis across Foundry and Hardhat
Maintenance & Lineage 9 / 10

Official Trail of Bits (crytic/slither) security engineering tool with active releases.

  • Trail of Bits Crytic organization
Docs & Verifiability 8 / 10

Well-documented detector catalog, printer guide, and framework wiki on GitHub.

  • Comprehensive detector docs in crytic/slither/wiki

Security, Auth & Guardrails

Auth Modes
No Auth Env API Key
Credential Storage

Local contract auditing requires no credentials; fetching verified on-chain contracts uses --etherscan-apikey or ETHERSCAN_API_KEY.

Side Effects
Read-Only Local Write
Cost & Quotas

100% free, offline, and open-source (AGPL-3.0) for local audits.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Slither Agent Rules
- Always pass `--json -` (note the trailing `-` for stdout) and `--exclude-informational` to keep output structured and concise.
- Verify the matching `solc` compiler version is active via `solc-select` before diagnosing compilation errors.
- Remember Slither invokes Foundry/Hardhat compilation in the repo, which updates local `out/` or `artifacts/` directories.

Agent-Ready Command Recipes

Safe Read-Only Queries

Audit smart contracts and stream JSON to stdout
slither . --json - --exclude-informational --exclude-low

Runs Slither detectors while filtering low/informational noise and writes JSON findings to stdout (-).

List available vulnerability detectors
slither --list-detectors

Prints all built-in detectors with severity and confidence metadata without compiling contracts.

Controlled Writes & Previews

Export SARIF findings report
slither . --sarif slither-results.sarif

Writes a SARIF v2.1.0 report to slither-results.sarif for CI code scanning.

Strengths for Agents

  • + Native --json - stdout streaming and --sarif export with severity/detector filtering.
  • + Deep Solidity/Vyper IR analysis with native Foundry, Hardhat, and solc integration.

Caveats & Pitfalls

  • ! Requires the exact solc version matching the contract pragma (often needing solc-select).
  • ! Running slither . triggers project compilation, which may fail on unbuilt workspaces or write build artifacts.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI