Claude Code skill for TON blockchain data analysis on Dune Analytics.
- Generates Dune SQL queries for TON on-chain analysis
- Executes queries via Dune API and analyzes results
- Covers supply distribution, wallet analysis, token flows, DeFi activity, staking, CEX flows
- Includes battle-tested SQL patterns for 13-category supply classification, real user filtering, whale tiers
In Claude Code, run:
/plugin marketplace add ohld/ton-analyst
/plugin install ton-analyst@ohld-ton-analyst
This adds the repo as a marketplace source and installs the skill. Auto-updates are enabled by default — you'll get new patterns and fixes as they're pushed.
After installing, ask Claude Code:
"What is the current TON supply breakdown by holder type?"
"How many real wallets hold 10K+ TON over time?"
"Show me net value flows between Binance and DeDust in the last 30 days"
The skill provides table schemas, reusable CTEs, and SQL conventions so Claude can generate correct queries on the first try.
skills/ton-analyst/
├── SKILL.md # Entry point — capabilities, key tables, links
└── reference/
├── tables.md # Table schemas (12 tables)
├── labels.md # Labels, key addresses, CEX, sybil
├── patterns.md # Gotchas, reusable CTEs, classification logic
├── dune-api.md # API docs, research workflow
├── ton-blockchain.md # TON concepts, address formats, staking
└── examples/ # Battle-tested SQL queries
├── README.md # Index of examples
├── supply-breakdown.sql
├── real-wallets-ton.sql
├── real-wallets-usdt.sql
├── net-value-flow.sql
├── nft-names.sql
├── trace-fees.sql
└── filter-interfaces.sql
ton.accounts,ton.messages,ton.balances_history,ton.jetton_eventston.prices_daily,ton.dex_trades,ton.latest_balancesdune.ton_foundation.dataset_labels— named entities (~3,150)dune.ton_foundation.result_custodial_wallets— CEX deposit wallets (~9.6M)dune.ton_foundation.result_external_balances_history— DeFi positionsdune.ton_foundation.result_sybil_wallets,result_nominators_cashflow
- Clone the repo
- Install locally — either:
claude --plugin-dir ./path/to/ton-analyst(per-session), or- Symlink:
ln -s /path/to/ton-analyst/skills/ton-analyst ~/.claude/skills/ton-analyst
- Edit files in
skills/ton-analyst/ - Test: open Claude Code and ask a TON-related question — verify your changes are picked up
- Submit a PR with your changes
- New SQL examples — add
.sqlfile inreference/examples/ - New table schemas or gotchas — edit
reference/tables.mdorreference/patterns.md - New labels or address discoveries — edit
reference/labels.md - Bug fixes in existing SQL — edit the relevant file
- Dune TON Tables Overview
- TON Documentation
- TON Verticals Dashboard
- Dune Spellbook — TON models
- ton-studio/ton-labels — address labels source
- TON On-Chain Data Analysis on Dune
- How to Analyze TON Users and Token Flows
PRs welcome! If you find a new code_hash, a missing label, or a better SQL pattern — please contribute.
x.com/danokhlopkov | t.me/danokhlopkov
MIT