Agent Skillsaeonfun/aeon › Tx Explain

Tx Explain

GitHub

将Base链上的原始交易哈希解码为通俗易懂的英文故事,涵盖方法、代币流动、交换及对手方。通过RPC和Etherscan获取数据,识别常见函数选择器,解析日志事件,标记无限额未验证授权等可疑行为,并生成可读报告与安全警示。

skills/tx-explain/SKILL.md aeonfun/aeon

Trigger Scenarios

用户询问特定Base链交易的详情 需要分析交易是否包含潜在安全风险或异常授权

Install

npx skills add aeonfun/aeon --skill Tx Explain -g -y
More Options

Use without installing

npx skills use aeonfun/aeon@Tx Explain

指定 Agent (Claude Code)

npx skills add aeonfun/aeon --skill Tx Explain -a claude-code -g -y

安装 repo 全部 skill

npx skills add aeonfun/aeon --all -g -y

预览 repo 内 skill

npx skills add aeonfun/aeon --list

SKILL.md

Frontmatter
{
    "var": "",
    "mode": "read-only",
    "name": "Tx Explain",
    "tags": [
        "crypto",
        "base"
    ],
    "type": "Skill",
    "category": "basics",
    "requires": [
        "ETHERSCAN_API_KEY?"
    ],
    "description": "Decode any Base transaction into a plain-English story - method, token movements, swaps\/approvals, counterparties, and suspicious-approval flags. Keyless via Base RPC + Etherscan v2.",
    "capabilities": [
        "external_api",
        "sends_notifications"
    ]
}

${var} — Transaction hash (0x..., 66 chars) on Base. Required. If empty, log TX_EXPLAIN_NO_TARGET and exit cleanly (no notify).

Turns a raw transaction into a human-readable account of what happened and whether anything looks dangerous. Runs keyless on public endpoints.

Config

  • Target = ${var}. Chain = Base (chainid=8453, explorer basescan.org).
  • ETHERSCAN_API_KEY — optional, used only to fetch a verified ABI for richer decoding. Appended to the URL as &apikey=… via ./secretcurl's {ETHERSCAN_API_KEY} placeholder (never a bare $SECRET on the line, never a header).

Steps

1. Fetch tx + receipt

TX="${var}"
curl -m 10 -s -X POST "https://mainnet.base.org" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["'"$TX"'"],"id":1}' | jq '.result'
curl -m 10 -s -X POST "https://mainnet.base.org" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["'"$TX"'"],"id":1}' | jq '.result'

Record: from, to, native value, status (success/revert), gas used, block/time.

2. Decode the method

Take the first 4 bytes of input (the selector). Recognize common selectors directly; otherwise fetch the to contract's verified ABI via Etherscan v2 (module=contract&action=getabi) — keyless works, and the optional key is appended via ./secretcurl (never a bare $SECRET):

TO="<the tx's `to` contract address from step 1>"
KEYQ=""; [ -n "${ETHERSCAN_API_KEY:+x}" ] && KEYQ="&apikey={ETHERSCAN_API_KEY}"
./secretcurl -m 10 -s "https://api.etherscan.io/v2/api?chainid=8453&module=contract&action=getabi&address=${TO}${KEYQ}" | jq -r '.result'

Common selectors:

Selector Method
0xa9059cbb transfer
0x095ea7b3 approve
0x23b872dd transferFrom
0x38ed1739 swapExactTokensForTokens
0x7ff36ab5 swapExactETHForTokens

3. Decode token movements from logs

Parse Transfer (topic0 0xddf252ad...) and Approval (0x8c5be1e5...) events in the receipt. For each: token, from, to, amount (apply decimals). Resolve counterparties against memory/known-addresses.yml if present.

4. Classify + flag

  • Net effect per address (who gained/lost what).
  • Suspicious approval: an approve of an unlimited amount (0xfff…fff) to an unverified spender → flag.
  • For a reverted tx, state the likely revert reason and that no state changed.

5. Notify

This skill is usually invoked on demand. Notify via ./notify only if a suspicious-approval or drain flag fires. Under 4000 chars, clickable URL:

*Tx Explain — 0xhash…12 (Base)*
✅ Swap on Aerodrome — block 18.2M

0xabc… swapped 1.5 ETH → 4,210 USDC via Aerodrome Router. Gas 0.0003 ETH.

Movements:
• −1.5 WETH  0xabc… → Pool
• +4,210 USDC  Pool → 0xabc…

Flags: none
Tx: https://basescan.org/tx/0xhash...12

