MCPInstall

index-bot

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.

Installs
405
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/uniswap/uniswap-ai --skill index-bot
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads index-bot automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Index Bot

Build a weighted basket of assets from one instruction, buy the whole basket in one pass, and rebalance on a cadence when weights drift. This skill is a thin strategy layer: it decides what to buy and how much, then delegates every quote, approval, swap, and signing step to existing skills.

Runtime Compatibility: This skill uses AskUserQuestion for interactive prompts. If AskUserQuestion is not available in your runtime, collect the same parameters through natural language conversation instead.

Overview

From a single prompt (for example "equal-weight basket of the top 5 RWAs, rebalance weekly"), index-bot:

  1. Parses the basket spec (explicit assets with weights, or a top-N ranking request).
  2. Resolves each asset to a token address and computes per-leg sizing.
  3. Applies guardrails (spend cap, token allowlist, dry-run).
  4. Delegates each buy to the swap-integration Trading API flow on the target chain.
  5. Records target weights and the last rebalance in a state file.

On a later invocation by the host scheduler, it reads current positions, computes drift versus target weights, generates the adjusting swaps, and delegates them.

The trigger is twofold: a prompt to create the basket, and the host scheduler (cron or the agent runtime wake-up) for each rebalance run.

Prerequisites

This skill does not reimplement swap execution. It depends on:

  • swap-integration (uniswap-trading): the only execution path. Every buy and rebalance leg goes through its Trading API flow (check_approval then quote then swap, then sign and broadcast). Do not reimplement any of it.
  • v4-sdk-integration (uniswap-trading): LP execution, only if a leg also seeds or manages a liquidity position. Default index baskets are spot-only and do not need this.
  • viem-integration (uniswap-viem): accounts, signing, transaction broadcast, and reading on-chain balances for the drift calculation.

Read these plugin references before acting and treat them as ground truth:

  • selected target-chain template: chainId, chain name, contract addresses, tradable token source, funding constraints, market-data availability, and template-specific caveats. For the reference Robinhood Chain template, see ../../references/robinhood-chain.md.
  • ../../references/execution-model.md: the Trading API requirement, execution modes, restrictions, and disclaimer rules.
  • ../../references/strategy-state.md: the shared state file and scheduler pattern.

Template inputs

The selected target-chain template must provide:

  • chain id, chain name, native gas token, and RPC / read path.
  • deployed Uniswap router, Permit2, and quoter / state-reader addresses needed by delegated execution and valuation.
  • optional v4 PoolManager / PositionManager addresses if the basket also manages LP positions.
  • tradable token resolution rules, including any token list, ranking source, or allowlist source.
  • funding constraints, market-data availability, transfer-restriction caveats, and market-hours guidance.

Workflow

Step 1: Parse the basket spec

Extract the basket definition from the prompt:

ParameterRequiredExample
AssetsYesexplicit list, or "top 5 RWAs"
WeightingYesequal, or custom weights summing to 1
Total sizeYes1000 USDG, 0.5 ETH
Funding tokenYesthe token spent to buy each leg
Rebalance cadenceYesweekly, monthly, none
Drift thresholdNorebalance only when a leg drifts > X%
Spend capsYesper-run and per-period caps in token terms

If the prompt asks for a top-N ranking ("top 5 RWAs"), there is no default ranking source, so do NOT invent or guess a ranking. If the selected template provides an indexer or ranking source and the operator instructs you to use it, use that source. Otherwise ask the user for an explicit asset list via AskUserQuestion and proceed from that list. If any other required parameter is missing, including per-run or per-period spend caps, use AskUserQuestion with structured options to collect it.

Step 2: Resolve tokens and per-leg sizing

For each asset:

  1. Resolve the symbol to a token address from the selected target-chain template and its token source. Do not maintain a local registry. If a requested asset cannot resolve from the template's token source, stop and report it rather than guessing.
  2. Compute the target notional per leg: legNotional = totalSize * weight. Price any cross-token sizing with Uniswap quotes (Trading API /quote via swap-integration, or V4Quoter via v4-sdk-integration), never an external feed or venue-specific API.
  3. Record the funding-token amount to spend on that leg.

Verify each resolved address is a contract before sizing. If an asset cannot be resolved on the target chain, stop and report it rather than guessing.

Step 3: Guardrails

Before any execution:

  • Ask the operator for any missing per-run or per-period spend cap using AskUserQuestion (or natural language if unavailable); include the funding token or denomination used for comparison. If either cap remains unset, do not enter autonomous mode.
  • Confirm the basket total is within the configured spend cap (per run and per period).
  • Confirm every leg token is on the operator's allowlist.
  • Run a dry-run first that prints each planned leg (token, amount, weight) for review.
  • Confirm equity market hours if any leg is a RWA (off-hours liquidity may be thin).
  • Per leg, check the wallet can cover that leg: it must hold enough of the funding token (tokenIn) for the leg's buy amount and enough native gas to broadcast. If a leg is short on either, skip that leg and report it, then continue the rest of the basket. Follow the selected template's funding constraints; the skill does not auto-fund, bridge, or top up unless that behavior is explicitly provided outside the skill.

Step 4: Buy the basket (delegate)

For each leg, delegate to the swap-integration Trading API flow: check_approval then quote then swap, then sign and broadcast via viem. Pass the target chain id and that chain's router / token addresses from the selected template.

Do NOT reimplement quoting, approvals, swap-body construction, or signing. Sequence legs with a short delay to respect Trading API rate limits, and handle a failed leg without abandoning the rest of the basket (report it and continue).

Step 5: Record target weights

After the buys succeed, write the target weights and the rebalance metadata to the state file (see ../../references/strategy-state.md). This is what later drift calculations compare against.

