← ClaudeAtlas

dune-sui-query-builderlisted

Build, debug, and optimize DuneSQL queries for Sui blockchain analytics, including pure-SQL pipelines that pull live state directly from Sui RPC nodes. Use this skill whenever the user mentions Dune Analytics, DuneSQL, Sui queries, Move events, on-chain data analysis for Sui, the Pyth oracle, Sui RPC inside SQL, or wants to pull live blockchain state into a Dune query. Also trigger when the user references specific Sui protocols (Navi, Suilend, Cetus, Bluefin, Scallop, Aftermath, DeepBook, Volo, Haedal, etc.), asks about Move packages, object-centric data, event_json parsing, http_post / http_get / LiveFetch, dynamic field discovery, multi-stage RPC pipelines, or wants to analyze Sui blockchain data in any way using Dune.
vchrl/dune-sui-query-builder · ★ 2 · Data & Documents · score 65
Install: claude install-skill vchrl/dune-sui-query-builder
# Dune Sui Query Builder Build, debug, and optimize DuneSQL (Trino-based) queries for Sui blockchain analytics. This skill covers Dune's Sui data model, Sui-specific quirks (object-centric architecture, binary types, event JSON parsing, package upgrades), and a class of patterns that goes beyond what the indexed tables alone can do — **chained Sui RPC calls inside SQL via Dune's LiveFetch**, plus oracle-grade pricing via the **Pyth Hermes API** for tokens that aren't in `prices.hour`. Before writing any query, read `references/sui-data-model.md` for the table catalog and Sui-specific edge cases. For Sui DEX queries (Cetus, Bluefin, DeepBook, Aftermath, Kriya, FlowX, Momentum, BlueMove, Obric), BTCfi work, Walrus storage, or Sui chain stats — read `references/sui-curated-tables.md` first; these often have curated spell tables that bypass raw event archaeology. For Navi, Suilend, or Bluefin Pro protocol queries, read `references/protocol-patterns.md` — it covers package archaeology, mislabel investigations, and a fully-validated multi-market on-chain pipeline (V9) that achieves 100% asset coverage across all of Navi's markets (Main + 3 isolated, 48 reserves), priced from Navi's own on-chain oracle, with no third-party indexer. The same file carries the Suilend pack: the liquidation, obligation, and forgive event catalog, protocol-native cToken-vs-underlying pricing as the correctness core, the wrapped-token symbol map, and the IKA bad-debt case study. It also carries the Blue