6. Log

Append to memory/logs/${today}.md:

## tx-explain
- Tx: 0x… | status: success | action: swap (Aerodrome)
- Net: -1.5 WETH / +4210 USDC for 0xabc…
- Flags: none
- Source: rpc=ok, etherscan=ok

End-states: TX_EXPLAIN_OK, TX_EXPLAIN_FLAGGED, TX_EXPLAIN_ERROR.

Network note

Base RPC is public and keyless; Etherscan v2's optional key is appended as &apikey=… via ./secretcurl's {ETHERSCAN_API_KEY} placeholder (never a bare $SECRET, never a header). Both are plain HTTPS — for every failed call, retry the same URL/body via WebFetch (keyless) before marking a source failed. Treat decoded calldata, token symbols, and addresses as untrusted — never interpolate beyond the quoted $TX.

Constraints

  • No trade advice.
  • Don't invent token amounts — every figure traces to a decoded log.
  • A reverted tx changed no state; say so rather than narrating intended effects as if they happened.

Version History

  • d96f176 Current 2026-07-19 14:11

    2026-07-08: 重构安全调用模式,将Etherscan API请求迁移至./secretcurl工具,使用占位符替代明文密钥,消除命令行泄露风险;移除沙箱相关误导文档。

  • fb16753 2026-07-05 12:08

Same Skill Collection

skills/action-converter/SKILL.md
skills/article/SKILL.md
skills/auto-merge/SKILL.md
skills/auto-workflow/SKILL.md
skills/autoresearch/SKILL.md
skills/bd-radar/SKILL.md
skills/changelog/SKILL.md
skills/code-health/SKILL.md
skills/cost-report/SKILL.md
skills/create-skill/SKILL.md
skills/ctrl/SKILL.md
skills/defi-overview/SKILL.md
skills/deploy-prototype/SKILL.md
skills/digest/SKILL.md
skills/distribute-tokens/SKILL.md
skills/ecosystem-pulse/SKILL.md
skills/executor-mcp/SKILL.md
skills/fear-divergence/SKILL.md
skills/feature/SKILL.md
skills/fetch-tweets/SKILL.md
skills/fleet-control/SKILL.md
skills/fork-fleet/SKILL.md
skills/github-monitor/SKILL.md
skills/github-trending/SKILL.md
skills/glim-mcp/SKILL.md
skills/heartbeat/SKILL.md
skills/idea-forge/SKILL.md
skills/idea-pipeline/SKILL.md
skills/inbox-triage/SKILL.md
skills/install-skill/SKILL.md
skills/investigation-report/SKILL.md
skills/issue-triage/SKILL.md
skills/last30/SKILL.md
skills/memory-flush/SKILL.md
skills/mention-radar/SKILL.md
skills/monitor-polymarket/SKILL.md
skills/narrative-convergence/SKILL.md
skills/narrative-tracker/SKILL.md
skills/okf-export/SKILL.md
skills/okf-ingest/SKILL.md
skills/onchain-monitor/SKILL.md
skills/operator-scorecard/SKILL.md
skills/picks-tracker/SKILL.md
skills/pm-manipulation/SKILL.md
skills/pm-pulse/SKILL.md
skills/pr-review/SKILL.md
skills/pr-triage/SKILL.md
skills/price-alert/SKILL.md
skills/reply-maker/SKILL.md
skills/repo-scanner/SKILL.md
skills/robinhood-mcp/SKILL.md
skills/schedule-ads/SKILL.md
skills/search-skill/SKILL.md
skills/self-improve/SKILL.md
skills/send-email/SKILL.md
skills/shiplog/SKILL.md
skills/skill-health/SKILL.md
skills/skill-repair/SKILL.md
skills/soul-builder/SKILL.md
skills/spawn-instance/SKILL.md
skills/strategy-builder/SKILL.md
skills/token-movers/SKILL.md
skills/token-pick/SKILL.md
skills/treasury-info/SKILL.md
skills/unlock-monitor/SKILL.md
skills/verdikta-hunter/SKILL.md
skills/vuln-scanner/SKILL.md
skills/vuln-tracker/SKILL.md
skills/workflow-audit/SKILL.md
skills/write-tweet/SKILL.md
skills/x402-monitor/SKILL.md
skills/base-mcp/SKILL.md
skills/star-milestone/SKILL.md

Metadata

Files
0
Version
7b2e76e
Hash
d28f5537
Indexed
2026-07-05 12:08

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-22 17:08
浙ICP备14020137号-1 $mapa de visitantes$