Agent skill

Dune Analytics

by moonpay in moonpay/skills

Blockchain analytics via Dune REST API — execute DuneSQL queries against live on-chain data, discover decoded contract tables, and monitor credit usage.

MITAuto-check passedBackend & APIs

Install Dune Analytics

skills CLI
$ npx skills add moonpay/skills --skill dune-analytics -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install moonpay/skills dune-analytics --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/moonpay/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/dune-analytics .claude/skills/dune-analytics && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dune-analytics
GitHub stars
113
Token cost
~1.3k tokens
SKILL.md length
202 words
Files
1
Skills in repo
39
Repo updated
First seen
Licence
MIT

At a glance

Blockchain analytics via Dune REST API — execute DuneSQL queries against live on-chain data, discover decoded contract tables, and monitor credit usage.

  • Works in 2 steps: Sign up at https://dune.com → Go to Settings → API Keys → Create new key
  • The user asks about on-chain data
  • SKILL.md covers Setup, Key Endpoints, Common Workflows and Wallet Management with MoonPay, plus 4 more sections
  • Calls jq and curl; reaches api.dune.com; needs DUNE_API_KEY

What it does

Dune Analytics is an agent skill from moonpay/skills. Blockchain analytics via Dune REST API — execute DuneSQL queries against live on-chain data, discover decoded contract tables, and monitor credit usage. Use when the user asks about on-chain data, wallet activity, DEX trades, token transfers, smart contract events, or says "query Dune", "run a Dune query", or "search Dune datasets". Pairs with MoonPay to analyze wallets you create and fund.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering Smart contracts, Crypto and DeFi analysis and REST APIs. The repository describes itself as: Skills for AI agents to move money — on-ramps, swaps, wallets, deposits, and more via the MoonPay CLI. The licence is MIT.

When your agent uses it

  • The user asks about on-chain data
  • Wallet activity
  • Token transfers
  • Smart contract events

Example prompts

  • “query Dune”
  • “run a Dune query”
  • “search Dune datasets”
  • “/dune-analytics”

Requirements

  • A credential in DUNE_API_KEY

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Sign up at https://dune.com
  2. Go to Settings → API Keys → Create new key

What it can do on your machine

Read from SKILL.md and the folder at commit aa672ab. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • jq
    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.dune.com

    Also links to:

    • docs.dune.com
    • dune.com
    • npmjs.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • DUNE_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dune Analytics loads about 1.3k tokens when it runs. Until then it costs about 102 tokens; SKILL.md has 202 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~102
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from moonpay/skills at commit aa672ab, republished under its MIT licence (© moonpay). 202 words, ~1,335 tokens.

Download SKILL.mdSave it as .claude/skills/dune-analytics/SKILL.md (or your agent's skills folder).
name
dune-analytics
description
Blockchain analytics via Dune REST API — execute DuneSQL queries against live on-chain data, discover decoded contract tables, and monitor credit usage. Use when the user asks about on-chain data, wallet activity, DEX trades, token transfers, smart contract events, or says "query Dune", "run a Dune query", or "search Dune datasets". Pairs with MoonPay to analyze wallets you create and fund.
tags
blockchain, analytics, dune, on-chain, data, defi, sql

Dune Analytics

Query live on-chain data via the Dune REST API. Pair with MoonPay to create and fund the wallets you analyze.

Setup

Get a Dune API Key
  1. Sign up at https://dune.com
  2. Go to Settings → API Keys → Create new key
bash
export DUNE_API_KEY="your-api-key"

Base URL: https://api.dune.com/api/v1
Auth header: X-Dune-API-Key: $DUNE_API_KEY


Key Endpoints

ActionMethodEndpoint
Execute a saved queryPOST/query/{query_id}/execute
Get execution status + resultsGET/execution/{execution_id}/results
Execute raw SQL directlyPOST/sql/execute
Cancel executionPOST/execution/{execution_id}/cancel
Get query definitionGET/query/{query_id}

Common Workflows

Run a Saved Query
bash
# 1. Execute
EXEC=$(curl -s -X POST "https://api.dune.com/api/v1/query/3237661/execute" \
  -H "X-Dune-API-Key: $DUNE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"performance": "medium"}')

EXEC_ID=$(echo $EXEC | jq -r '.execution_id')
echo "execution_id: $EXEC_ID"

# 2. Poll until complete
while true; do
  STATUS=$(curl -s "https://api.dune.com/api/v1/execution/$EXEC_ID/results" \
    -H "X-Dune-API-Key: $DUNE_API_KEY")
  STATE=$(echo $STATUS | jq -r '.state')
  echo "State: $STATE"
  if [[ "$STATE" == "QUERY_STATE_COMPLETED" || "$STATE" == "QUERY_STATE_FAILED" ]]; then
    echo $STATUS | jq '.result.rows[:5]'
    break
  fi
  sleep 3
done
Execute Raw DuneSQL
bash
curl -s -X POST "https://api.dune.com/api/v1/sql/execute" \
  -H "X-Dune-API-Key: $DUNE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sql": "SELECT block_time, hash, value/1e18 AS eth FROM ethereum.transactions WHERE lower(\"from\") = lower('0xYOUR_WALLET') ORDER BY block_time DESC LIMIT 20",
    "performance": "medium"
  }' | jq '.execution_id'
Query with Parameters
bash
curl -s -X POST "https://api.dune.com/api/v1/query/3237661/execute" \
  -H "X-Dune-API-Key: $DUNE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query_parameters": {
      "wallet": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "days": 30
    },
    "performance": "medium"
  }' | jq '.execution_id'

