# 1inch

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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 352 installs · ★ 30
- Author: starchild
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Starchild-ai-agent/official-skills/tree/HEAD/1inch/SKILL.md
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/skills/1inch

## What it 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`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add Starchild-ai-agent/official-skills --skill 1inch -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/1inch/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/1inch/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add Starchild-ai-agent/official-skills --skill 1inch -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/1inch/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add Starchild-ai-agent/official-skills --skill 1inch -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/1inch/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install Starchild-ai-agent/official-skills 1inch
```

2. **Manually: put the files in place**
- File: `.github/skills/1inch/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add Starchild-ai-agent/official-skills --skill 1inch -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/Starchild-ai-agent/official-skills --path 1inch
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/1inch/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add Starchild-ai-agent/official-skills --skill 1inch -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Starchild-ai-agent/official-skills/tree/HEAD/1inch/SKILL.md

## When to use it
- 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
- 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

## Similar
- [aicoin-onchain](https://affpapa.org/en/nevibecode/skills/aicoin-onchain.md) — skill · 302 installs
- [swap-planner](https://affpapa.org/en/nevibecode/skills/swap-planner.md) — skill · 1200 installs
- [mcp](https://affpapa.org/en/nevibecode/mcp/swap-api-mcp.md) — MCP server · ★ 22
- [dex-execution](https://affpapa.org/en/nevibecode/skills/dex-execution.md) — skill · 426 installs
- [emblem-defi-yield](https://affpapa.org/en/nevibecode/skills/emblem-defi-yield.md) — skill · 8700 installs
- [swap-tokens](https://affpapa.org/en/nevibecode/skills/swap-tokens.md) — skill · 848 installs

From the same set: [starchild-ai-agent/official-skills](https://affpapa.org/en/nevibecode/by/starchild-ai-agent/official-skills.md) — 35 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
