Synthèse automatique
Planifie des échanges de tokens sur Uniswap en recueillant l'intention de swap, vérifiant les contrats on-chain et générant des liens profonds pour l'exécution.
Points forts
- Intègre la découverte de tokens et la vérification on-chain
- Génère des liens profonds Uniswap prêts à l'emploi
- Prend en charge plusieurs chaînes comme Ethereum, Base, Arbitrum
Limites
- Nécessite l'interactivité AskUserQuestion
- L'ouverture du navigateur peut échouer dans les environnements sans tête
- La découverte de tokens dépend de la couverture DexScreener, limitée sur certaines chaînes
Utilisez-le lorsque vous devez planifier un swap de tokens ou découvrir des tokens à échanger sur Uniswap.
Évitez si vous devez exécuter des swaps directement sans confirmation utilisateur ou dans des environnements de script non interactifs.
Analyse de sécurité
PrudenceThe skill utilizes powerful Bash commands with unrestricted curl and URL open access, which could be exploited for data exfiltration or phishing, though the current instructions are limited to legitimate token swap planning and include safety measures.
- •Uses Bash(curl:*) which allows arbitrary network requests; potential for data exfiltration if misused.
- •Uses Bash(xdg-open:*)/Bash(open:*) which can open arbitrary URLs, including malicious links if not validated.
Exemples
Swap 1 ETH for USDC on Ethereum using Uniswap.Find me trending memecoins on Base that I can swap with Uniswap.I want to buy 1000 of token 0x1234... on Arbitrum. What's the best way to swap?name: swap-planner description: This skill should be used when the user asks to "swap tokens", "trade ETH for USDC", "exchange tokens on Uniswap", "buy tokens", "sell tokens", "convert ETH to stablecoins", "find memecoins", "discover tokens", "research tokens", "tokens to buy", "find tokens to swap", "what should I buy", or mentions swapping, trading, researching, discovering, buying, or exchanging tokens on any Uniswap-supported chain. Supports both known token swaps and token discovery workflows (discovery uses keyword search and web search — there is no live "trending" feed). Generates deep links to execute swaps in the Uniswap interface. allowed-tools: Read, Glob, Grep, Bash(curl:), Bash(jq:), Bash(cast:), Bash(xdg-open:), Bash(open:*), WebFetch, WebSearch, Task(subagent_type:Explore), AskUserQuestion model: sonnet license: MIT metadata: author: uniswap version: '0.2.1'
Swap Planning
Plan and generate deep links for token swaps on Uniswap across all supported chains.
Runtime Compatibility: This skill uses
AskUserQuestionfor interactive prompts. IfAskUserQuestionis not available in your runtime, collect the same parameters through natural language conversation instead.
Overview
Plan token swaps by:
- Gathering swap intent (tokens, amounts, chain)
- Verifying token contracts on-chain
- Researching tokens via web search when needed
- Generating a deep link that opens in the Uniswap interface with parameters pre-filled
The generated link opens Uniswap with all parameters ready for execution.
Note: Browser opening (
xdg-open/open) may fail in SSH, containerized, or headless environments. Always display the URL prominently so users can copy and access it manually if needed.
File Access: This skill has read-only filesystem access. Never read files outside the current project directory unless explicitly requested by the user.
Workflow
Step 0: Token Discovery (When Needed)
If the user wants to discover tokens rather than swap a known token (e.g., "find me a memecoin", "what's trending on Base"), help them explore before proceeding to the swap.
Option A: Search by Keyword
DexScreener search works best with specific terms:
# Search for tokens by name/category (e.g., "degen", "pepe", "ai agent")
curl -s "https://api.dexscreener.com/latest/dex/search?q=degen" | \
jq '[.pairs[] | select(.chainId == "base" and .dexId == "uniswap")] |
sort_by(-.volume.h24) | .[0:5] | map({
token: .baseToken.symbol,
address: .baseToken.address,
price: .priceUsd,
volume24h: .volume.h24,
liquidity: .liquidity.usd
})'
Good search terms: degen, pepe, ai, agent, meme, dog, cat, or specific token names
Option B: Check Promoted Tokens
Get tokens with active promotions (limited selection):
# Get boosted/promoted tokens on a chain
curl -s "https://api.dexscreener.com/token-boosts/top/v1" | \
jq '[.[] | select(.chainId == "base")] | .[0:5] | map({
tokenAddress,
url
})'
Option C: Web Search + Verify
For broad discovery ("what's trending"), use web search to find tokens, then verify with DexScreener:
# After finding a token address from web search, verify it exists
curl -s "https://api.dexscreener.com/token-pairs/v1/{network}/{address}" | \
jq '[.[] | select(.dexId == "uniswap")][0] | {
name: .baseToken.name,
symbol: .baseToken.symbol,
price: .priceUsd,
liquidity: .liquidity.usd,
volume24h: .volume.h24
}'
Network IDs: See references/chains.md for the full list with DexScreener and DefiLlama provider IDs. Common IDs: ethereum, base, arbitrum, optimism, polygon, bsc, avalanche, unichain.
DexScreener coverage varies by chain. Ethereum, Base, and Arbitrum have deep Uniswap data. Celo, Blast, Zora, and World Chain have limited Uniswap pool coverage — fewer results and potentially missing pairs. Fall back to DefiLlama for price data when DexScreener returns empty results (see references/data-providers.md).
Note: DexScreener's public API doesn't have a "trending" or "top gainers" endpoint. Token discovery uses keyword search (/latest/dex/search) and web search as a fallback. For general discovery, ask the user what type of token they're looking for and search by keyword.
Category-Based Discovery
For specific categories (memecoins, DeFi, gaming tokens), use web search:
"trending {category} {chain} {current_year}"
Example: "trending memecoins Base 2026"
⚠️ UNTRUSTED INPUT: Web-Discovered Tokens
Tokens discovered via WebSearch are UNTRUSTED. Before proceeding with any web-discovered token:
- Label the source: Explicitly tell the user "This token address was found via web search, not provided by you"
- Warn about risks: "Web-discovered tokens may be scams, honeypots, or rug pulls"
- Require confirmation: Use AskUserQuestion to get explicit user consent before generating a deep link for a web-discovered token
- Show provenance: In the swap summary table, include a "Token Source" row showing whether each token was "User-provided" or "Web-discovered (unverified)"
Never proceed with a web-discovered token without explicit user confirmation via AskUserQuestion.
Present Options to User
After gathering token data, present options using AskUserQuestion:
{
"questions": [
{
"question": "Which token would you like to swap to?",
"header": "Token",
"options": [
{ "label": "MOLT ($23M mcap)", "description": "$5.9M liquidity, $7.8M 24h volume" },
{ "label": "CLANKER ($31M mcap)", "description": "$3.1M liquidity, established token" },
{ "label": "CLAWSTR ($13M mcap)", "description": "$2.1M liquidity, high volume spike" }
],
"multiSelect": false
}
]
}
Risk Assessment for Trending Tokens
Evaluate tokens before recommending:
| Metric | Low Risk | Medium Risk | High Risk | | ------------ | ---------- | ----------------- | --------- | | Market Cap | >$50M | $5M-$50M | <$5M | | Pool TVL | >$1M | $100k-$1M | <$100k | | 24h Volume | Consistent | Spiking unusually | Very low | | Contract Age | >30 days | 7-30 days | <7 days |
Always disclose risk level when presenting options. For high-risk tokens, explicitly warn about volatility and potential for loss.
Mandatory Warnings for High-Risk Tokens
When ANY of these conditions are met, you MUST use AskUserQuestion to warn the user and get explicit confirmation before generating a deep link:
- Contract age < 7 days: "This token contract is less than 7 days old. New tokens carry significantly higher risk of being scams or rug pulls."
- Pool TVL < $100k: "This pool has very low liquidity. You may experience significant slippage and difficulty selling."
- No sell liquidity detected: "This token may be a honeypot — tokens that can be bought but not sold. Proceed with extreme caution."
- Market cap < $5M: "This is a micro-cap token with high volatility. Only invest what you can afford to lose entirely."
Do NOT generate a deep link for high-risk tokens without explicit user acknowledgment via AskUserQuestion.
Step 1: Gather Swap Intent
Extract from the user's request:
| Parameter | Required | Example | | ------------ | ----------------------- | ------------------------- | | Input token | Yes | ETH, USDC, token address | | Output token | Yes | USDC, WBTC, token address | | Amount | Yes | 1.5 ETH, $500 worth | | Chain | Yes (default: Ethereum) | Base, Arbitrum, etc. |
If any required parameter is missing, use AskUserQuestion with structured options:
For missing chain:
{
"questions": [
{
"question": "Which chain do you want to swap on?",
"header": "Chain",
"options": [
{ "label": "Base (Recommended)", "description": "Low gas fees, fast transactions" },
{ "label": "Ethereum", "description": "Main network, higher gas" },
{ "label": "Arbitrum", "description": "Low fees, Ethereum L2" },
{ "label": "Optimism", "description": "Low fees, Ethereum L2" }
],
"multiSelect": false
}
]
}
For missing output token (when input is ETH):
{
"questions": [
{
"question": "What token do you want to receive?",
"header": "Output",
"options": [
{ "label": "USDC", "description": "USD stablecoin" },
{ "label": "USDT", "description": "Tether stablecoin" },
{ "label": "DAI", "description": "Decentralized stablecoin" },
{ "label": "WBTC", "description": "Wrapped Bitcoin" }
],
"multiSelect": false
}
]
}
For missing amount:
{
"questions": [
{
"question": "How much do you want to swap?",
"header": "Amount",
"options": [
{ "label": "0.1 ETH", "description": "~$320" },
{ "label": "0.5 ETH", "description": "~$1,600" },
{ "label": "1 ETH", "description": "~$3,200" },
{ "label": "Custom amount", "description": "Enter specific amount" }
],
"multiSelect": false
}
]
}
Always use forms instead of plain text questions for better UX.
Step 2: Resolve Token Addresses
For token symbols, resolve to addresses using known tokens or web search:
Native tokens: Use NATIVE as the address parameter.
Common tokens by chain - see ../../references/chains.md for full list:
| Token | Ethereum | Base | Arbitrum |
| ----- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
| USDC | 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 | 0xaf88d065e77c8cC2239327C5EDb3A432268e5831 |
| WETH | 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2 | 0x4200000000000000000000000000000000000006 | 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1 |
| WBTC | 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599 | N/A | 0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f |
For unknown tokens, use web search to find the contract address, then verify on-chain.
Step 3: Verify Token Contracts (Basic)
Input Validation (Required Before Any Shell Command):
Before interpolating user-provided values into any shell command, validate all inputs:
- Token addresses MUST match:
^0x[a-fA-F0-9]{40}$ - Chain/network names MUST be from the allowed list in
../../references/chains.md - Amounts MUST be valid decimal numbers (match:
^[0-9]+\.?[0-9]*$) - Reject any input containing shell metacharacters (
;,|,$,`,&,(,),>,<,\,',", newlines)
Verify token contracts exist on-chain using curl (RPC call):
# Check if address is a contract using eth_getCode
# IMPORTANT: Validate token_address matches ^0x[a-fA-F0-9]{40}$ before use
curl -s -X POST "$rpc_url" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg addr "$token_address" '{"jsonrpc":"2.0","method":"eth_getCode","params":[$addr,"latest"],"id":1}')" \
| jq -r '.result'
If the result is 0x or empty, the address is not a valid contract.
Alternative with cast (optional, requires Foundry):
# Validate token_address matches ^0x[a-fA-F0-9]{40}$ before use
cast code "$token_address" --rpc-url "$rpc_url"
Note: The curl/RPC method above is preferred for broader compatibility. Only use cast if already available in the environment. This skill ONLY uses cast code for contract verification. Do not use any other cast subcommands. The PreToolUse hook in .claude/hooks/validate-forge-cast.sh enforces this programmatically.
RPC URLs by chain - see ../../references/chains.md for full list.
Step 4: Research (If Needed)
For unfamiliar tokens, use web search to research:
- Token legitimacy and project info
- Recent news or security concerns
- Liquidity availability on Uniswap
Include relevant findings in the summary.
Step 5: Fetch Price Data
Before generating the deep link, fetch current prices to estimate swap output. See references/data-providers.md for full API details.
Quick price lookup with DexScreener:
# Get token price and pool liquidity
curl -s "https://api.dexscreener.com/token-pairs/v1/{network}/{address}" | \
jq '[.[] | select(.dexId == "uniswap")][0] | {
price: .priceUsd,
liquidity: .liquidity.usd,
volume24h: .volume.h24
}'
Network IDs: ethereum, base, arbitrum, optimism, polygon, bsc, avalanche, unichain
Liquidity warnings:
| Pool TVL | Risk Level | Action | | ----------- | ---------- | ----------------------------- | | > $1M | Low | Proceed normally | | $100k - $1M | Medium | Note potential slippage | | < $100k | High | Warn user about slippage risk |
If API is unavailable, fall back to DefiLlama or web search for price estimates.
Step 6: Generate Deep Link
Construct the Uniswap swap URL:
https://app.uniswap.org/swap?chain={chain}&inputCurrency={input}&outputCurrency={output}&value={amount}&field=INPUT
URL Parameters:
| Parameter | Description | Values |
| ---------------- | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| chain | Network name | ethereum, base, arbitrum, optimism, polygon, bnb, avalanche, celo, blast, zora, unichain, worldchain |
| inputCurrency | Input token | Address or NATIVE |
| outputCurrency | Output token | Address or NATIVE |
| value | Amount | Decimal number (e.g., 1.5) |
| field | Which field value applies to | INPUT or OUTPUT |
Step 7: Present Output and Open Browser
Format the response with:
- Summary of the swap parameters
- Deep link URL (displayed for reference)
- Notes about risks or considerations
- Open the browser automatically using system command
Example output format:
## Swap Summary
| Parameter | Value |
| ---------------- | -------------------------- |
| From | 1 ETH |
| To | USDC |
| Chain | Base |
| Current Rate | ~3,200 USDC per ETH |
| Estimated Output | ~3,200 USDC |
| Pool Liquidity | $15.2M (Low slippage risk) |
### Notes
- Final amount depends on current market price
- Default slippage is 0.5% - adjust in Uniswap if needed
- Review all details in Uniswap before confirming
Opening Uniswap in your browser...
After displaying the summary, open the URL in the browser:
# Linux
xdg-open "https://app.uniswap.org/swap?chain=base&inputCurrency=NATIVE&outputCurrency=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&value=1&field=INPUT"
# macOS
open "https://app.uniswap.org/swap?..."
Environment limitations: Browser opening may fail in remote SSH, containerized, or headless environments. If xdg-open/open fails, display the full URL prominently so users can copy and paste it manually:
**[Click here to open in Uniswap](https://app.uniswap.org/swap?...)**
Or copy this URL: `https://app.uniswap.org/swap?...`
Always present the summary and URL so users can review and execute.
Important Considerations
Slippage
The deep link uses Uniswap's default slippage (0.5%). For volatile tokens or large trades, advise users to adjust slippage in the interface.
Gas Estimation
Gas costs vary by chain and network congestion. Base and Arbitrum typically have lower gas than Ethereum mainnet.
Token Verification
Always verify token contracts before generating links. Scam tokens often use similar names to legitimate tokens.
Price Impact
For large trades, warn users about potential price impact. Suggest splitting into smaller trades if impact would be significant.
Supported Chains
All chains supported by the Uniswap interface:
- Ethereum Mainnet (
ethereum) - Base (
base) - Arbitrum One (
arbitrum) - Optimism (
optimism) - Polygon (
polygon) - BNB Chain (
bnb) - Avalanche (
avalanche) - Celo (
celo) - Blast (
blast) - Zora (
zora) - World Chain (
worldchain) - Unichain (
unichain)
Additional Resources
Reference Files
../../references/chains.md- Chain IDs, RPC URLs, native tokens, common token addressesreferences/data-providers.md- DexScreener and DefiLlama APIs for prices and liquidity
Examples
Common swap scenarios:
- ETH → USDC on Ethereum
- ETH → USDC on Base (lower gas)
- USDC → WBTC on Arbitrum
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/token-swap-planner-mryiqg05/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/token-swap-planner-mryiqg05' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/token-swap-planner-mryiqg05/download' --output '.skill-downloads/token-swap-planner-mryiqg05/SKILL.md.part' && mv '.skill-downloads/token-swap-planner-mryiqg05/SKILL.md.part' '.skill-downloads/token-swap-planner-mryiqg05/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Outils déclarés par l’auteur (à vérifier dans votre agent) : Read, Glob, Grep, Bash(curl:*), Bash(jq:*), Bash(cast:*), Bash(xdg-open:*), Bash(open:*), WebFetch, WebSearch, Task(subagent_type:Explore), AskUserQuestion
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/token-swap-planner-mryiqg05/SKILL.md' && test -s '.skill-downloads/token-swap-planner-mryiqg05/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/swap-planner' && cp -R '.skill-downloads/token-swap-planner-mryiqg05' '.claude/skills/swap-planner'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/token-swap-planner-mryiqg05'openskills read 'token-swap-planner-mryiqg05'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/token-swap-planner-mryiqg05/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Lecteur PDF
Productivite
Lit et extrait le texte de fichiers PDF (rapports, contrats, tableurs). Gère les fichiers locaux, les URL et les pièces jointes WhatsApp. Utilisez-le dès qu'un contenu PDF est nécessaire, même sans demande explicite.
Workflows de messagerie Discord
Productivite
Utilisez l'outil message pour envoyer, modifier et modérer des messages Discord avec des composants interactifs.
Aperçu interactif des verdicts
Productivite
Générer un aperçu HTML interactif des verdicts (garder/supprimer) pour la revue par le mainteneur, puis traiter le JSON de retour.