# Lp integration

> Lp integration is an open-source agent skill for developer tools. Guides an agent through building Uniswap liquidity positions via the LP REST API. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/Uniswap/uniswap-ai/tree/main/packages/plugins/uniswap-trading/skills/lp-integration
- **Repository:** https://github.com/uniswap/uniswap-ai
- **GitHub stars:** 236
- **License:** MIT
- **Skill name:** lp-integration
- **Collection:** https://github.com/Uniswap/uniswap-ai
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill helps an AI coding agent integrate Uniswap liquidity provisioning into backends, bots and frontends. The LP API builds unsigned transactions for creating, increasing, decreasing and claiming fees on v2, v3 and v4 positions, while the application itself signs and broadcasts them. The skill walks the agent through the endpoint set, the approval and EIP-712 permit flow, and the field-name differences between endpoints.

The guidance includes safety rules the agent must follow: validating addresses, chain IDs and wei-denominated amounts, keeping API keys in environment variables, never editing returned calldata, and confirming each state-changing transaction with the user before it is sent. It also covers refetching transactions when a quote goes stale and handling common error codes.

Working with the skill requires a Uniswap Developer Platform API key and a viem-based or similar wallet client to sign returned transactions. A companion reference file holds deeper permit, migration and reliability patterns.

## When your agent uses it

> Integrate Uniswap liquidity provisioning (LP) into applications via the LP REST API. Use when the user says "LP API", "liquidity provisioning API", "provide liquidity programmatically", "create LP position via API", "add liquidity via API", "increase liquidity", "decrease liquidity", "remove liquidity", "claim LP fees", "collect LP fees", "manage LP positions in code", or mentions building a backend, bot, or frontend that creates or manages Uniswap v2/v3/v4 liquidity positions through an API. Also use when debugging LP API calls (e.g. /lp/create, /lp/check_approval, /lp/increase, /lp/decrease, /lp/claim_fees), unexpected response fields, the approval or EIP-712 permit flow, or transaction-building errors for liquidity positions. For generating deep links to the Uniswap web app instead of calling the API, use the liquidity-planner skill; for using the Uniswap v4 SDK directly rather than the REST API, use the v4-sdk-integration skill.

## 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/skills/lp-integration)
- [Asks for: Read, Write, Edit, Glob, Grep, Bash(npm:*), Bash(npx:*), Bash(yarn:*)…](https://github.com/Uniswap/uniswap-ai/blob/HEAD/packages/plugins/uniswap-trading/skills/lp-integration/SKILL.md)
- [License: MIT](https://github.com/Uniswap/uniswap-ai/tree/HEAD/packages/plugins/uniswap-trading/skills/lp-integration)

## Features

- **Approval Flow Handling:** Covers checking token approvals and signing Permit2 or NFT permit data before liquidity actions.
- **Position Lifecycle Endpoints:** Explains create, increase, decrease and fee-claim calls across v2, v3 and v4 protocols.
- **Input Validation Rules:** Lists checks for addresses, chain IDs, token amounts and percentages before any request.
- **Transaction Safety Checks:** Requires user confirmation and validates returned calldata before broadcasting.
- **Permit Payload Normalization:** Shows how to convert proto-encoded v4 permit data into a shape wallets can sign.
- **Error Handling Guide:** Describes API error codes, common failures and retry guidance.

## Good for

- Add liquidity to a Uniswap v3 pool from a trading bot
- Create a full-range v2 position through a backend service
- Remove a percentage of liquidity from an existing v4 position
- Collect accumulated trading fees from a v3 position
- Debug a failing check_approval call or unexpected LP response fields

## Install

### Claude Code

This skill ships in the `uniswap-trading` 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@uniswap-ai
```

Or copy only this skill to `~/.claude/skills/lp-integration`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Uniswap/uniswap-ai.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/lp-integration &&
cp -R "$tmp/packages/plugins/uniswap-trading/skills/lp-integration" ~/.claude/skills/lp-integration &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/lp-integration` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/lp-integration` 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/lp-integration &&
cp -R "$tmp/packages/plugins/uniswap-trading/skills/lp-integration" ~/.agents/skills/lp-integration &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/lp-integration` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/lp-integration` 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/lp-integration &&
cp -R "$tmp/packages/plugins/uniswap-trading/skills/lp-integration" ~/.cursor/skills/lp-integration &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/lp-integration` 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/skills/lp-integration
```

Or copy the folder to `~/.gemini/skills/lp-integration` yourself.

### VS Code

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

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Uniswap/uniswap-ai.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/lp-integration &&
cp -R "$tmp/packages/plugins/uniswap-trading/skills/lp-integration" ~/.copilot/skills/lp-integration &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/lp-integration` 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/skills/lp-integration` into your agent's skills folder as `lp-integration`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does the LP API sign or broadcast transactions?

No. The API returns unsigned transactions and the application signs and broadcasts them through its own RPC provider.

### Can v2 fees be claimed separately?

No. v2 fees accrue into the LP token value and are realized when liquidity is decreased; the claim endpoint rejects V2.

### Which endpoint should be called first?

The skill says to call /lp/check_approval before any LP action, even if approvals were granted earlier.

### What is needed to use the LP API?

An API key from the Uniswap Developer Platform, sent in the x-api-key header and stored in an environment variable.

### How do I install Lp integration in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/lp-integration to use it in all your projects, or to .claude/skills/lp-integration in one project. Or install the uniswap-trading plugin, which includes it: /plugin marketplace add Uniswap/uniswap-ai, then /plugin install uniswap-trading@uniswap-ai.

### Does Lp integration 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 Lp integration?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Lp integration?

The closest alternatives to Lp integration are V4 SDK integration, Permissioned pools deployer, Permissioned pools issuer, Permissioned pools configurator and Viem integration.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [V4 SDK integration](https://ai-powered.com/skills/v4-sdk-integration): V4 SDK integration is an open-source agent skill for developer tools.
- [Permissioned pools deployer](https://ai-powered.com/skills/permissioned-pools-deployer): Permissioned pools deployer is an open-source agent skill for developer tools.
- [Permissioned pools issuer](https://ai-powered.com/skills/permissioned-pools-issuer): Permissioned pools issuer is an open-source agent skill for developer tools.
- [Permissioned pools configurator](https://ai-powered.com/skills/permissioned-pools-configurator): Permissioned pools configurator is an open-source agent skill for developer tools.
- [Viem integration](https://ai-powered.com/skills/viem-integration): Viem integration is an open-source agent skill for developer tools.
- [API integration](https://ai-powered.com/skills/api-integration): API integration is an open-source agent skill for developer tools.
- [API design edho ferdian](https://ai-powered.com/skills/api-design-edho-ferdian): API design edho ferdian is an open-source agent skill for developer tools.
- [V4 security foundations](https://ai-powered.com/skills/v4-security-foundations): V4 security foundations is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/lp-integration