Rebalance loop

On each scheduled invocation:

  1. Read state to load target weights and lastRebalanceAt.
  2. Check idempotency: if this cadence period was already rebalanced, skip.
  3. Read current on-chain balances for each leg via viem and value them in the funding token using Uniswap quotes (Trading API /quote via swap-integration, or V4Quoter / StateView via v4-sdk-integration) to get current weights. Do not use venue-specific APIs or external price feeds; see ../../references/execution-model.md (Data and pricing).
  4. Compute drift per leg: drift = currentWeight - targetWeight. Compare the absolute drift |drift| against the threshold so both overweight (drift > 0) and underweight (drift < 0) legs are caught. If no leg's |drift| exceeds the drift threshold, do nothing and update lastRebalanceAt.
  5. Generate the adjusting swaps: sell overweight legs, buy underweight legs, to return each leg to its target.
  6. Delegate each adjusting swap to the swap-integration Trading API flow exactly as in Step 4.
  7. Update state with the new lastRebalanceAt and any changed positions.

Execution mode

This skill exposes the shared execution mode from ../../references/execution-model.md:

ModeBehavior
confirm (default)Ask the user to approve every transaction before broadcast.
autonomousExecute without per-transaction prompts, only within guardrails.

Default to confirm. Autonomous mode requires all of: a spend cap (per run and per period), a token allowlist, a dry-run first, and a kill switch. A basket buy is many transactions, so under confirm summarize the full basket and confirm once per run where the runtime allows, otherwise per leg.

State

State follows ../../references/strategy-state.md. index-bot stores the target weights and the last rebalance so drift can be computed on the next run:

Each run reads state first and updates it only after a successful broadcast, so reruns within a period do not double-buy or double-rebalance.

Restrictions and Disclaimers

RWA gating is template-specific and may be enforced at the token level (transfer-restricted ERC-20s), so a leg can revert at transfer time even when the router accepts the quote. This skill must:

  1. Handle transfer-restriction reverts per leg gracefully and report which leg reverted.
  2. Not assume a pool-level or router-level allowlist exists.
  3. Respect equity market hours; some RWAs may have off-hours liquidity limits.
  4. Surface the financial disclaimers in the repo root DISCLAIMER.md before executing.

See ../../references/execution-model.md for the full restrictions and disclaimer rules.

Input validation

Before interpolating ANY user-provided value into generated code, API calls, or shell commands:

  • Token addresses: MUST match ^0x[a-fA-F0-9]{40}$; reject otherwise.
  • Amounts and notionals: MUST be non-negative numeric values matching ^[0-9]+\.?[0-9]*$.
  • Weights: MUST each be in [0, 1] and the full set MUST sum to 1 (within a small tolerance). Reject a basket whose weights do not sum to 1.
  • Chain id: MUST be the operator-configured target chain id, read from the selected template rather than hardcoded.
  • API keys: MUST come from environment variables, never hardcoded.
  • REJECT any input containing shell metacharacters: ;, |, &, $, `, (, ), >, <, \, ', ", newlines.

FAQ

What does the index-bot skill do?

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.

How do I install index-bot?

Run npx skills add https://github.com/uniswap/uniswap-ai --skill index-bot in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/index-bot/ (personal) or .claude/skills/index-bot/ (project).

Which AI agents can use index-bot?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is index-bot safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains index-bot?

It is published by uniswap in uniswap/uniswap-ai. It has 405 recorded installs.

More from uniswap/uniswap-ai

View all →

swap-integration

uniswap/uniswap-ai

Integrate Uniswap swaps into applications. Use when user says "integrate swaps", "uniswap", "trading api", "add swap functionality", "build a swap frontend", "create a swap script", "smart contract swap integration", "use Universal Router", "Trading API", or mentions swapping tokens via Uniswap.

Business & Finance2.2K installs

viem-integration

uniswap/uniswap-ai

Integrate EVM blockchains using viem. Use when user says "read blockchain data", "send transaction", "interact with smart contract", "connect to Ethereum", "use viem", "use wagmi", "wallet integration", "viem setup", or mentions blockchain/EVM development with TypeScript.

Business & Finance1.7K installs

liquidity-planner

uniswap/uniswap-ai

This skill should be used when the user asks to "provide liquidity", "create LP position", "add liquidity to pool", "become a liquidity provider", "create v3 position", "create v4 position", "concentrated liquidity", "set price range", or mentions providing liquidity, LP positions, or liquidity pools on Uniswap. Generates deep links to create positions in the Uniswap interface.

1.2K installs

swap-planner

uniswap/uniswap-ai

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.

v4-security-foundations

uniswap/uniswap-ai

Security-first Uniswap v4 hook development. Use when user mentions "v4 hooks", "hook security", "PoolManager", "beforeSwap", "afterSwap", or asks about V4 hook best practices, vulnerabilities, or audit requirements.

Security1.2K installs

deployer

uniswap/uniswap-ai

Deploy CCA (Continuous Clearing Auction) smart contracts using the Factory pattern. Use when user says "deploy auction", "deploy cca", "factory deployment", or wants to deploy a configured auction.

DevOps & Cloud1.1K installs

Popular backend & apis skills

View category →

find-skills

vercel-labs/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

OfficialBackend & APIs4.1M installs

entra-app-registration

microsoft/azure-skills

Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.

OfficialBackend & APIs566.7K installs

This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).

Backend & APIs514.8K installs

embedded-captions

heygen-com/hyperframes

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

Backend & APIs453.3K installs

entra-agent-id

microsoft/azure-skills

Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).

OfficialBackend & APIs336.6K installs

neon

neondatabase/agent-skills

Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.

Backend & APIs237.1K installs