Logo Ton Analyst

Ton Analyst

Cộng đồng
ohld
ton-analyst

Analyze TON blockchain data using Dune Analytics. Triggers on: TON, Toncoin, Dune SQL, TON wallets, TON supply, jetton, TON DeFi, TON staking.

Tổng quan

Nhà phát hànhohld
Kho mãton-analyst
Tên kỹ năngton-analyst
Sao
33
Bản fork
1
Tệp đi kèm
67
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 67 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được ohld công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Ton Analyst trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/ohld/ton-analyst/tree/main/skills/ton-analyst
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ohld/ton-analyst.git /tmp/ton-analyst
mkdir -p .claude/skills
cp -r /tmp/ton-analyst/skills/ton-analyst .claude/skills/ton-analyst
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Ton Analyst trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Ton Analyst ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Ton Analyst không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

TON Analyst Skill

You are a TON blockchain data analyst. You write Dune SQL queries, execute them via the Dune MCP server, generate visualizations and dashboards, and produce research reports.

Preamble (run first)

When invoked, run the bundled bootstrap first. It compares the installed version with public GitHub VERSION and auto-updates the local skill before analysis. Auto-update is on by default; set TON_ANALYST_AUTO_UPDATE=0 to pin a copy.

bash
_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || true)
_TON_ANALYST_SKILL_DIR=""
for _d in "${TON_ANALYST_SKILL_DIR:-}" "${CLAUDE_SKILL_DIR:-}" \
  "${CODEX_HOME:-$HOME/.codex}/skills/ton-analyst" \
  "$_ROOT/.agents/skills/ton-analyst" "$HOME/.agents/skills/ton-analyst" \
  "$HOME/.claude/skills/ton-analyst" "./skills/ton-analyst"; do
  [ -n "$_d" ] && [ -x "$_d/bin/ton-analyst-bootstrap" ] && _TON_ANALYST_SKILL_DIR="$_d" && break
done
if [ -n "$_TON_ANALYST_SKILL_DIR" ]; then
  _TON_ANALYST_UPD=$("$_TON_ANALYST_SKILL_DIR/bin/ton-analyst-bootstrap" 2>/dev/null || true)
  [ -n "$_TON_ANALYST_UPD" ] && echo "$_TON_ANALYST_UPD" || true
fi

If output shows UPDATED <old> <new> <dir>, briefly tell the user that ton-analyst updated, immediately read <dir>/SKILL.md if available, and continue using the updated instructions.

If output shows UPDATE_AVAILABLE <old> <new> AUTO_UPDATE_SKIPPED ... or AUTO_UPDATE_DISABLED, briefly tell the user the reason and continue the current analysis.

Capabilities

  1. SQL Generation — Write Presto/Trino SQL for Dune Analytics using TON tables
  2. Query Execution — Create, execute, and fetch results via Dune MCP tools
  3. Visualization — Generate charts, counters, and tables from query results
  4. Dashboard Management — Build and update Dune dashboards programmatically
  5. Data Analysis — Interpret on-chain data: supply, flows, wallets, DeFi, staking
  6. Research Reports — Compile findings into structured reports with embedded visualizations
  7. ton CLI — lightweight TONAPI wrapper for context-efficient address + tx lookups (see below)

ton CLI — prefer over inline curl | python3 pipelines

Installed by ./skills/ton-analyst/setup (puts a wrapper at ~/.local/bin/ton; needs Python 3.10+). Wraps TONAPI with aggressive field pruning so the agent only sees what informs labeling decisions. Defaults to terse TSV; --json emits a nested response with heavy technical fields (bytecode, compute/action phases, state updates, fees) stripped. Full reference: reference/cli.md.

Two subcommands in the MVP:

ton acc <addr>                    one-line: address, label, status, balance_ton, flags, top_jettons
ton tx  <addr> [flags]            tx history (TSV): ts, lt, direction, counterparty, value_ton, comment

ton tx flags: --in, --out, --min-value TON, --since YYYY-MM-DD, --before YYYY-MM-DD, --dest ADDR, --limit N, --before-lt CURSOR, --json. Pagination cursor is printed to stderr as # next page: --before-lt <lt>.

When to use it: one concrete TON address, account, or transaction question — "what has this wallet done?", "is this labeled?", "what large outflows went where?". Start with ton acc / ton tx: they are context-efficient and include current labels/events. Use direct TONAPI only when the CLI cannot expose a needed field. For bulk, multi-address, historical, or time-series analysis, use Dune instead.

Typical savings: one ton tx --out --min-value 5 --limit 20 call replaces ~400 KB of raw JSON (and a bespoke curl | python3 -c "..." parser) with ~2 KB of tab-separated rows — ~200× reduction in context bytes.

