Route trades across multiple DEXs to find optimal prices with minimal slippage and gas costs.

MITAuto-check passed

Install Routing Dex Trades

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill routing-dex-trades -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace routing-dex-trades --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/routing-dex-trades .claude/skills/routing-dex-trades && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
routing-dex-trades
GitHub stars
2.8k
Token cost
~1.1k tokens
SKILL.md length
334 words
Files
13 (incl. scripts, references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Route trades across multiple DEXs to find optimal prices with minimal slippage and gas costs.

  • Works in 4 steps: Install Python 3.9+ with httpx,… → Verify network access to aggregator APIs… → Optionally add API keys for 1inch and 0x… → …
  • Comparing DEX prices
  • SKILL.md covers Contents, Overview, Prerequisites and Instructions, plus 4 more sections
  • Runs Python scripts from its folder; calls python

What it does

Routing Dex Trades is an agent skill from jeremylongshore/tons-of-skills-marketplace. Route trades across multiple DEXs to find optimal prices with minimal slippage and gas costs. Use when comparing DEX prices, finding optimal swap routes, analyzing price impact, splitting large orders, or assessing MEV risk. Trigger with phrases like "find best swap", "compare DEX prices", "route trade", "optimal swap route", "split order", "DEX aggregator", "check slippage", or "MEV protection".

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 15 other files, including scripts and reference files (for example `ARD.md`, `PRD.md` and `config/settings.yaml`). Compatibility notes: Designed for Claude Code

The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Comparing DEX prices
  • Finding optimal swap routes
  • Analyzing price impact
  • Splitting large orders

Example prompts

  • “find best swap”
  • “compare DEX prices”
  • “route trade”
  • “/routing-dex-trades”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Grep, Glob, Bash(crypto:dex-*)

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Install Python 3.9+ with httpx, pydantic, and rich packages
  2. Verify network access to aggregator APIs (1inch, Paraswap, 0x)
  3. Optionally add API keys for 1inch and 0x (higher rate limits)
  4. Copy settings: cp ${CLAUDE_SKILL_DIR}/config/settings.yaml.example ${CLAUDE_SKILL_DIR}/config/settings.yaml

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Grep
    • Glob
    • Bash(crypto:dex-*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 6 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.1inch.io
    • developers.paraswap.network
    • 0x.org
    • docs.flashbots.net

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Routing Dex Trades loads about 1.1k tokens when it runs, and up to ~5.3k if it reads all its reference files. Until then it costs about 105 tokens; SKILL.md has 334 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~105
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 334 words, ~1,121 tokens.

Download SKILL.mdSave it as .claude/skills/routing-dex-trades/SKILL.md (or your agent's skills folder). This skill also uses 12 other files; get the full folder from GitHub.
name
routing-dex-trades
description
Route trades across multiple DEXs to find optimal prices with minimal slippage and gas costs. Use when comparing DEX prices, finding optimal swap routes, analyzing price impact, splitting large orders, or assessing MEV risk. Trigger with phrases like "find best swap", "compare DEX prices", "route trade", "optimal swap route", "split order", "DEX aggregator", "check slippage", or "MEV protection".
allowed-tools
Read, Write, Edit, Grep, Glob, Bash(crypto:dex-*)
compatibility
Designed for Claude Code
version
1.25.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
tags
crypto, cost-optimization, routing-dex

Routing DEX Trades

Contents

Overview | Prerequisites | Instructions | Output | Error Handling | Examples | Resources

Overview

Optimal trade routing across decentralized exchanges by aggregating quotes from 1inch, Paraswap, and 0x. Discovers multi-hop routes, calculates split orders for large trades, and assesses MEV risk to minimize slippage and gas costs.

Prerequisites

  1. Install Python 3.9+ with httpx, pydantic, and rich packages
  2. Verify network access to aggregator APIs (1inch, Paraswap, 0x)
  3. Optionally add API keys for 1inch and 0x (higher rate limits)
  4. Copy settings: cp ${CLAUDE_SKILL_DIR}/config/settings.yaml.example ${CLAUDE_SKILL_DIR}/config/settings.yaml

Instructions

  1. Get a quick quote for the single best price with gas cost and effective rate:

    bash
    python ${CLAUDE_SKILL_DIR}/scripts/dex_router.py ETH USDC 1.0
  2. Compare all DEXs to see quotes ranked by effective rate (after gas):

    bash
    python ${CLAUDE_SKILL_DIR}/scripts/dex_router.py ETH USDC 5.0 --compare
  3. Analyze multi-hop routes to compare direct vs. multi-hop (2-3 pools) with hop-by-hop breakdown:

    bash
    python ${CLAUDE_SKILL_DIR}/scripts/dex_router.py ETH USDC 10.0 --routes
  4. Split large orders ($10K+) across multiple DEXs to minimize total price impact:

    bash
    python ${CLAUDE_SKILL_DIR}/scripts/dex_router.py ETH USDC 100.0 --split
  5. Assess MEV risk (sandwich attack risk score: LOW/MEDIUM/HIGH) before executing:

    bash
    python ${CLAUDE_SKILL_DIR}/scripts/dex_router.py ETH USDC 50.0 --mev-check
  6. Run full analysis combining all features for comprehensive output:

    bash
    python ${CLAUDE_SKILL_DIR}/scripts/dex_router.py ETH USDC 25.0 --full --output json
Show full SKILL.md (171 more words)Show less

Output

  • Quick Quote: Best price, output amount, gas cost, recommended venue
  • Comparison: All venues ranked by effective rate with price impact and gas
  • Route Analysis: Direct vs. multi-hop with hop-by-hop breakdown
  • Split Mode: Optimal allocation percentages with dollar savings vs. single-venue
  • MEV Assessment: Risk score, exposure estimate, protection recommendations

See ${CLAUDE_SKILL_DIR}/references/implementation.md for detailed output examples.

Error Handling

ErrorCauseSolution
API Rate LimitedToo many requestsWait 60s or add API key for higher limits
Quote ExpiredStale price dataRefresh before execution; quotes valid ~30s
No Route FoundLow liquidity tokenTry larger DEXs or reduce trade size
Network TimeoutAggregator downRetry or check aggregator status page

See ${CLAUDE_SKILL_DIR}/references/errors.md for comprehensive error handling.

Examples

Compare prices for a 5 ETH swap:

bash
python ${CLAUDE_SKILL_DIR}/scripts/dex_router.py ETH USDC 5.0 --compare

Find optimal split for a large order:

bash
python ${CLAUDE_SKILL_DIR}/scripts/dex_router.py ETH USDC 100.0 --split

Check MEV risk before executing:

bash
python ${CLAUDE_SKILL_DIR}/scripts/dex_router.py ETH USDC 50.0 --mev-check

See ${CLAUDE_SKILL_DIR}/references/examples.md for multi-hop discovery and MEV-protected execution examples.

Resources

  • ${CLAUDE_SKILL_DIR}/references/implementation.md - Trade size guide, split optimization, MEV scoring, API config
  • 1inch API - Primary aggregator
  • Paraswap API - Secondary aggregator
  • 0x API - Third aggregator
  • Flashbots Protect - MEV protection

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 12 other files (scripts, references) in skills/.curated/routing-dex-trades of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • ARD.md
  • PRD.md
  • config/settings.yaml
  • references/errors.md
  • references/examples.md
  • references/implementation.md
  • scripts/dex_router.py
  • scripts/formatters.py
  • scripts/mev_assessor.py
  • scripts/quote_fetcher.py
  • scripts/route_optimizer.py
  • scripts/split_calculator.py

Open the folder on GitHubat commit cfae287

Compare with similar skills

Routing Dex Trades next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Routing Dex Trades compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Routing Dex Trades this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.1kAutomated safety check: PassMIT
Pricingsickn33/agentic-awesome-skills47k1 repos~1.9kAutomated safety check: PassMIT
Route Optimizerrevfactory/harness-1001.3k—~1.2kAutomated safety check: PassApache-2.0
Pricing Strategyalirezarezvani/claude-skills28k1 repos~3.5kAutomated safety check: PassMIT
SQL Optimizationgithub/awesome-copilot40k2 repos~2.3kAutomated safety check: PassMIT
SaaS Pricing Strategistsickn33/agentic-awesome-skills47k1 repos~1.5kAutomated safety check: PassMIT

Similar skills

  • Pricing

    sickn33/agentic-awesome-skills

    When the user wants help with pricing decisions, packaging, or monetization strategy.

    47k GitHub starsUsed in 1 repo~1.9k tokens
    Sales & SupportAuto-check passed
  • Route Optimizer

    revfactory/harness-100

    A route optimization tool that optimizes travel routing and minimizes travel time and cost.

    1.3k GitHub stars~1.2k tokensUpdated 6 mo ago
    Auto-check passed
  • Pricing Strategy

    alirezarezvani/claude-skills

    Design, optimize, and communicate SaaS pricing — tier structure, value metrics, pricing pages, and price increase strategy.

    28k GitHub starsUsed in 1 repo~3.5k tokens
    Sales & SupportAuto-check passed
  • SQL Optimization

    github/awesome-copilot

    Official

    Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across all SQL databases (MySQL, PostgreSQL, SQL Server…

    40k GitHub starsUsed in 2 repos~2.3k tokens
    DatabasesAuto-check passed
  • SaaS Pricing Strategist

    sickn33/agentic-awesome-skills

    Design, optimize, and test pricing strategies for SaaS products using data-driven frameworks, competitive analysis, and psychological pricing principles.

    47k GitHub starsUsed in 1 repo~1.5k tokens
    Marketing & SEOAuto-check passed
  • Pricing Strategy

    phuryn/pm-skills

    Analyze and design pricing strategies including pricing models, competitive pricing analysis, willingness-to-pay estimation, and price elasticity.

    27k GitHub stars~913 tokensUpdated 2 days ago
    Sales & SupportAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Questions about Routing Dex Trades

What does Routing Dex Trades do?

Route trades across multiple DEXs to find optimal prices with minimal slippage and gas costs. Routing Dex Trades is an agent skill from jeremylongshore/tons-of-skills-marketplace. Route trades across multiple DEXs to find optimal prices with minimal slippage and gas costs.

When should I use Routing Dex Trades?

Routing Dex Trades fits situations like: comparing DEX prices; finding optimal swap routes; analyzing price impact; splitting large orders.

How do I install Routing Dex Trades in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill routing-dex-trades -a claude-code`. Or copy the skill folder (skills/.curated/routing-dex-trades in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/routing-dex-trades in your project. Claude Code loads it when a task matches its description.

How do I install Routing Dex Trades in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill routing-dex-trades -a codex`. Or copy the skill folder (skills/.curated/routing-dex-trades in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/routing-dex-trades in your project. Codex loads it when a task matches its description.

Can I use Routing Dex Trades in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill routing-dex-trades -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/routing-dex-trades, .gemini/skills/routing-dex-trades, .github/skills/routing-dex-trades and .opencode/skills/routing-dex-trades in your project.

What does Routing Dex Trades need to run?

Going by SKILL.md and its folder, Routing Dex Trades needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash(crypto:dex-*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Routing Dex Trades access the network?

SKILL.md names 4 domains. As links in the text: docs.1inch.io, developers.paraswap.network, 0x.org and docs.flashbots.net. This is read from the text; nothing was executed.

Is Routing Dex Trades safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Routing Dex Trades use?

Routing Dex Trades is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Routing Dex Trades use?

About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.2k tokens, read only when the agent opens those files.

What are the alternatives to Routing Dex Trades?

Skills that share tags, products or a category with Routing Dex Trades: Pricing (sickn33/agentic-awesome-skills, 47k stars), Route Optimizer (revfactory/harness-100, 1.3k stars), Pricing Strategy (alirezarezvani/claude-skills, 28k stars) and SQL Optimization (github/awesome-copilot, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Routing Dex Trades?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.