# Dune CLI & Skills Source: https://docs.dune.com/api-reference/agents/cli-and-skills#claude-code ## Summary The Dune CLI and Agent Skills give AI coding agents structured access to Dune's blockchain datasets, query engine, visualizations, and dashboards from within the tools users already work in. The Dune CLI is a terminal interface for discovering datasets, executing DuneSQL queries, and managing visualizations and dashboards, and all of its commands support JSON output for agent use. Dune Skills are portable instruction packages that teach agents to use the CLI, including writing SQL, handling errors, and managing costs. The Dune Skill is installed by the CLI install script and is supported by agents such as Claude Code, Cursor, and OpenAI Codex. ## Article Give your AI coding agent direct access to Dune’s blockchain data through the Dune CLI and Agent Skills. The Dune CLI and Agent Skills give your AI coding agent structured access to Dune’s datasets, query engine, visualizations, and dashboards — directly inside the tools you already use. The Dune CLI is a terminal-native interface for discovering datasets, executing DuneSQL queries, managing visualizations, and building dashboards. Dune Skills are portable instruction packages that teach AI agents how to use the CLI effectively — from writing correct SQL to handling errors and optimizing costs. Together, they turn any skills-compatible agent into a blockchain data analyst that can go from prompt to published dashboard. Dune CLI The Dune CLI lets you query, explore, and manage blockchain data without leaving your terminal. All commands support both human-readable and JSON output, making them equally useful for interactive work and agent-driven workflows. Install The install script handles everything you need to get started: it installs the Dune CLI, runs dune auth to configure your API key, and installs the Dune Agent Skill via npx skills add. In most cases, this single command is all you need. Authenticate (manual) If you need to re-authenticate or configure a different API key after installation, you can run: You’ll be prompted to enter your API key. It’s saved to ~/.config/dune/config.yaml for future sessions. Alternatively, pass the key inline or via environment variable: Usage Run dune --help to see all available commands. All commands support -o json for structured, machine-parseable output — ideal for agent consumption: Dune Skills Agent Skills are an open standard for giving AI agents new capabilities. The Dune Skill teaches your agent how to use the Dune CLI to discover datasets, write DuneSQL, execute queries, handle errors, and manage costs — all from natural language prompts. Skills are supported by Claude Code, Cursor, OpenCode, OpenAI Codex, VS Code, Gemini CLI, Goose, and many more. Install The Dune Skill is automatically installed when you run the CLI install script above — no extra steps required. If you need to install or reinstall the skill separately, you can run: Claude Code Cursor Manual Skills are automatically installed to ~/.claude/skills/ and loaded when your conversation matches blockchain-related triggers. You can also add the skill via Settings > Rules > Add Rule > Remote Rule (Github) with duneanalytics/skills. Clone the duneanalytics/skills repository and copy the skills/dune/ folder into your agent’s skill directory: How it works Once installed, the Dune Skill activates automatically when your conversation involves blockchain data, on-chain analytics, DuneSQL, token transfers, DEX trades, smart contract events, or wallet analysis. The agent then: Discovers the right tables using dune dataset search Inspects column schemas to build correct SQL Writes DuneSQL with proper partition filters for cost efficiency Executes the query and parses results Generates and manages visualizations (charts, counters, tables) Creates and updates dashboards from query results Handles errors with built-in recovery strategies The skill includes detailed reference documents for query execution, dataset discovery, DuneSQL syntax, and error handling — loaded on demand to keep context window usage efficient. Key Benefits Use Cases ## Comments **rvolz.eth**: The next step after MCP. **timdaub.eth**: Really cool. Did you try it? What's the pricing here? Because last time I used Dune it was quite expensive. Anyways, I'd love to use this, in combination with token terminal, also, to do some quantitative research for investing **rvolz.eth**: Yes, I tried it. The script installs a CLI and skills for various agents. It needs an API key, of course, but these are included even in free accounts. By default the skills create artifacts in Dune, but you can also export the data and use it locally. The good thing is that Dune changed their pricing model. You can now use a free account and simply pay for usage beyond the (low) limits. They also added an "analyst" account level that has higher limits and lower prices for additional credits. https://dune.com/pricing