tres-asset-balance-validation
Validate wallet balances in TRES Finance against DeBank and generate a discrepancy report. Use this skill whenever the user asks to validate, verify…
от anthropics★ 4 977 звёзд на GitHub
Установить tres-asset-balance-validation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Tres Finance — Asset Balance Validation
Overview
This skill validates wallet balances in Tres Finance against DeBank, providing a clear discrepancy report as both an interactive HTML file and a PDF. It compares per-asset token amounts (including DeFi position underlying tokens) for each EVM wallet and flags matches, minor differences, major discrepancies, missing assets, untracked tokens, and unmatched positions.
Scope: Only EVM-compatible wallets are supported (DeBank limitation). Exchange accounts, non-EVM chains, and empty wallets are skipped.
When to Use
Trigger this skill whenever a user asks to:
- Validate or verify their TRES balances
- Cross-check or audit wallets against external on-chain data
- Compare TRES data to DeBank
- Check if their balances are correct
Example phrases:
- "Validate my balances"
- "Check my wallets against DeBank"
- "Are my TRES balances correct?"
- "Show me any discrepancies between TRES and on-chain data"
Prerequisites
| Requirement | Details |
|---|---|
| TRES Finance access | Must be authenticated via get_viewer |
| DeBank API key | Free key available at cloud.debank.com |
| EVM wallets | At least one 0x... wallet tracked in TRES |
Process Overview
Step 1 — Authenticate with TRES
Call get_viewer to confirm the organization name.
Step 2 — Fetch wallets and balances from TRES
IMPORTANT — Timeout handling: The internalAccount query with both balances and positions will timeout for large orgs. Split into two separate queries:
Query 1: Wallets + Balances only (no positions)
query {
internalAccount {
results {
id
name
identifier
isExchange
platforms
balances {
amount
asset {
symbol
contract { identifier }
}
fiatValue { value unitPrice fiatCurrency }
}
}
}
}
Note: The
amountfield is returned as a string, not a number. Alwaysfloat()it before arithmetic.
Wallet classification:
| Type | Condition | Validated? |
|---|---|---|
| EVM | 0x... address + EVM platform + isExchange: false |
✅ Yes |
| Exchange | isExchange: true |
❌ No |
| Non-EVM | Bitcoin, Tezos, Tron, etc. | ❌ No |
| Empty | No asset balances | ❌ No |
Supported EVM platforms: Ethereum, Arbitrum, Optimism, Polygon, Base, Avalanche, Binance, Gnosis Chain, zkSync, Fantom, Celo, Berachain, Linea, Scroll, Sonic, HyperEVM.
Step 3 — Fetch DeFi positions from TRES
Do NOT use the positions sub-field on internalAccount — it returns all historical snapshots (can be 3000+ entries per wallet) and will timeout or exceed token limits.
Instead, use the dedicated getStatelessWalletsPositions query which returns current positions only:
query {
getStatelessWalletsPositions(
walletIdentifiers: ["0x..."],
platform: ETHEREUM,
application: "aave-v3"
) {
walletIdentifier
displayName
positionType
platform
children {
symbol
amount
assetIdentifier
fiatValue
}
fiatValue
id
}
}
Required parameters:
walletIdentifiers: array of wallet addressesplatform: must be an enum value likeETHEREUM,POLYGON,ARBITRUM, etc.
Optional but recommended:
application: filter by protocol (e.g."aave-v3","verse","lido","merkl","uniswap-v4","sablier","ethena","stakewise","quickswap","steer","yieldnest","morphoblue")
IMPORTANT: Without the application filter, the query returns empty results. Always specify the application.
Batching strategy:
- First, fetch DeBank
all_complex_protocol_listfor each wallet to discover which protocols have positions - Map DeBank protocol names to TRES application names (lowercase, hyphenated)
- Use GraphQL aliases to batch multiple wallet+platform+application combos into a single query:
query {
a1: getStatelessWalletsPositions(walletIdentifiers: ["0x..."], platform: ETHEREUM, application: "aave-v3") {
walletIdentifier displayName positionType platform id
children { symbol amount assetIdentifier fiatValue }
}
a2: getStatelessWalletsPositions(walletIdentifiers: ["0x..."], platform: ETHEREUM, application: "verse") {
walletIdentifier displayName positionType platform id
children { symbol amount assetIdentifier fiatValue }
}
}
Keep each batched query to ~6 aliases max to avoid timeouts.
Step 4 — Retrieve DeBank API key
Read DEBANK_API_KEY from plugin user config — do not ask the user to paste it in chat.
If the key is absent or empty, stop and display:
"DEBANK_API_KEY is not configured. Please add it via the plugin settings (obtain your key at https://cloud.debank.com)."
Step 5 — Fetch DeBank data via bash
For each EVM wallet, fetch two endpoints:
- Token balances:
all_token_list— covers all chains without r
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл tres-asset-balance-validation?
Validate wallet balances in TRES Finance against DeBank and generate a discrepancy report. Use this skill whenever the user asks to validate, verify, cross-check, or audit their TRES balances against on-chain data or DeBank. Also trigger when the user asks if their balances are correct or wants to see discrepancies. Only EVM-compatible wallets are supported.
Как установить скилл tres-asset-balance-validation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tres-asset-balance-validation запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
AnthropicUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
xlsx
AnthropicUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
pptx
AnthropicUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…