dex-execution

dex-execution is a skill for Claude Code from agiprolabs/claude-trading-skills. It costs 23 tokens per session (2,441 once invoked), scanned B, original, MIT.

A guide and code workflow for swapping tokens on Solana through Jupiter, a service that compares routes across multiple decentralised exchanges.

In plain words
What is it for?
It helps request quotes, build transactions, show them for user confirmation, sign and submit swaps, and verify that transactions completed.
Why use it?
It helps find a route for a swap while making the expected output, slippage, fees and transaction details visible before signing.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the trading-skills plugin — 68 skills shipped together

Good fit It helps request quotes, build transactions, show them for user confirmation, sign and submit swaps, and verify that transactions completed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agiprolabs/claude-trading-skills/dex-execution
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add agiprolabs/claude-trading-skills --skill dex-execution
Clone the repo
git clone --depth 1 https://github.com/agiprolabs/claude-trading-skills

Made for: Claude Code.

Or install trading-skills, the plugin that ships this one along with the rest of its 68 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 dex-execution

README.md
[![agentmods](https://agentmods.dev/badge/skills/agiprolabs/claude-trading-skills/dex-execution/github.svg)](https://agentmods.dev/skills/agiprolabs/claude-trading-skills/dex-execution)
Your own site
<a href="https://agentmods.dev/skills/agiprolabs/claude-trading-skills/dex-execution"><img src="https://agentmods.dev/badge/skills/agiprolabs/claude-trading-skills/dex-execution/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 dex-execution

Your own site · 80×15
<a href="https://agentmods.dev/skills/agiprolabs/claude-trading-skills/dex-execution"><img src="https://agentmods.dev/badge/skills/agiprolabs/claude-trading-skills/dex-execution.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,441 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 73
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Excessive Agency · line 223
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.00023 $0.02441
Opus 5 $0.00012 $0.01221
Sonnet 5 $0.00005 $0.00488
Haiku 4.5 $0.00002 $0.00244

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

Security

Grade B, and why

dex-execution scanned grade B with 1 finding 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.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/get_quote.py, scripts/simulate_swap.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

resp = httpx.post("https://quote-api.jup.ag/v6/swap", json=swap_body)
skills/dex-execution/SKILL.md · 254 lines

How it starts

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

DEX Execution — Solana Swap Execution via Jupiter

Execute token swaps on Solana through Jupiter, the dominant DEX aggregator routing across Raydium, Orca, Meteora, Phoenix, Lifinity, and 20+ other venues.

Overview

Jupiter aggregates liquidity across all major Solana DEXes to find optimal swap routes. A single swap may split across multiple pools and hop through intermediate tokens to minimize price impact. The Jupiter v6 API handles route discovery, transaction building, and fee optimization — your code handles quoting, user confirmation, signing, and submission.

Base URL: https://quote-api.jup.ag/v6

Execution Pipeline

Every swap follows this seven-step pipeline. Never skip steps 2-3 (display and confirm).

Step 1 — Get Quote

import httpx

params = {
    "inputMint": "So11111111111111111111111111111111111111112",   # SOL
    "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", # USDC
    "amount": 1_000_000_000,  # 1 SOL in lamports
    "slippageBps": 50,        # 0.5%
}
resp = httpx.get("https://quote-api.jup.ag/v6/quote", params=params)
quote = resp.json()

Step 2 — Display Quote to User

Always show these fields before proceeding:

Field Source
Input amount quote["inAmount"] (in token decimals)
Output amount quote["outAmount"]
Minimum received quote["otherAmountThreshold"]
Price impact quote["priceImpactPct"]
Route quote["routePlan"] — DEXes used
Slippage The slippageBps you requested

Step 3 — Require User Confirmation

⚠️  SWAP PREVIEW
    Selling:   1.000 SOL
    Buying:    ~142.50 USDC
    Min recv:  141.79 USDC (0.5% slippage)
    Impact:    0.01%
    Route:     Raydium V4 → USDC

    Proceed? [y/N]

NEVER proceed without explicit "yes" from the user.

Step 4 — Build Transaction

swap_body = {
    "quoteResponse": quote,
    "userPublicKey": "YourPubkeyBase58...",
    "wrapAndUnwrapSol": True,
    "dynamicComputeUnitLimit": True,
    "prioritizationFeeLamports": "auto",
}
resp = httpx.post("https://quote-api.jup.ag/v6/swap", json=swap_body)
swap_data = resp.json()
swap_tx = swap_data["swapTransaction"]  # base64-encoded transaction

Read the full file on GitHub · 254 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 254 lines · 23 tokens per session scan B 46ae4b8a3613

Subscribe to this mod's changes

dex-execution is a skill published in the GitHub repository agiprolabs/claude-trading-skills (354 stars, last pushed 8d ago), licensed MIT. It adds 23 tokens to every session and 2,441 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (sends data to an external url). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.