Logo di Dune

Dune

Organizzazione
duneanalytics
dune

Dune CLI for querying blockchain and on-chain data via DuneSQL, searching decoded contract tables, managing saved queries, managing visualizations, managing dashboards, and monitoring credit usage on Dune. Use when user asks about blockchain data, on-chain analytics, token transfers, DEX trades, smart contract events, wallet balances, Ethereum/EVM chain queries, DuneSQL, visualizations, charts, dashboards, or says "query Dune", "search Dune datasets", "run a Dune query", "create a dashboard", or "manage dashboard".

Panoramica

Autoreduneanalytics
Repositoryskills
Nome della skilldune
Stelle
58
Fork
13
File inclusi
8
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • 8 file inclusi

    Script, modelli di documento e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da duneanalytics su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Dune in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/duneanalytics/skills/tree/main/skills/dune
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella nella cartella delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/duneanalytics/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/dune .claude/skills/dune
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Dune in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Dune non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Dune non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Prerequisites

Assume the Dune CLI is already installed and authenticated. Do not run upfront install or auth checks. Just execute the requested dune command directly.

If a dune command fails, inspect the error to determine the cause and follow the recovery steps in install-and-recovery.md:

Dune CLI

A command-line interface for Dune -- the leading blockchain data platform. Use it to write and execute DuneSQL queries against on-chain data, discover datasets, search documentation, and monitor credit usage.

Authentication

All commands except docs search require authentication via a Dune API key. The key is resolved in this priority order:

bash
# 1. Flag (highest priority -- overrides everything)
dune query run 12345 --api-key <key>

# 2. Environment variable
export DUNE_API_KEY=<key>
dune query run 12345

# 3. Saved config file (lowest priority)
dune auth --api-key <key>        # saves to ~/.config/dune/config.yaml
dune query run 12345              # uses saved key

To save your key interactively (prompted from stdin):

bash
dune auth

Config file location: ~/.config/dune/config.yaml

Global Flags

FlagDescription
--api-key <KEY>Dune API key (overrides DUNE_API_KEY env var and saved config)

Output Format (per-command flag)

Most commands support -o, --output <FORMAT> with values text (default, human-readable tables) or json (machine-readable).

Always use -o json on every command that supports it. JSON output contains more detail than text (full API response objects vs. summarized tables) and is unambiguous to parse. The text format is for human terminal use and drops fields.

DuneSQL

Dune uses DuneSQL, a Trino-based SQL dialect, as its query engine. Key points:

  • All SQL passed to --sql flags or saved queries must be valid DuneSQL
  • DuneSQL supports standard SQL with extensions for blockchain data types (addresses, hashes, etc.)
  • See dunesql-cheatsheet.md for common types, functions, patterns, and pitfalls
  • Use dune docs search --query "DuneSQL functions" to look up syntax and functions
  • Reference docs: Writing Efficient Queries, Functions and Operators

Key Concepts

Performance Tiers

Available tiers: small, medium, large. Do not pass --performance by default — omit it and the API auto-selects. Only provide it when:

  • The user explicitly requests a tier
  • The query is clearly complex (heavy joins, large aggregations)
  • A previous run returned a timeout or resource-limit error

Execution States

After submitting a query, the execution progresses through these states:

StateMeaningAction
QUERY_STATE_PENDINGQueued for executionWait
QUERY_STATE_EXECUTINGCurrently runningWait
QUERY_STATE_COMPLETEDResults availableFetch results
QUERY_STATE_FAILEDExecution failedCheck error message; fix SQL and retry
QUERY_STATE_CANCELLEDCancelled by user or systemRe-execute if needed

Dataset Categories

CategoryDescription
canonicalCore blockchain data (blocks, transactions, traces, logs)
decodedABI-decoded contract data (events and function calls)
spellDune Spellbook transformations (curated, higher-level tables like dex.trades)
communityCommunity-contributed datasets

Dataset Types

TypeDescription
dune_tableCore Dune-maintained tables
decoded_tableContract ABI-decoded tables
spellSpellbook transformation tables
uploaded_tableUser-uploaded CSV/data tables
transformation_tableMaterialized transformation tables
transformation_viewVirtual transformation views

Query Parameters

Parameters let you create reusable queries with variable inputs. Pass them as --param key=value (repeatable). The API auto-detects the type, but parameters support these types: text, number, datetime, enum.

bash
dune query run 12345 --param wallet=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --param days=30 -o json

Command Overview

CommandDescriptionAuth
dune authSave API key to config fileNo
dune query createCreate a new saved queryYes
dune query get <id>Fetch a saved query's SQL and metadataYes
dune query update <id>Update an existing queryYes
dune query archive <id>Archive a saved queryYes
dune query run <id>Execute a saved query and wait for resultsYes
dune query run-sqlExecute raw DuneSQL directly (no saved query needed)Yes
dune execution results <id>Fetch results of a previous executionYes
dune dataset searchSearch the Dune dataset catalogYes
dune dataset search-by-contractFind decoded tables for a contract addressYes
dune viz createCreate a visualization on a saved queryYes
dune viz get <id>Fetch visualization details and optionsYes
dune viz listList all visualizations for a queryYes
dune viz update <id>Update an existing visualizationYes
dune viz delete <id>Permanently delete a visualizationYes
dune docs searchSearch Dune documentationNo
dune usageShow credit and resource usageYes
dune dashboard createCreate a new dashboardYes
dune dashboard get <id>Fetch a dashboard's metadata and widgetsYes
dune dashboard update <id>Update an existing dashboardYes
dune dashboard archive <id>Archive a dashboardYes

