distribute-tokens
БесплатноБез исполняемых скриптовНе проверенTwo-phase contributor rewards - plan builds a tier-priced payout from the repo's merged-PR ranking; send executes it on-chain via Bankr Wallet API with…
от aeonfun★ 801 звезда на GitHubОб этом скилле
${var} — Phase + target selector. Grammar:
[plan:|all:][dry-run:]<target>
- `` (empty) /
<label>/dry-run:<label>→ send phase: distribute a list frommemory/distributions.yml(empty = first list). [default — no prefix]plan:/plan:<week>/plan:dry-run/plan:dry-run:<week>→ plan phase only: compute rewards from the repo's merged PRs and write the list intomemory/distributions.yml.all:/all:<week>/all:dry-run/all:dry-run:<week>→ plan then send in one run.
<label>is a distribution-list label (e.g.contributors-2026-W17).<week>is an ISO week (2026-W17); empty<week>= most recent completed ISO week.dry-run:previews without side effects (no yml/state writes in plan; no transfers in send).
Why this design
This skill owns the whole contributor flywheel: who deserves what (plan) and moving the money (send). It is split into two phases that can run independently or chained.
Plan phase — the wiring the project was missing. Merged PRs already name the people moving the project, but shipped work had no path to a wallet credit. The plan phase is that wiring: it ranks contributors by the PRs they merged in the target week (straight from the GitHub API), prices each eligible contributor against a tier table, and writes a labelled list into memory/distributions.yml — the exact file the send phase reads. Keeping a human-visible diff on memory/distributions.yml between plan and execution is the cheapest possible audit trail when real money is involved: the plan lands in git, and the operator (or all: mode, or a chained step) runs the send next.
Send phase — this moves real money. The biggest failure mode is double-sending (re-runs, retries after partial failures, day-rollover bypass of "skip if today" logic) or sending into a black hole (no preflight balance, deprecated API path, missing handle resolution). The send phase therefore:
- Persists per-recipient idempotency state in
memory/state/distributions.jsonkeyed on(list, recipient, date_utc)with the txHash. A successful transfer is never re-sent within the same UTC day, even across re-runs or workflow restarts. - Two-phase execution: RESOLVE (validate config, key, balance, resolve all handles → addresses, build plan) → EXECUTE (send each transfer, persist state after each one). RESOLVE failures abort before any send.
- Dry-run mode outputs the full plan with no transfers.
- Wallet API only for actual transfers — Bankr's docs deprecate the Agent API for transfers. Agent API is used only for handle→address resolution.
The two phases stay decoupled by design: the send phase is the only sanctioned transfer path and owns the idempotency state file, so the plan phase never touches transfer state. all: mode simply runs plan then send in sequence (plan writes the list, send reads it), so nothing is re-implemented.
Config
Reads two independent config/state surfaces depending on phase:
memory/distributions.yml— the distribution lists (read by send, written by plan).- The plan phase computes its ranking live from the repo's merged PRs via the GitHub API — no input file (see Phase A).
memory/state/distributions.json— per-recipient send idempotency (read/written by send).memory/state/contributor-reward-state.json— plan idempotency + first-PR-bonus history (read/written by plan).
If memory/distributions.yml is missing when the send phase needs it, bootstrap with a commented template (see Send Step 1) and exit cleanly with DISTRIBUTE_TOKENS_OK — bootstrapped distributions.yml; edit and re-run.
# memory/distributions.yml
defaults:
token: USDC # USDC | ETH (Base only)
amount: "5"
chain: base
lists:
contributors:
description: "Weekly contributor rewards"
token: USDC
amount: "10"
recipients:
- handle: "@alice_dev" # Twitter/X — resolved via Bankr Agent API
amount: "15"
- handle: "@bob_builder"
- address: "0x742d...5678" # direct EVM address — preferred path
label: "Charlie"
amount: "20"
Required secrets
| Secret | Phase | Purpose |
|---|---|---|
BANKR_API_KEY |
send (and any dry-run send, which still preflights) | Bankr API key (bk_...). Must be read-write with Wallet API enabled. Read-only keys → 403. Not needed for plan: (pure local file I/O). |
Token addresses on Base
- USDC:
0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 - ETH (native):
tokenAddress: "0x0000000000000000000000000000000000000000",isNativeToken: true
Tier pricing (plan phase)
Установить distribute-tokens в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл distribute-tokens?
Two-phase contributor rewards - plan builds a tier-priced payout from the repo's merged-PR ranking; send executes it on-chain via Bankr Wallet API with per-recipient idempotency and dry-run.
Как установить скилл distribute-tokens?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл distribute-tokens запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic