Agent skill
Distribute Tokens
Send tokens to a list of contributors via Bankr Agent API (supports Twitter handles and EVM addresses)
Install this agent skill to your Project
npx add-skill https://github.com/aaronjmars/aeon/tree/main/skills/distribute-tokens
SKILL.md
${var} — Distribution list label to use. If empty, uses the default list. Pass a label to target a specific group (e.g. "contributors", "team").
Config
This skill reads distribution lists from memory/distributions.yml. If the file doesn't exist, log a warning and exit.
# memory/distributions.yml
defaults:
token: USDC
amount: "5" # per recipient
chain: base
lists:
contributors:
description: "Weekly contributor rewards"
token: USDC # override default
amount: "10" # override default
recipients:
- handle: "@alice_dev" # Twitter/X handle — resolved via Bankr
amount: "15" # per-recipient override (optional)
- handle: "@bob_builder"
- address: "0x742d...5678" # direct EVM address
label: "Charlie"
amount: "20"
team:
description: "Monthly team distribution"
token: ETH
amount: "0.01"
recipients:
- handle: "@core_dev1"
- handle: "@core_dev2"
Required secrets
| Secret | Purpose |
|---|---|
BANKR_API_KEY |
Bankr API key (prefixed bk_). Must have read-write access and Agent API enabled. |
Get a key at bankr.bot/api. Enable read-write mode and Agent API access in key settings.
How it works
- Twitter handles (
@username): Sent via the Bankr Agent API using natural language. Bankr resolves the handle to the recipient's linked wallet. The recipient must have a Bankr account — if they don't, that transfer fails and is logged. - EVM addresses (
0x...): Sent via the direct Wallet Transfer API (POST /wallet/transfer). Base chain only.
Read memory/MEMORY.md and memory/distributions.yml. Read the last 2 days of memory/logs/ to check for recent distributions (avoid double-sending).
Steps:
-
Validate config — parse
memory/distributions.yml. If${var}is set, find the matching list by label. If not set, use the first list. Abort if no lists found or file missing. -
Check for duplicates — scan recent logs for distributions to the same list in the last 24 hours. If found, log "DISTRIBUTE_TOKENS_SKIPPED — already distributed to '${list}' today" and exit. This prevents accidental double-sends from re-runs.
-
Check BANKR_API_KEY — if not set, log "DISTRIBUTE_TOKENS_ERROR — BANKR_API_KEY not configured" and exit.
-
Process each recipient — for each entry in the list:
Determine the amount: use recipient-level
amountif set, otherwise list-levelamount, otherwisedefaults.amount. Determine the token: use list-leveltoken, otherwisedefaults.token.Path A — Twitter handle (starts with
@):Use the Bankr Agent API with a natural language transfer command:
bashJOB_ID=$(curl -s -X POST "https://api.bankr.bot/agent/prompt" \ -H "X-API-Key: ${BANKR_API_KEY}" \ -H "Content-Type: application/json" \ -d '{"prompt":"send '"${amount}"' '"${token}"' to '"${handle}"' on base"}' \ | jq -r '.jobId')Poll for completion (max 60s, 5s intervals):
bashfor i in $(seq 1 12); do RESULT=$(curl -s "https://api.bankr.bot/agent/job/${JOB_ID}" \ -H "X-API-Key: ${BANKR_API_KEY}") STATUS=$(echo "$RESULT" | jq -r '.status') if [ "$STATUS" = "completed" ] || [ "$STATUS" = "failed" ]; then break; fi sleep 5 doneRecord result: if
completed, extract tx hash from response. Iffailed, log the error (likely "no linked wallet for this handle").Path B — EVM address (starts with
0x):For USDC on Base, the token address is
0x833589fcd6edb6e08f4c7c32d4f71b54bda02913. For native ETH, setisNativeToken: true.Use the Wallet Transfer API:
bashRESULT=$(curl -s -X POST "https://api.bankr.bot/wallet/transfer" \ -H "X-API-Key: ${BANKR_API_KEY}" \ -H "Content-Type: application/json" \ -d '{ "recipientAddress": "'"${address}"'", "tokenAddress": "'"${token_address}"'", "amount": "'"${amount}"'", "isNativeToken": '"${is_native}"' }')Check
successfield. ExtracttxHashon success.Common token addresses on Base:
- USDC:
0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 - BNKR: look up via Bankr Agent API if needed
- ETH (native): use
isNativeToken: true, anytokenAddress
- USDC:
-
Build summary — compile results:
*Token Distribution — ${today}* List: ${list_label} (${description}) Token: ${token} on Base Total sent: ${total_amount} ${token} ✓ @alice_dev — 15 USDC (tx: 0xabc...) ✓ @bob_builder — 10 USDC (tx: 0xdef...) ✓ Charlie (0x742d...) — 20 USDC (tx: 0x123...) ✗ @inactive_user — failed: no linked Bankr wallet Success: N/M recipients -
Send via
./notify. -
Log results to
memory/logs/${today}.md:- List label, token, chain
- Each recipient with status (success/fail), amount, tx hash
- Total distributed vs total attempted
If memory/distributions.yml doesn't exist, send nothing. Log "DISTRIBUTE_TOKENS_OK — no distribution lists 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?