/sol-keyscan:sol-keyscanfrom sol-keyscan
Scans source trees and dependencies for committed Solana private keys using keyscan, blocks key commits via pre-commit hook, and checks if an address has been swept using burned-check.
Ships in sol-keyscan. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The sol-sweeper-bots repo ships two read-only, dependency-free Node tools (Node 18+). Neither touches the network for writes, and neither needs a key. They are not published to npm, so run them from a clone:
git clone https://github.com/nirholas/sol-sweeper-bots
Below, $TOOLS is the path to that clone.
node $TOOLS/tools/keyscan/scan.mjs [path ...] # default path is "."
node $TOOLS/tools/keyscan/scan.mjs --staged # only files git has staged
node $TOOLS/tools/keyscan/scan.mjs --json # machine-readable output
It never contacts the network and redacts every hit to the first and last four characters. Exit code 1 means a high-confidence finding, 0 means none, so it can gate a commit or CI step.
| Signal | Confidence |
|---|---|
*.json holding a 64-length byte array (solana-keygen or Phantom export) | high |
| base58 token that decodes to 64 bytes (ed25519 secret key) | high |
*.json holding a 32-length byte array | medium |
| base58 token that decodes to 32 bytes | low (may be a public key; confirm) |
It skips .git, node_modules, target, dist, build, vendor and files over 2 MB. Only high-confidence hits fail the exit code, so read low and medium hits by hand.
Scan a dependency before trusting it:
npm pack some-sdk && tar -xf some-sdk-*.tgz
node $TOOLS/tools/keyscan/scan.mjs package
In the repository to protect:
ln -sf $TOOLS/hooks/pre-commit .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
It runs keyscan on staged files and blocks a commit that adds a key. SKIP_KEYSCAN=1 git commit ... bypasses it; use that only for a confirmed false positive.
node $TOOLS/tools/burned-check/check.mjs <address> [--rpc <url>] [--limit N] [--json]
It reads getBalance, getSignaturesForAddress and getTransaction over public JSON-RPC (default https://api.mainnet-beta.solana.com, --limit default 25) and prints a verdict: LIKELY SWEPT, EMPTY, ACTIVE HISTORY, HOLDS A BALANCE or NO ACTIVITY. An invalid address exits with code 2.
A key that is public is permanently unsafe: bots take any value that reaches its address. Never use, import or fund a wallet whose key you found. If the key is in a published package, report it with docs/disclosure-report.md from the repo. If it is your own, stop using the address and move to a fresh keypair.
node $TOOLS/tools/keyscan/scan.mjs --json . > findings.json; echo "exit $?"
node $TOOLS/tools/burned-check/check.mjs <address-from-a-finding> --json
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub nirholas/sol-sweeper-bots --plugin sol-keyscanOther plugins' skills for the same job