Wallet Management with MoonPay

Use the MoonPay CLI (mp) to create and fund the wallets you analyze with Dune.

Create a Wallet to Monitor
bash
mp wallet create --name "dune-agent-wallet"
mp wallet retrieve --wallet "dune-agent-wallet"
# Note your Ethereum address for Dune queries
Query Your MoonPay Wallet On-Chain
bash
WALLET=$(mp wallet retrieve --wallet "dune-agent-wallet" --json | jq -r '.addresses.ethereum')

EXEC_ID=$(curl -s -X POST "https://api.dune.com/api/v1/sql/execute" \
  -H "X-Dune-API-Key: $DUNE_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\
    \"sql\": \"SELECT block_time, hash, value/1e18 AS eth, \\\"to\\\" FROM ethereum.transactions WHERE lower(\\\"from\\\") = lower('$WALLET') ORDER BY block_time DESC LIMIT 20\",\
    \"performance\": \"medium\"\
  }" | jq -r '.execution_id')

curl -s "https://api.dune.com/api/v1/execution/$EXEC_ID/results" \
  -H "X-Dune-API-Key: $DUNE_API_KEY" | jq '.result.rows'
Fund the Wallet
bash
# Buy ETH for gas
mp buy --token eth_ethereum --amount 0.1 --wallet <your-eth-address> --email <email>

# Check balances
mp token balance list --wallet <your-eth-address> --chain ethereum

# Bridge to follow yields
mp token bridge \
  --from-wallet dune-agent-wallet --from-chain ethereum \
  --from-token 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 \
  --from-amount 500 \
  --to-chain polygon \
  --to-token 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174

Execution States

StateMeaning
QUERY_STATE_PENDINGQueued
QUERY_STATE_EXECUTINGRunning
QUERY_STATE_COMPLETEDResults ready
QUERY_STATE_FAILEDCheck error message
QUERY_STATE_CANCELLEDCancelled

Security

  • Never expose DUNE_API_KEY in logs or responses — redact before showing output
  • Confirm with the user before running write operations (creating/updating saved queries)

Resources

  • moonpay-check-wallet — Check wallet balances before analyzing on-chain
  • moonpay-swap-tokens — Act on findings by swapping tokens
  • moonpay-bridge-tokens — Move assets cross-chain informed by your analysis

© moonpay, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/dune-analytics of moonpay/skills.

Open the folder on GitHubat commit aa672ab

Compare with similar skills

Dune Analytics next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dune Analytics compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dune Analytics this skillmoonpay/skills113—~1.3kAutomated safety check: PassMIT
Solana Devsolana-foundation/solana-dev-skill574—~3.8kAutomated safety check: PassMIT
Solana Token Extensionssolanabr/ai-kit108—~3.5kAutomated safety check: PassMIT
Stellar DevVelaPayments/vela-payments131—~1.8kAutomated safety check: PassMIT
DeFi Protocol Templateswshobson/agents40k11 repos~1.9kAutomated safety check: PassMIT
Ops Indexer Queryboundless-xyz/boundless193—~3.5kAutomated safety check: PassApache-2.0

