# Index bot

> Index bot is an open-source agent skill for finance and payments. Builds a weighted multi-token basket, buys it in one pass and rebalances on drift. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/Uniswap/uniswap-ai/tree/main/packages/plugins/uniswap-trading-tools/skills/index-bot
- **Repository:** https://github.com/uniswap/uniswap-ai
- **GitHub stars:** 236
- **License:** MIT
- **Skill name:** index-bot
- **Collection:** https://github.com/Uniswap/uniswap-ai
- **Categories:** [finance and payments](https://ai-powered.com/categories/finance-and-payments)
- **Listing updated:** 2026-12-02

## About

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.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/Uniswap/uniswap-ai/tree/HEAD/packages/plugins/uniswap-trading-tools/skills/index-bot)
- [Asks for: Read, Write, Edit, Glob, Grep, Bash(npm:*), Bash(npx:*), Bash(curl:*)…](https://github.com/Uniswap/uniswap-ai/blob/HEAD/packages/plugins/uniswap-trading-tools/skills/index-bot/SKILL.md)
- [License: MIT](https://github.com/Uniswap/uniswap-ai/tree/HEAD/packages/plugins/uniswap-trading-tools/skills/index-bot)

## Features

- **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

## Install

### Claude Code

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):

```sh
/plugin marketplace add Uniswap/uniswap-ai
/plugin install uniswap-trading-tools@uniswap-ai
```

Or copy only this skill to `~/.claude/skills/index-bot`:

```sh
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.

### Codex

Copy the skill folder to `~/.agents/skills/index-bot` to use it in every repository:

```sh
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.

### Cursor

Copy the skill folder to `~/.cursor/skills/index-bot` to use it in every project:

```sh
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.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/Uniswap/uniswap-ai.git --path packages/plugins/uniswap-trading-tools/skills/index-bot
```

Or copy the folder to `~/.gemini/skills/index-bot` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/index-bot`:

```sh
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.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/Uniswap/uniswap-ai.git
```

Then 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.

## 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.

## Alternatives

- [Dca bot](https://ai-powered.com/skills/dca-bot): Dca bot is an open-source agent skill for finance and payments.
- [Swap integration](https://ai-powered.com/skills/swap-integration): Swap integration is an open-source agent skill for finance and payments.
- [Swap planner](https://ai-powered.com/skills/swap-planner): Swap planner is an open-source agent skill for finance and payments.
- [Copy trade](https://ai-powered.com/skills/copy-trade): Copy trade is an open-source agent skill for finance and payments.
- [Swap tokens](https://ai-powered.com/skills/swap-tokens): Swap tokens is an open-source agent skill for finance and payments.
- [Liquidity planner](https://ai-powered.com/skills/liquidity-planner): Liquidity planner is an open-source agent skill for finance and payments.
- [Unify balance](https://ai-powered.com/skills/unify-balance): Unify balance is an open-source agent skill for finance and payments.
- [Configurator](https://ai-powered.com/skills/configurator): Configurator is an open-source agent skill for finance and payments.

---
Source: https://ai-powered.com/skills/index-bot
