cosmos-vulnerability-scanner — Claude Code skill: Cosmos SDK audit
Finds vulnerabilities in Cosmos SDK modules and CosmWasm contracts that halt a chain or drain funds. Useful before a network goes live.
npx skills add trailofbits/skills --skill cosmos-vulnerability-scanner -a claude-codeWhat cosmos-vulnerability-scanner does
The skill spawns several scanning agents in parallel, each with its own set of vulnerability patterns, and the main skill writes their findings as individual markdown files into .bughunt_cosmos/. Name a different directory in your prompt and the output goes there instead.
Discovery runs first: a synchronous subagent explores the codebase and returns the versions from go.mod, the list of x/* modules, whether IBC is enabled and which platforms are present. From that the main skill writes CLAUDE.md to the repo root and decides which scanners to launch. Three agents always run — core, state and advanced patterns; the EVM, IBC and CosmWasm scanners join only when discovery found that platform.
Patterns are tied to SDK versions, and that matters: v0.47 dropped GetSigners, v0.50 brought ABCI 2.0, v0.53 deprecated ValidateBasic. Running the patterns without checking go.mod first gets you noise. The skill covers SDK modules, not the CometBFT consensus engine itself, and it is not a substitute for Solidity tooling.
What it helps with
- catch non-determinism that makes validators compute different state roots
- check
msg_serverhandlers andAnteHandlerfor privilege gaps - assess an IBC integration before a channel is opened
- trace a chain halt back to the code that caused it
- filter out false positives in CLI and query code that never touches consensus
Example prompts for the agent
- Scan
x/stakingfor consensus-critical vulnerabilities and write findings to.bughunt_cosmos/ - Review our IBC integrations and save each finding as a separate file in
audit/ - Run a pre-launch security assessment: discovery first, then the parallel scanners
How to install cosmos-vulnerability-scanner
1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill cosmos-vulnerability-scanner -a claude-code2Manually: put the files in place
~/.claude/skills/cosmos-vulnerability-scanner/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/cosmos-vulnerability-scanner/
1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill cosmos-vulnerability-scanner -a codex2Manually: put the files in place
.agents/skills/cosmos-vulnerability-scanner/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill cosmos-vulnerability-scanner -a cursor2Manually: put the files in place
.cursor/skills/cosmos-vulnerability-scanner/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install trailofbits/skills cosmos-vulnerability-scanner2Manually: put the files in place
.github/skills/cosmos-vulnerability-scanner/SKILL.md1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill cosmos-vulnerability-scanner -a gemini-cli2Platform CLI
gemini skills install https://github.com/trailofbits/skills --path plugins/building-secure-contracts/skills/cosmos-vulnerability-scannerManually: put the files in place
.devin/skills/cosmos-vulnerability-scanner/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add trailofbits/skills --skill cosmos-vulnerability-scanner -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about cosmos-vulnerability-scanner
How do I install cosmos-vulnerability-scanner in Claude Code?
Run npx skills add trailofbits/skills --skill cosmos-vulnerability-scanner -a claude-code. The skill lands at ~/.claude/skills/cosmos-vulnerability-scanner/SKILL.md.
What does cosmos-vulnerability-scanner do?
It scans Cosmos SDK modules and CosmWasm contracts for flaws that cause chain halts, state divergence or fund loss. Findings are saved as separate markdown files.
Which Cosmos SDK versions are supported?
The patterns are updated for SDK v0.53.x, and the skill checks versions in go.mod before applying them. Differences between v0.47, v0.50 and v0.53 shape which checks run.