
Index bot
Builds a weighted multi-token basket, buys it in one pass and rebalances on drift
Index bot is an open-source agent skill for finance and payments. It is available on Claude Code.
- Scripts
- None
- Platforms
- Claude Code
- GitHub stars
- 236
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Index bot
Index Bot turns a single instruction into a weighted basket of tokens. It parses the asset list and weights, resolves each asset to a token address on the target chain, and sizes every leg against the total funding amount. Before anything executes it runs guardrails: spend caps per run and period, a token allowlist, a dry run that prints each planned leg, a check that the wallet can cover each leg and gas, and market-hours reminders for real-world asset tokens.
The skill does not perform swaps itself. Each buy and each rebalance swap is delegated to the swap-integration Trading API flow (approval check, quote, swap, then signing and broadcast through viem). Sequencing adds a short delay between legs, and a failed leg is reported while the remaining legs continue. Target weights and the last rebalance time are written to a shared state file, so later scheduled runs can compare current balances against targets, skip periods already handled, and generate sell and buy swaps for legs that drifted past a threshold.
The skill expects a target-chain template that supplies chain details, router and Permit2 addresses, and a token source. It needs the Uniswap plugin references and viem for account handling, and it defaults to confirm mode so each run is summarized for approval before broadcast.
When your agent uses it
This skill should be used when the user asks to "create an index", "build a basket of top assets", "buy a weighted basket", "make a portfolio of assets", "equal-weight basket", "rebalance my portfolio", "track the top N tokens", or wants an automated, weighted multi-asset basket that buys in one pass and rebalances on a cadence. Builds the basket spec, delegates each buy and rebalance swap to the swap-integration Trading API flow, and records target weights in state.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
- Instructions only, no scripts(see the files on GitHub)
- Asks for: Read, Write, Edit, Glob, Grep, Bash(npm:*), Bash(npx:*), Bash(curl:*)…(see the files on GitHub)
- License: MIT(see the files on GitHub)
From a static check of its 1 file (11 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the uniswap-trading-tools plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add Uniswap/uniswap-ai
/plugin install uniswap-trading-tools@uniswap-aiOr copy only this skill to ~/.claude/skills/index-bot:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Uniswap/uniswap-ai.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/index-bot &&
cp -R "$tmp/packages/plugins/uniswap-trading-tools/skills/index-bot" ~/.claude/skills/index-bot &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/index-bot inside it instead.
Copy the skill folder to ~/.agents/skills/index-bot to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Uniswap/uniswap-ai.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/index-bot &&
cp -R "$tmp/packages/plugins/uniswap-trading-tools/skills/index-bot" ~/.agents/skills/index-bot &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/index-bot inside it instead.
Copy the skill folder to ~/.cursor/skills/index-bot to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Uniswap/uniswap-ai.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/index-bot &&
cp -R "$tmp/packages/plugins/uniswap-trading-tools/skills/index-bot" ~/.cursor/skills/index-bot &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/index-bot inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/Uniswap/uniswap-ai.git --path packages/plugins/uniswap-trading-tools/skills/index-botOr copy the folder to ~/.gemini/skills/index-bot yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/index-bot:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Uniswap/uniswap-ai.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/index-bot &&
cp -R "$tmp/packages/plugins/uniswap-trading-tools/skills/index-bot" ~/.copilot/skills/index-bot &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/index-bot inside it instead.
Get the folder:
git clone --depth 1 https://github.com/Uniswap/uniswap-ai.gitThen copy uniswap-ai/packages/plugins/uniswap-trading-tools/skills/index-bot into your agent's skills folder as index-bot. Agents that support SKILL.md read one folder per skill.
What it does
- Basket spec parsing
- Reads assets, weights, total size, funding token, cadence and spend caps from the prompt, asking for anything missing.
- Per-leg sizing
- Computes each leg's notional from its weight and prices cross-token amounts with Uniswap quotes.
- Guardrails and dry run
- Applies spend caps, a token allowlist, wallet balance checks and a printed dry run before execution.
- Delegated swap execution
- Hands every buy and rebalance swap to the swap-integration Trading API flow rather than reimplementing it.
- Drift-based rebalancing
- Compares current weights with targets on a schedule and generates sell and buy swaps for drifted legs.
- State tracking
- Stores target weights and the last rebalance time so reruns do not double-buy or double-rebalance.
Good for
- Buy an equal-weight basket of several tokens from one funding amount
- Rebalance an existing token basket back to its target weights
- Set a weekly or monthly rebalance schedule for a multi-asset portfolio
- Dry-run a planned basket to review each leg before any transaction is sent
Index bot FAQ
What does Index bot need before it can run?
It depends on the swap-integration, v4-sdk-integration and viem-integration skills, plus a target-chain template that supplies chain details, router addresses and a token source.
Does Index bot pick the top tokens for me?
No. It has no default ranking source. For a top-N request it asks for an explicit asset list unless the template provides a ranking source the operator asks it to use.
Will Index bot execute trades without asking?
By default it runs in confirm mode and asks before broadcasting. Autonomous mode requires spend caps, an allowlist, a dry run and a kill switch.
What happens if one leg of the basket fails?
The failed leg is reported and the remaining legs continue, so one failure does not abandon the whole basket.
How do I install Index bot in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/index-bot to use it in all your projects, or to .claude/skills/index-bot in one project. Or install the uniswap-trading-tools plugin, which includes it: /plugin marketplace add Uniswap/uniswap-ai, then /plugin install uniswap-trading-tools@uniswap-ai.
Does Index bot run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Index bot?
Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.
What are the best alternatives to Index bot?
The closest alternatives to Index bot are Dca bot, Swap integration, Swap planner, Copy trade and Swap tokens.
Where this comes from
- Description: from the skill's own SKILL.md.
More from Uniswap/uniswap-ai

Guides your agent through configuring Uniswap CCA token auction contract parameters
- Open source
- 236 GitHub stars
- Finance and payments

Guides an agent through deploying Uniswap CCA auction contracts via the factory
- Open source
- 236 GitHub stars
- Developer tools

Plans Uniswap liquidity positions and generates pre-filled position deep links
- Open source
- 236 GitHub stars
- Finance and payments

Plans token swaps on Uniswap across chains and builds pre-filled swap links
- Open source
- 236 GitHub stars
- Finance and payments

Guides an agent to scaffold Uniswap v4 hook contracts via the OpenZeppelin Wizard MCP
- Open source
- 236 GitHub stars
- Developer tools

Security checklists and vulnerability patterns for building Uniswap v4 hooks safely
- Open source
- 236 GitHub stars
- Developer tools


