Agent skill
Treasury Info
Show holdings overview for a wallet using Bankr API with block explorer fallback
Install this agent skill to your Project
npx add-skill https://github.com/aaronjmars/aeon/tree/main/skills/treasury-info
SKILL.md
${var} — Wallet label to check. If empty, checks all watched wallets.
If ${var} is set, only check the wallet with that label.
Config
This skill reads watched addresses from memory/on-chain-watches.yml. If the file doesn't exist yet, create it or skip this skill.
# memory/on-chain-watches.yml
watches:
- label: Treasury
address: "0x1234...abcd"
chain: base
rpc_url: https://base.llamarpc.com
type: wallet
Bankr API (preferred)
Set the BANKR_API_KEY secret (prefixed bk_). The Bankr portfolio endpoint returns token balances, USD values, PnL, and NFTs across chains — one call covers everything.
If BANKR_API_KEY is not set, the skill falls back to direct RPC + CoinGecko.
Read memory/MEMORY.md and memory/on-chain-watches.yml for watched addresses. Read the last 2 days of memory/logs/ to compare against previous snapshots.
Steps:
-
Load watches — parse
memory/on-chain-watches.yml. Filter totype: walletentries. If${var}is set, match by label. -
Fetch holdings — for each wallet, try Bankr first, then fall back:
Path A — Bankr API (if
BANKR_API_KEYis set):bashcurl -s "https://api.bankr.bot/wallet/portfolio?include=pnl&showLowValueTokens=false" \ -H "X-API-Key: ${BANKR_API_KEY}"This returns balances grouped by chain with token symbols, amounts, USD values, and PnL.
If the Bankr wallet address matches a watched address, use the response directly. If querying a different wallet, use the Agent API:
bash# Submit prompt JOB=$(curl -s -X POST "https://api.bankr.bot/agent/prompt" \ -H "X-API-Key: ${BANKR_API_KEY}" \ -H "Content-Type: application/json" \ -d '{"prompt":"Show full token balances for wallet '"${address}"' on '"${chain}"'"}' \ | jq -r '.jobId') # Poll for result (max 30s, 3s intervals) for i in $(seq 1 10); do RESULT=$(curl -s "https://api.bankr.bot/agent/job/${JOB}" \ -H "X-API-Key: ${BANKR_API_KEY}") STATUS=$(echo "$RESULT" | jq -r '.status') if [ "$STATUS" = "completed" ]; then break; fi sleep 3 donePath B — RPC + CoinGecko fallback (no Bankr key):
- Get native balance via
eth_getBalance(EVM) or equivalent RPC call. - For ERC-20 tokens, query known token contracts with
balanceOf(address)viaeth_call. - Look up USD prices from CoinGecko:
bash
curl -s "https://api.coingecko.com/api/v3/simple/price?ids=${coin_ids}&vs_currencies=usd&include_24hr_change=true" - For Solana wallets, use the Solana RPC
getBalanceandgetTokenAccountsByOwnermethods.
- Get native balance via
-
Format treasury overview:
*Treasury Overview — ${today}* *Label* (chain) Total Value: $X,XXX.XX Holdings: - TOKEN1: amount ($value) [+/-% 24h] - TOKEN2: amount ($value) [+/-% 24h] - ... Top 5 by value shown. N tokens below $1 hidden. Change since last check: +/- $X.XXInclude PnL data if available from Bankr. Compare total value against the last logged snapshot.
-
Send via
./notify. -
Log current totals and per-token balances to
memory/logs/${today}.mdso future runs can track changes over time.
If no watched wallets configured, send nothing. Log "TREASURY_INFO_OK — no wallets configured" and end.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
Polymarket
Trending and top markets on Polymarket — volume, new markets, biggest movers
Daily Article
Research trending topics and write a publication-ready article
DeFi Monitor
Check pool health, positions, and yield rates for tracked protocols
Skill Evals
Evaluate skill output quality against assertion manifests — detects regressions before users notice
Monitor Polymarket
Monitor specific prediction markets for 24h price moves, volume changes, and fresh comments
Self Review
Weekly audit of what Aeon did, what failed, and what to improve
Didn't find tool you were looking for?