Common Workflows

Ad-hoc SQL Analysis

bash
# Run a one-off query directly
dune query run-sql --sql "SELECT block_number, block_time FROM ethereum.blocks ORDER BY block_number DESC LIMIT 5" -o json

Discover Tables, Then Query

bash
# 1. Find relevant tables with column schemas
dune dataset search --query "uniswap swaps" --categories decoded --include-schema -o json

# 2. Write and execute SQL using discovered table/column names
dune query run-sql --sql "SELECT * FROM uniswap_v3_ethereum.evt_Swap LIMIT 10" -o json

Find Contract Tables, Then Query

bash
# 1. Find decoded tables for a specific contract
dune dataset search-by-contract --contract-address 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 --include-schema -o json

# 2. Query the discovered tables
dune query run-sql --sql "SELECT * FROM uniswap_v3_ethereum.evt_Transfer LIMIT 10" -o json

Save and Execute a Reusable Query

bash
# 1. Create a saved query with parameters
dune query create --name "Top Wallets" --sql "SELECT address, balance FROM ethereum.balances WHERE balance > {{min_balance}} LIMIT {{row_limit}}" -o json

# 2. Run it with parameter values
dune query run <returned-id> --param min_balance=1000 --param row_limit=50 -o json

Long-Running Query (Submit and Poll)

bash
# 1. Submit without waiting
dune query run 12345 --no-wait --performance large -o json
# Output: {"execution_id": "01ABC...", "state": "QUERY_STATE_PENDING"}

# 2. Check results later
dune execution results 01ABC... -o json

Build a Dashboard from Scratch

bash
# 1. Create queries for each section
QUERY_ID=$(dune query create --name "Daily Volume" --sql "SELECT date_trunc('day', block_time) AS day, SUM(amount) AS volume FROM trades GROUP BY 1 ORDER BY 1" -o json | jq -r '.query_id')

# 2. Execute to verify data
dune query run $QUERY_ID -o json

# 3. Create visualizations for each query
VIZ_ID=$(dune viz create --query-id $QUERY_ID --name "Daily Volume Chart" --type chart --options '{"globalSeriesType":"line","columnMapping":{"day":"x","volume":"y"}}' -o json | jq -r '.id')

# 4. Assemble the dashboard
dune dashboard create --name "Trading Dashboard" \
  --text-widgets '[{"text":"# Trading Dashboard\nDaily volume and metrics"}]' \
  --visualization-ids $VIZ_ID -o json

Update a Dashboard (Preserve Existing Widgets)

bash
# 1. Fetch current state
dune dashboard get 12345 -o json > dashboard.json

# 2. Modify as needed (add a new visualization widget)
# 3. Pass the complete widget state back
dune dashboard update 12345 \
  --visualization-widgets '[{"visualization_id":111},{"visualization_id":222},{"visualization_id":333}]' \
  -o json

Limitations

The following capabilities are available via the Dune MCP server or web UI but not via the CLI:

  • Blockchain listing (list all indexed blockchains with table counts)
  • Table size analysis (storage size of specific tables)

Security

  • Never output API keys or tokens in responses. Before presenting CLI output to the user, scan for strings that look like API keys (e.g. long alphanumeric tokens, strings prefixed with dune_, or values from DUNE_API_KEY). Redact them with [REDACTED].
  • Always confirm with the user before running write commands (query create, query update, query archive, viz create, viz update, viz delete, dashboard create, dashboard update, dashboard archive)
  • Always use -o json on every command -- JSON output is more detailed and reliably parseable
  • Use --temp when creating throwaway queries to avoid cluttering the user's saved queries
  • Never pass --api-key on the command line when other users might see the terminal history. Prefer dune auth or the DUNE_API_KEY environment variable.

Reference Documents

Load the relevant reference when you need detailed command syntax and flags:

TaskReference
Create, get, update, or archive saved queriesquery-management.md
Execute queries (run, run-sql) or fetch execution resultsquery-execution.md
Search datasets or find tables for a contract addressdataset-discovery.md
Search documentation or check account usagedocs-and-usage.md
DuneSQL types, functions, common patterns, and pitfallsdunesql-cheatsheet.md
Create, get, update, delete, or list visualizations on saved queriesvisualization-management.md
Create, get, update, or archive dashboardsdashboard-management.md
CLI install, authentication, and version recoveryinstall-and-recovery.md

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Dune?

Dune CLI for querying blockchain and on-chain data via DuneSQL, searching decoded contract tables, managing saved queries, managing visualizations, managing dashboards, and monitoring credit usage on Dune. Use when user asks about blockchain data, on-chain analytics, token transfers, DEX trades, smart contract events, wallet balances, Ethereum/EVM chain queries, DuneSQL, visualizations, charts, dashboards, or says "query Dune", "search Dune datasets", "run a Dune query", "create a dashboard", or "manage dashboard".

Perché usare Dune su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Dune è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Dune in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/duneanalytics/skills/tree/main/skills/dune. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Dune?

Qualsiasi modello che colleghi in TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Dune?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Dune: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Dune è gratuita?

Sì. È pubblicata su GitHub da duneanalytics con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, modelli o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