1inch — Claude Code skill: swaps and limit orders
A skill that runs 1inch swaps: same-chain token trades, SOL↔EVM cross-chain and limit orders. Useful when the agent should execute the trade itself.
npx skills add Starchild-ai-agent/official-skills --skill 1inch -a claude-codeWhat 1inch does
Everything runs through local scripts under skills/1inch/scripts/, not through platform-injected tools. The agent calls them with plain bash and python3, so a failed tool registration no longer blocks the work. The set covers token lookup, quotes, allowance checks and approvals, the swap itself, and run_swap_flow.py — one command that quotes, optionally approves, swaps and then verifies balances.
You need ONEINCH_API_KEY and WALLET_SERVICE_URL set beforehand. Calls to 1inch go through sc-proxy only: the scripts read HTTP_PROXY/HTTPS_PROXY first, fall back to PROXY_HOST and PROXY_PORT, and stop with an explicit error when neither is present instead of connecting directly. Supported chains are ethereum, arbitrum, base, optimism, polygon, bsc, avalanche and gnosis.
Amounts are given in human units and the decimal conversion happens inside the script. When a symbol has several variants on one chain, such as USDC and USDC.e, pass the contract address — otherwise the swap can land on the wrong token. Native gas tokens go in as native or ETH.
What it helps with
- swap ETH for USDC on Base with routing picked for you
- move SOL into ETH across chains
- place a limit buy for ARB at 0.80
- check allowance and approve before a swap
- run a full swap in one command with before/after balance checks
Example prompts for the agent
- Search for the POL token on polygon and show the first 10 matches
- Quote 1 USDC to POL on polygon
- Swap 1 USDC to POL on polygon with 1.0 slippage and auto-approve
How to install 1inch
1Skills CLI (Vercel)
npx skills add Starchild-ai-agent/official-skills --skill 1inch -a claude-code2Manually: put the files in place
~/.claude/skills/1inch/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/1inch/
1Skills CLI (Vercel)
npx skills add Starchild-ai-agent/official-skills --skill 1inch -a codex2Manually: put the files in place
.agents/skills/1inch/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Starchild-ai-agent/official-skills --skill 1inch -a cursor2Manually: put the files in place
.cursor/skills/1inch/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Starchild-ai-agent/official-skills 1inch2Manually: put the files in place
.github/skills/1inch/SKILL.md1Skills CLI (Vercel)
npx skills add Starchild-ai-agent/official-skills --skill 1inch -a gemini-cli2Platform CLI
gemini skills install https://github.com/Starchild-ai-agent/official-skills --path 1inchManually: put the files in place
.devin/skills/1inch/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Starchild-ai-agent/official-skills --skill 1inch -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about 1inch
How do I install 1inch in Claude Code?
Run npx skills add Starchild-ai-agent/official-skills --skill 1inch -a claude-code. The skill lands in ~/.claude/skills/1inch/SKILL.md.
What does the 1inch skill do?
It executes swaps through the 1inch aggregator on a single chain, SOL↔EVM cross-chain trades and limit orders. All of it runs as local scripts the agent invokes.
What does the skill need to work?
ONEINCH_API_KEY and WALLET_SERVICE_URL, plus reachable sc-proxy — without a proxy the scripts halt with an error.