From tronlink-skills
This skill should be used when the user asks about 'TRON energy', 'TRON bandwidth', 'how much energy do I need', 'energy cost on TRON', 'bandwidth insufficient', 'resource delegation on TRON', 'rent energy on TRON', 'TRON transaction fee', 'why is my TRON transaction expensive', 'optimize TRON costs', or mentions Energy, Bandwidth, resource management, fee estimation, or cost optimization on the TRON network. This is a TRON-specific concept with no direct equivalent on EVM chains. Do NOT use for staking/voting — use tron-staking. Do NOT use for balance queries — use tron-wallet.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tronlink-skills:tron-resourceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
9 commands for resource query, energy estimation, bandwidth estimation, energy price, bandwidth price, transaction cost estimation, chain parameters, energy rental marketplace, and cost optimization.
9 commands for resource query, energy estimation, bandwidth estimation, energy price, bandwidth price, transaction cost estimation, chain parameters, energy rental marketplace, and cost optimization.
Unlike Ethereum's gas model, TRON uses TWO separate resources:
getEnergyFee ÷ 1e6 — ≈ 3–6.5 TRX at the mid-2026 fee of ~100 SUN (was ~13–27 TRX at the old 420-SUN rate). Always check the live fee with energy-price.| Operation | Energy Needed | TRX Burned (no staking) | With Staked Energy |
|---|---|---|---|
| TRX transfer | 0 | 0 (free bandwidth) | 0 |
| USDT transfer | ~65,000 | ~3-6.5 TRX | 0 TRX |
| SunSwap V2 swap | ~65,000-200,000 | ~6.5-20 TRX | 0 TRX |
| Contract deployment | ~200,000-1,000,000+ | ~20-100+ TRX | 0 TRX |
| Approve token | ~30,000 | ~3 TRX | 0 TRX |
⚠️ The TRX-burned column assumes the live
getEnergyFee≈ 100 SUN (mid-2026) and scales linearly with it (it was 420 SUN in 2023–2024 → ~4.2× these numbers). Runenergy-pricefor the current value before quoting costs.
Every command below runs node "$TRON_API". Set $TRON_API once per session so it works no matter how the skill was installed (Claude Code plugin, install.sh → ~/.tronlink-skills, or inside the cloned repo):
TRON_API="${CLAUDE_PLUGIN_ROOT:-$HOME/.tronlink-skills}/scripts/tron_api.mjs"
[ -f "$TRON_API" ] || TRON_API="scripts/tron_api.mjs" # fallback when run inside the repo
node "$TRON_API" resource-info --address <TRON_ADDRESS>
Returns:
node "$TRON_API" estimate-energy \
--contract <CONTRACT_ADDRESS> \
--function <FUNCTION_SIGNATURE> \
--params <PARAMS> \
--caller <CALLER_ADDRESS>
Shortcut for common operations:
# Estimate energy for USDT transfer
node "$TRON_API" estimate-energy \
--contract TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t \
--function "transfer(address,uint256)" \
--params "<TO_ADDRESS>,1000000" \
--caller <YOUR_ADDRESS>
Returns: estimated Energy consumption (and energy_price_sun fetched live from chain params) plus the equivalent TRX cost.
⚠️ --params must be ABI-encoded (hex, no 0x) when the function takes arguments — the script does not encode address,amount strings for you. For transfer(address,uint256) that's the 64-hex-padded recipient concatenated with the 64-hex-padded amount. Omit --params to estimate the base call cost.
node "$TRON_API" estimate-bandwidth --tx-size <BYTES>
Returns: estimated Bandwidth consumption, whether free allowance covers it.
node "$TRON_API" energy-price
Returns: the live on-chain Energy price in SUN (1 TRX = 1,000,000 SUN), TRX cost per 10,000 Energy, and example burn costs at the current price for a USDT transfer and a SunSwap V2 swap. Note: this is a point-in-time snapshot — it does not include a historical price trend.
node "$TRON_API" energy-rental --amount <ENERGY_NEEDED>
Returns: a directory of third-party energy-rental platforms (names + links) for the requested amount. Note: it does not fetch live per-platform pricing — open each platform to compare current rates.
Common rental platforms:
node "$TRON_API" optimize-cost --address <TRON_ADDRESS>
Returns: personalized recommendations:
node "$TRON_API" bandwidth-price
Returns the live on-chain Bandwidth price (getTransactionFee, SUN/byte) and example burn costs. Complements energy-price (Energy ↔ Bandwidth are TRON's two separate resources).
node "$TRON_API" tx-cost --type <trc20-transfer|trx-transfer|trc20-transfer-existing|approve|swap-v2|swap-v3>
One-stop cost for a common operation: bandwidth + energy needed, the live energy/bandwidth prices, and total TRX burned if you have no staked resources (0 if you do). Use this to answer "how much will this transfer/swap cost me?" without chaining energy-price + estimate-* by hand.
node "$TRON_API" chain-params
Returns key TRON governance parameters: energy price, bandwidth price, account-creation fee, memo fee, max fee limit, SR block reward — with TRX-denominated derivations. Good for cost transparency and verifying live fees.
User wants to do a smart contract operation?
├── Check energy: resource-info --address <addr>
├── Has enough energy? → Proceed
└── Not enough energy?
├── Frequent user (daily TRC-20 transfers)?
│ └── Recommend: Freeze TRX for Energy (tron-staking)
├── Occasional user (1-2 tx/week)?
│ └── Recommend: Rent energy from marketplace
└── One-time user?
└── Recommend: Accept TRX burn (simplest)
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub tronlink/tronlink-skills --plugin tronlink-skills