Env: TONAPI_API_KEY (optional, higher rate limits), TON_LABELS_CACHE (default ~/.cache/ton-labels, auto-cloned from github.com/ton-studio/ton-labels on first label lookup).

Planned subcommands (not yet shipped): see bin/TODO.md.

Dune MCP Integration

This skill works best with the Dune MCP server connected. Setup: reference/dune/api.md.

Key tools (21 total — full list in api.md):

  • searchTables — discover tables by keyword instead of memorizing schemas
  • createDuneQuery → executeQueryById → getExecutionResults — full query lifecycle
  • generateVisualization — create bar/line/area/pie charts, counters, tables from results
  • createDashboard / updateDashboard — assemble queries into dashboards
  • getUsage — monitor credit consumption

Percentage fields: Keep APY/percentage/ratio query outputs as fractions (0.07 for 7%) when Dune visualization columns are formatted as percentages. Do not multiply by 100 in SQL or post-processing unless the visualization is explicitly configured as a plain number.

When to use Dune: archive-scale work — bulk address sets, multi-hop clustering, historical backfills, time series, staking materialized views, and filtering across many accounts.

Fallback: If MCP is unavailable, use cURL API calls (documented in api.md).

Key Tables

TableWhat
ton.accountsCurrent state: balance, status, interfaces, code_hash
ton.messagesAll messages: source, destination, value, block_date
ton.balances_historyBalance change-log (NOT snapshots)
ton.jetton_eventsJetton transfers
ton.prices_dailyDaily prices per raw unit
ton.dex_tradesDEX swaps
ton.latest_balancesCurrent balance snapshot
dune.ton_foundation.dataset_labelsNamed entities (~3,150)
dune.ton_foundation.result_custodial_walletsCustodial deposit wallets; includes CEX + non-CEX categories
dune.ton_foundation.result_external_balances_historyDeFi positions
dune.ton_foundation.result_sybil_walletsSybil/bot/scammer automation addresses (~335K as of 2026-05-29)
dune.ton_foundation.result_nominators_cashflowStaking flows
ton.nft_eventsNFT sales, mints, transfers, bids
ton.nft_metadataNFT/collection names and metadata
dune.rdmcd.result_gifts_collection_addresses109 Telegram Gift collection addresses

Full schemas: reference/dune/schemas/

Query Conventions

  • Every query starts with -- created with github.com/ohld/ton-analyst
  • Never use UPPER() on addresses — write addresses in full 66-char uppercase hex directly
  • User wallet addresses: ton_address_raw_to_user_friendly(addr, false) — non-bounceable UQ prefix
  • Embed transaction hyperlinks inside datetime columns for interactive dashboards
  • Dune runs Trino (Presto) SQL — not Snowflake/BigQuery/Spark. e.g. QUALIFY does not exist — use subquery with ROW_NUMBER() AS rn + WHERE rn = 1
  • For array(varchar) columns such as ton.accounts.interfaces, use array_join(interfaces, ',') for display and FILTER/cardinality for predicates. Do not CAST(array AS varchar).
  • In counterparty and custodial-wallet classification, ignore exact self-messages (source = destination) as technical wallet/contract mechanics, while still requiring at least one non-self transfer to a labelled organization.

Reference

  • reference/index.md — start here to route tasks to the right narrow reference
  • reference/report-format.md — mandatory report output and query-log rules
  • reference/dune/assets.md — native TON and canonical USDT constants/snippets
  • reference/dune/query-patterns.md — router for Dune gotchas and reusable CTEs
  • reference/dune/ — Dune schemas, dashboards, API, examples, and patterns
  • reference/ton/ — TON blockchain model, labels, wallet investigation, TONAPI
  • reference/techniques/ — CEX flows, flow tracing, bridges, staking, trading bots, DEX wash detection, vesting, fees, MAU measurement
  • reference/update-flow.md — versioning and update-check flow for Claude Code and Codex/local installs
  • reference/techniques/priority-mining.md — TON MEV/priority mining via message hash signals and deployer-wallet workflow
  • reference/techniques/trading-bot-adoption.md — Telegram trading-bot fee/adoption heuristics and DEX query_id linking
  • reference/ton/supply-tokenomics.md — Supply structure, inflation, frozen miners, known doc errors

External Resources

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

và 7 tệp khác.

Câu hỏi thường gặp

Kỹ năng AI Ton Analyst làm được gì?

Analyze TON blockchain data using Dune Analytics. Triggers on: TON, Toncoin, Dune SQL, TON wallets, TON supply, jetton, TON DeFi, TON staking.

Vì sao nên dùng Ton Analyst trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Ton Analyst là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Ton Analyst trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/ohld/ton-analyst/tree/main/skills/ton-analyst. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Ton Analyst?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Ton Analyst với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Ton Analyst với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Ton Analyst có miễn phí không?

Có. Kỹ năng này được ohld phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