/SKILL.md
Analyze onchain activity across EVM networks using HyperSync for historical data, RPC for current state, Etherscan for ABI lookup, and CoinGecko for pricing. Use when users ask to decode transactions, trace token flow, query contract state, compute balances from logs, identify event emitters, or produce reproducible protocol-level analysis with commands and evidence.
npx skillsauth add lutr0/chain-analyst chain-analystInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill to produce reproducible blockchain analysis from raw chain data.
Resolve the skill path first:
for d in .agents .deepagents .claude .cursor .codex .opencode; do
[ -f "$d/skills/chain-analyst/SKILL.md" ] && SKILL="$d/skills/chain-analyst" && break
done
Run the minimum-viable tool for each task:
# Analyze one tx end-to-end (tx/logs/traces + ABI fetch attempts)
bash "$SKILL/scripts/analyze-tx.sh" <tx_hash> [network]
# Query historical data with HyperSync
# output mode: stream (default) or aggregate
bash "$SKILL/scripts/hypersync-query.sh" <network> <query.json> [max_pages] [stream|aggregate]
# Query current contract state via RPC
bash "$SKILL/scripts/query-contract.sh" <method> <contract> [args...] [network]
# Fetch verified ABI
bash "$SKILL/scripts/get-contract-abi.sh" <address> [network]
# Fetch current or historical token price
bash "$SKILL/scripts/get-token-price.sh" <coin_id> [currency] [dd-mm-yyyy]
# Batch contract reads
bash "$SKILL/scripts/multicall.sh" <network> <calls.json>
Set required keys in a .env or .env.local file:
HYPERSYNC_API_TOKEN (required)ETHERSCAN_API_KEY (required)COINGECKO_API_KEY (optional)Scripts search these locations in order (last found value wins):
.env / .env.local.env / .env.localUse only KEY=VALUE lines in env files. Scripts treat env files as data and do not execute shell expressions.
Use this decision order:
analyze-tx.sh for a single transaction investigation.hypersync-query.sh for historical searches over logs/traces/transactions.query-contract.sh for latest state reads.multicall.sh when reading many contracts/methods in one run.HyperSync can query across millions of blocks in one request. Build queries using three top-level filters — transactions, logs, and traces — each narrowed by fields like address, topic, from/to.
Transaction queries:
transactions.from or transactions.to (or both as separate entries for union)transactions.to = contract addressLog queries (ERC20 Transfer(address,address,uint256) emits topic0 = signature hash, topic1 = from, topic2 = to — pad addresses to 32 bytes):
topics[0] = Transfer hash, topics[2] = padded recipienttopics[0] = Transfer hash, topics[1] = padded senderlogs.address = token contract to any Transfer filtertopics[0] = Swap event hash, logs.address = pooltopics[0] = Transfer hash, topics[1] = zero addresslogs.address = contract (no topic filter)Trace queries:
traces.to = contract, traces.call_type = ["call", "delegatecall"]traces.kind = ["create"]See references/hypersync-api.md for full query structure, field names, and ready-made recipes.
Built-in networks (with aliases): ethereum (eth, mainnet), base, arbitrum, optimism (op), polygon (matic).
For any other EVM chain, pass its canonical lowercase name directly (e.g. scroll, zksync, bsc, linea, avalanche). The scripts resolve URLs using these patterns:
https://{name}.hypersync.xyzhttps://{name}.drpc.orgFor ABI lookup via get-contract-abi.sh, chains outside the top 5 require a numeric chain ID instead of a name. Look up the chain ID at https://chainlist.org if needed.
For every final answer, include:
Use assets/analysis-report-template.md when you need a structured report.
Read references selectively:
references/hypersync-api.md when building or debugging HyperSync queries.references/etherscan-api.md when ABI lookup fails or chain ID mapping is unclear.references/coingecko-api.md when coin IDs/currencies or historical endpoints are uncertain.Before returning conclusions:
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.