Similar skills

  • Solana Dev

    solana-foundation/solana-dev-skill

    A skill your agent uses when user asks to "build a Solana dapp", "write an Anchor program", "create a token", "debug Solana errors", "set up wallet connection", "test my Solana program", "fuzz my…

    574 GitHub stars~3.8k tokensUpdated today
    Backend & APIsAuto-check passed
  • Helps choose, combine and create Token-2022 mint and account extensions on Solana with the spl-token CLI, @solana/kit or Anchor, and integrate the resulting mints.

    108 GitHub stars~3.5k tokensUpdated today
    Backend & APIsAuto-check passed
  • Stellar Dev

    VelaPayments/vela-payments

    End-to-end Stellar development playbook. An agent skill from VelaPayments/vela-payments.

    131 GitHub stars~1.8k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Solidity templates for DeFi building blocks: staking with reward distribution, an automated market maker, governance tokens and flash loans.

    40k GitHub starsUsed in 11 repos~1.9k tokens
    Backend & APIsAuto-check passed
  • Ops Indexer Query

    boundless-xyz/boundless

    Internal — for Boundless team members only. An agent skill from boundless-xyz/boundless.

    193 GitHub stars~3.5k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • PayRam Payment Analytics

    PayRam/payram-mcp

    Queries a PayRam server's dashboard data through its REST APIs with a Bearer token: payment search, daily volume, unswept balances, sweep history and on-ramp metrics.

    158 GitHub stars~4.1k tokensUpdated today
    Backend & APIsAuto-check passed

More from moonpay/skills

All 39 skills in this repo
  • A skill your agent uses when accessing Alchemy APIs for RPC calls, token balances, NFT metadata, asset transfers, transaction simulation, or Alchemy-specific features.

    113 GitHub stars~2.1k tokensUpdated 27 days ago
    Auto-check: notes
  • Alchemy API

    moonpay/skills

    Integrates Alchemy blockchain APIs using an API key. An agent skill from moonpay/skills.

    113 GitHub stars~2.1k tokensUpdated 27 days ago
    Auto-check passed
  • Allium Onchain Data

    moonpay/skills

    Query blockchain data via Allium APIs. An agent skill from moonpay/skills.

    113 GitHub stars~1.9k tokensUpdated 27 days ago
    Auto-check passed
  • Corbits Marketplace

    moonpay/skills

    Paid API marketplace for AI agents via Corbits. An agent skill from moonpay/skills.

    113 GitHub stars~1.5k tokensUpdated 27 days ago
    Auto-check passed
  • Moonpay Auth

    moonpay/skills

    Set up the MoonPay CLI, authenticate, and manage local wallets.

    113 GitHub stars~1.2k tokensUpdated 27 days ago
    Auto-check passed
  • Moonpay Check Wallet

    moonpay/skills

    Check wallet balances and holdings. An agent skill from moonpay/skills.

    113 GitHub stars~450 tokensUpdated 27 days ago
    Auto-check passed

Categories

Questions about Dune Analytics

What does Dune Analytics do?

Blockchain analytics via Dune REST API — execute DuneSQL queries against live on-chain data, discover decoded contract tables, and monitor credit usage. Dune Analytics is an agent skill from moonpay/skills. Blockchain analytics via Dune REST API — execute DuneSQL queries against live on-chain data, discover decoded contract tables, and monitor credit usage.

When should I use Dune Analytics?

Dune Analytics fits situations like: the user asks about on-chain data; wallet activity; token transfers; smart contract events.

How do I install Dune Analytics in Claude Code?

Run `npx skills add moonpay/skills --skill dune-analytics -a claude-code`. Or copy the skill folder (skills/dune-analytics in moonpay/skills) into .claude/skills/dune-analytics in your project. Claude Code loads it when a task matches its description.

How do I install Dune Analytics in Codex?

Run `npx skills add moonpay/skills --skill dune-analytics -a codex`. Or copy the skill folder (skills/dune-analytics in moonpay/skills) into .agents/skills/dune-analytics in your project. Codex loads it when a task matches its description.

Can I use Dune Analytics in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add moonpay/skills --skill dune-analytics -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dune-analytics, .gemini/skills/dune-analytics, .github/skills/dune-analytics and .opencode/skills/dune-analytics in your project.

What does Dune Analytics need to run?

Going by SKILL.md and its folder, Dune Analytics needs the command-line tools its instructions call (jq and curl) and credentials named DUNE_API_KEY. Our summary lists: A credential in DUNE_API_KEY.

Does Dune Analytics access the network?

SKILL.md names 4 domains. In commands or code: api.dune.com; the agent is likely to contact it when it follows the instructions. As links in the text: docs.dune.com, dune.com and npmjs.com. This is read from the text; nothing was executed.

Is Dune Analytics safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dune Analytics use?

Dune Analytics is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dune Analytics use?

About 1.3k tokens (SKILL.md is roughly 5.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Dune Analytics?

Skills that share tags, products or a category with Dune Analytics: Solana Dev (solana-foundation/solana-dev-skill, 574 stars), Solana Token Extensions (solanabr/ai-kit, 108 stars), Stellar Dev (VelaPayments/vela-payments, 131 stars) and DeFi Protocol Templates (wshobson/agents, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dune Analytics?

moonpay (a GitHub organization) maintains it in moonpay/skills, which has 113 GitHub stars. The repository holds 39 skills in this directory. The repository was last updated on September 10, 2026.

Source: moonpay/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.