ourzora/zora-protocol/dca
Claude Code and agent skill by ourzora/zora-protocol
- community
Checking that the SKILL.md file is still in the repository.
Dollar-cost-average into a chosen set of coins. On first invocation, collects the coin list, per-buy USD amount, optional caps, and which token to spend. Each subsequent invocation buys a fixed USD amount of every coin still under its cap.
Install
npx vskill@latest install ourzora/zora-protocol/dcaSKILL.md
Dollar-Cost Averager (DCA) Skill
Skill version 1.0.0
What This Skill Does
You are a Zora dollar-cost-averaging agent. Your job is to steadily accumulate a chosen set of coins by buying a fixed USD amount of each on every iteration, respecting per-coin and overall budget caps. The skill runs one iteration per invocation: on the first run it collects the coin list and budget config, and each subsequent run places one round of buys. To run on a schedule (e.g. one buy per coin per day), use the agent's native scheduler (e.g. Claude Code's /loop; see the Skills guide at https://agents.zora.com/guides/agent-skills).
Requirements
Before starting, make sure you have the Zora CLI basics — if they're not already in your context, use the core Zora CLI skill, installed alongside this one as zora-cli (how to invoke the CLI, response shapes, error handling). Commands below use zora as shorthand for npx @zoralabs/cli@latest. Always use --json and check for "error" in responses.
Step 1: Determine mode
Check if .dca-state.json exists in the working directory.
- File missing → Setup Mode (Steps 2–3)
- File exists → ask the user what they want to do:
- Buy → Iteration Mode (Step 4)
- Add / Remove / Edit coins or caps → Manage Mode (Step 5)
Setup Mode
Step 2: Collect configuration
Ask the user:
- Coins to DCA into — a list of coins, addresses preferred (
0x...) over names to avoid coin-type ambiguity. If the user gives names, resolve each to an address first (zora get creator-coin <handle> --json,zora get trend <ticker> --json, orzora explore --json) and confirm the match. - Per-buy USD amount — the USD value to buy of each coin, per iteration (e.g.
5for $5 per coin per run). The user can set a different amount per coin. - Per-coin budget cap (optional) — the total USD to ever spend on that coin (
nullfor no cap). Once a coin's cumulative spend reaches its cap, it stops being bought. - Overall budget cap (optional) — the total USD to ever spend across all coins combined (
nullfor no cap). - Spend token — which token to spend:
eth(default),usdc, orzora.
Validate the setup before saving:
Show the user their wallet address and spendable balance (from the wallet array, matching the chosen spend token's symbol). Fail fast on any error.
Step 3: Save state
Save .dca-state.json:
cap and overallCap may be null (no cap). Each entry in a coin's buys array looks like:
Show the config summary (coins, per-buy amounts, caps, spend token) and explain how to schedule the next iteration (see the Skills guide at https://agents.zora.com/guides/agent-skills). Stop.
Iteration Mode
Step 4: Place one round of buys
Read .dca-state.json to get spendToken, coins, overallCap, and overallSpent.
Check spendable balance first:
Read the wallet entry whose symbol matches the spend token (ETH, USDC, or ZORA). If the balance is too low to cover a buy, report it and stop without buying.
For each coin in coins, in order:
- Skip if at cap — if
capis a positive number andspent >= cap, log<name>: cap reached ($<spent> / $<cap>), skippingand move on. - Respect the overall cap — if
overallCapis a positive number andoverallSpent + perBuyUsd > overallCap, log that the overall cap would be exceeded and stop placing further buys this iteration. - Clamp to the remaining cap — if
capis set andspent + perBuyUsd > cap, reduce this buy tocap - spentso the cap is hit exactly. - Buy the USD amount:
- Default spend token:
zora buy <address> --usd <amount> --yes --json - Otherwise add the token flag:
zora buy <address> --usd <amount> --token usdc --yes --json(or--token zora)
- Check for `error` in the response. Do NOT count a buy as spent if it errored — leave
spentunchanged and report the failure so the next iteration retries. - On success, append
{ usd: <amount>, txHash: <transactionHash>, timestamp: <now> }to the coin'sbuys, add<amount>to that coin'sspent, and add<amount>tooverallSpent. Report coin name, USD bought, amount received, and tx hash.
After processing all coins, update updatedAt and save state.
If every coin has reached its cap (or the overall cap is reached), report that all caps are reached and tell the user they can stop scheduling further iterations.
Report a summary: coins bought this iteration, USD spent this iteration, total spent per coin vs cap, overall spent vs overall cap, and any errors.
Manage Mode
Step 5: Add, remove, or edit coins and caps
Read .dca-state.json, present the current config (coins, per-buy amounts, spent vs cap, spend token, overall cap), and ask the user what to change:
- Add — same flow as Setup Step 2 for new coins (resolve to address, set
perBuyUsdandcap, startspent: 0with an emptybuysarray), append tocoins - Remove — ask which coin(s) to drop
- Edit — update
perBuyUsd,cap,overallCap, orspendToken; never resetspentorbuysunless the user explicitly asks (it tracks real money already spent)
Save the updated state and stop.
Global Spending Budget
Beyond this skill's own per-coin and overall caps, the agent may have a global, wallet-level spending budget (set with zora agent budget set) that caps total spend across _all_ skills. Honor it on every buy:
Before each buy, check the global budget with the buy's USD amount:
If the response is "allowed": false, skip the buy, log the reason, and stop buying for this iteration — the global cap is reached. When no budget is configured, check returns "allowed": true, so this is always safe to call.
The zora buy command automatically records the spend in the global budget ledger after a successful trade, so you do not need to call budget record separately.
This is on top of — not a replacement for — the per-coin and overall caps below.
Safety Guards
- Check for `error` before counting a buy as spent — never add to
spent/overallSpenton a failed buy; let the next iteration retry. - Never exceed caps — skip coins at their cap, clamp the final buy to land exactly on the cap, and stop the round before the overall cap is breached.
- Prefer addresses over names — resolve names to
0xaddresses at setup to avoid buying the wrong coin type. - Check spendable balance before buying and stop if the spend token runs low.
- Read commands lag writes — after a confirmed buy,
balancemay take a few seconds to reflect it; rely on the recordedspentin state for cap math, not a fresh balance read.
Resetting
Delete .dca-state.json to start fresh. This also clears the recorded spend history — past buys still happened on-chain, so re-running from zero will ignore prior spend against caps.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/cli/skills/dca/SKILL.md
Popularity
- Repository stars
- 212
- Repository forks
- 186
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ourzora/zora-protocol/dca)