tron-swap

tron-swap is a skill for Claude Code from TronLink/tronlink-skills. It costs 137 tokens per session (1,466 once invoked), scanned A, original, MIT.

A read-only TRON trading tool for getting token-swap quotes, comparing routes, and checking transaction status. A decentralised exchange lets users trade tokens through blockchain contracts rather than a central order book.

In plain words
What is it for?
It is for checking exchanges such as TRX-to-USDT or other TRC-20 swaps, optimising a route, and tracking the status of an existing swap.
Why use it?
It lets you inspect a proposed swap and its route without signing or broadcasting a transaction.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT variable. Also seen: mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the tronlink-skills plugin — 6 skills shipped together

Good fit It is for checking exchanges such as TRX-to-USDT or other TRC-20 swaps, optimising a route, and tracking the status of an existing swap.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add TronLink/tronlink-skills
Claude Code
/plugin install tronlink-skills

Made for: Claude Code.

Or install tronlink-skills, the plugin that ships this one along with the rest of its 6 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tron-swap

README.md
[![agentmods](https://agentmods.dev/badge/skills/tronlink/tronlink-skills/tron-swap/github.svg)](https://agentmods.dev/skills/tronlink/tronlink-skills/tron-swap)
Your own site
<a href="https://agentmods.dev/skills/tronlink/tronlink-skills/tron-swap"><img src="https://agentmods.dev/badge/skills/tronlink/tronlink-skills/tron-swap/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tron-swap

Your own site · 80×15
<a href="https://agentmods.dev/skills/tronlink/tronlink-skills/tron-swap"><img src="https://agentmods.dev/badge/skills/tronlink/tronlink-skills/tron-swap.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 137 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,466 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00137 $0.01466
Opus 5 $0.00068 $0.00733
Sonnet 5 $0.00027 $0.00293
Haiku 4.5 $0.00014 $0.00147

Measured 11d ago against content hash 9cfc44da4dfe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

tron-swap scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/tron-swap/SKILL.md · 123 lines

How it starts

The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TRON DEX Swap

3 commands for swap quote, route optimization, and transaction status tracking (read-only queries).

Pre-flight Checks

  1. Confirm Node.js >= 18:

    node -e "console.log('ok')"  # Node.js >= 18 required
    
  2. Check energy before swapping: Swaps consume significant Energy (typically 50,000–200,000). Run:

    node "$TRON_API" resource-info --address <YOUR_ADDRESS>
    

    If energy is insufficient, consider freezing TRX first (tron-staking) or accept TRX burn cost.

Resolve the CLI path

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

Read-only: these commands quote and inspect swaps; they do not sign or broadcast transactions.

Commands

1. Swap Quote

node "$TRON_API" swap-quote \
  --from-token <FROM_CONTRACT_OR_TRX> \
  --to-token <TO_CONTRACT_OR_TRX> \
  --amount <HUMAN_READABLE_AMOUNT> \
  [--slippage 0.5]

Returns: expected output amount, slippage_pct, minimum_received (= amount_out × (1 − slippage), your worst-case fill), price impact, fee, route path, and estimated energy cost. Default slippage is 0.5%; --slippage is validated to the 0–50% range (a larger value is rejected rather than producing a negative minimum_received). --amount must be a positive number. The same slippage parameter is also exposed on the MCP tron_swap_quote tool.

⚠️ Amount is human-readable — pass 100 for 100 TRX, NOT 100000000.

Example:

# Quote: 100 TRX → USDT
node "$TRON_API" swap-quote \
  --from-token TRX \
  --to-token TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t \
  --amount 100

2. Best Route

node "$TRON_API" swap-route \
  --from-token <FROM_CONTRACT> \
  --to-token <TO_CONTRACT> \
  --amount <AMOUNT>

Read the full file on GitHub · 123 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 123 lines · 137 tokens per session scan A 9cfc44da4dfe

Subscribe to this mod's changes

tron-swap is a skill published in the GitHub repository TronLink/tronlink-skills (7 stars, last pushed 2mo ago), licensed MIT. It adds 137 tokens to every session and 1,466 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.