token-swap-best-practices

token-swap-best-practices is a skill for Claude Code, Codex from nirholas/three.ws. It costs 51 tokens per session (1,347 once invoked), scanned A, original, Apache-2.0.

A practical guide to swapping one cryptocurrency token for another on decentralised exchanges, where trades happen directly through blockchain software. It covers price impact, transaction fees, different networks, and failed swaps.

In plain words
What is it for?
Use it to compare exchange aggregators, choose slippage settings, reduce network fees, handle cross-chain swaps, and troubleshoot failed transactions.
Why use it?
It helps avoid paying too much, setting unsafe price limits, using the wrong network, or losing a transaction to avoidable errors.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

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.

agentmods
npx agentmods add skills/nirholas/three.ws/token-swap-best-practices
Any agent
npx skills add nirholas/three.ws --skill token-swap-best-practices
Clone the repo
git clone --depth 1 https://github.com/nirholas/three.ws

Made for: Claude Code, Codex.

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 token-swap-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/nirholas/three.ws/token-swap-best-practices.svg)](https://agentmods.dev/skills/nirholas/three.ws/token-swap-best-practices)
Your own site
<a href="https://agentmods.dev/skills/nirholas/three.ws/token-swap-best-practices"><img src="https://agentmods.dev/badge/skills/nirholas/three.ws/token-swap-best-practices.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,347 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00051 $0.01347
Opus 5 $0.00026 $0.00674
Sonnet 5 $0.00010 $0.00269
Haiku 4.5 $0.00005 $0.00135

Measured 2d ago against content hash 8586d64157d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

token-swap-best-practices 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 2d 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.

data/skills/trading/token-swap-best-practices/SKILL.md · 152 lines

How it starts

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

Token Swap Best Practices

A practical guide for AI agents helping users execute safe, efficient token swaps.

DEX Aggregators

Aggregators split your trade across multiple liquidity sources for the best price.

Aggregator Strengths Chains
1inch Most liquidity sources, limit orders Ethereum, Arbitrum, Polygon, BSC, +
0x (Matcha) Professional-grade, RFQ system Ethereum, Arbitrum, Polygon, +
Paraswap MEV protection, gasless swaps Ethereum, Arbitrum, Polygon, +
Jupiter Best for Solana Solana
CowSwap Batch auctions (MEV-free) Ethereum, Arbitrum

Always prefer aggregators over single DEXs — they find better prices by checking multiple sources.

Slippage Settings

Slippage tolerance = how much price movement you'll accept.

Setting When to Use Risk
0.1–0.3% Stablecoin pairs May fail on volatile tokens
0.5% Standard swaps Good default
1.0% Low-liquidity tokens Higher MEV exposure
3–5% Very low liquidity Significant MEV risk
>5% Almost never Extreme MEV vulnerability

Default recommendation: 0.5% for most swaps.

When Swaps Fail

If a swap fails with "insufficient output":

  1. Try slightly higher slippage (0.5% → 1.0%)
  2. Check if the token has transfer taxes (some meme tokens have 5–10% tax)
  3. Try a smaller amount
  4. Wait — price may be moving rapidly

Gas Optimization

Timing

Gas prices fluctuate. For non-urgent swaps:

  • Cheapest: Weekends, early UTC morning
  • Most expensive: Weekdays during US/EU business hours
  • Check: etherscan.io/gastracker or L2-specific dashboards

Chain Selection

Chain Typical Swap Cost Speed
Ethereum L1 $5–50+ 12 sec
Arbitrum $0.01–0.30 2 sec
Base $0.01–0.20 2 sec
Polygon $0.01–0.05 2 sec
BSC $0.05–0.50 3 sec
Solana $0.001–0.01 0.4 sec

Recommendation: For routine swaps, use L2s like Arbitrum (where Sperax ecosystem lives) for cents-level gas costs.

Read the full file on GitHub · 152 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. 2d ago First seen · 152 lines · 51 tokens per session scan A 8586d64157d3

Subscribe to this mod's changes

token-swap-best-practices is a skill published in the GitHub repository nirholas/three.ws (110 stars, last pushed yesterday), licensed Apache-2.0. It adds 51 tokens to every session and 1,347 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories

rtc-balance

Check RustChain wallet balance, epoch info, and network status via the public RPC.

Scottcjn/Rustchain · 20 tokens

blockchain-defi

Use this skill when asked about decentralized finance, DeFi protocols, AMM mechanics, lending and borrowing protocols, perpetual futures, yield farming, liquidity mining, liquid staking, restaking, yield optimization, DeFi security, MEV, and protocol composability. Covers AMM design (Uniswap, Curve, Balancer), lending…

j4flmao/agent-skills · 154 tokens

stablecoin-chain-explorer

Explore stablecoin TVL distribution and yield opportunities by blockchain. Query which chains have the most stablecoins, compare cross-chain yields, and find the best opportunities on Ethereum, BSC, Arbitrum, Base, Polygon, and more. Also for protocols and issuers researching where stablecoin TVL and liquidity…

barkermoney/barker-mcp · 102 tokens

apex-copilot

Use this skill when the user is working on a Web3 project and needs Apex Foundation diligence tools: scoring a crypto/Web3 project for investment readiness, matching against the Apex portfolio of 200+ projects, finding relevant Web3 hackathons, matching against Web3 VC funds and investors, smart contract code review…

Apex-Foundation/copilot-mcp · 245 tokens

gstd-sovereign

Full agent autonomy — self-sustaining economic entity that earns GSTD, manages finances, shares intelligence, recruits agents, and promotes financial independence.

gstdcoin/A2A · 35 tokens

crypto-report

Analyze cryptocurrency projects with tokenomics, on-chain metrics, and market analysis. Generate comprehensive crypto research reports.

claude-office-skills/skills · 24 tokens