$npx -y skills add Uniswap/uniswap-ai --skill liquidity-plannerThis 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 position
| 1 | # Liquidity Position Planning |
| 2 | |
| 3 | Plan and generate deep links for creating liquidity positions on Uniswap v2, v3, and v4. |
| 4 | |
| 5 | > **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. |
| 6 | |
| 7 | ## Overview |
| 8 | |
| 9 | Plan liquidity positions by: |
| 10 | |
| 11 | 1. Gathering LP intent (token pair, amount, version) |
| 12 | 2. Checking current pool price and liquidity |
| 13 | 3. Suggesting price ranges based on current price |
| 14 | 4. Generating a deep link that opens in the Uniswap interface with parameters pre-filled |
| 15 | |
| 16 | The generated link opens Uniswap with all parameters ready for position creation. |
| 17 | |
| 18 | > **Note:** Browser opening (`xdg-open`/`open`) may fail in SSH, containerized, or headless environments. Always display the URL prominently so users can copy and access it manually if needed. |
| 19 | |
| 20 | > **File Access:** This skill has read-only filesystem access. Never read files outside the current project directory unless explicitly requested by the user. |
| 21 | |
| 22 | ## Workflow |
| 23 | |
| 24 | ### Step 1: Gather LP Intent |
| 25 | |
| 26 | Extract from the user's request: |
| 27 | |
| 28 | | Parameter | Required | Default | Example | |
| 29 | | ----------- | -------- | -------- | ----------------------- | |
| 30 | | Token A | Yes | - | ETH, USDC, address | |
| 31 | | Token B | Yes | - | USDC, WBTC, address | |
| 32 | | Amount | Yes | - | 1 ETH, $1000 | |
| 33 | | Chain | No | Ethereum | Base, Arbitrum | |
| 34 | | Version | No | V3 | v2, v3, v4 | |
| 35 | | Fee Tier | No | Auto | 0.05%, 0.3%, 1% | |
| 36 | | Price Range | No | Suggest | Full range, ±5%, custom | |
| 37 | |
| 38 | **If any required parameter is missing, use AskUserQuestion with structured options:** |
| 39 | |
| 40 | For missing chain: |
| 41 | |
| 42 | ```json |
| 43 | { |
| 44 | "questions": [ |
| 45 | { |
| 46 | "question": "Which chain do you want to provide liquidity on?", |
| 47 | "header": "Chain", |
| 48 | "options": [ |
| 49 | { "label": "Base (Recommended)", "description": "Low gas, growing DeFi ecosystem" }, |
| 50 | { "label": "Ethereum", "description": "Deepest liquidity, higher gas" }, |
| 51 | { "label": "Arbitrum", "description": "Low fees, high volume" }, |
| 52 | { "label": "Optimism", "description": "Low fees, Ethereum L2" } |
| 53 | ], |
| 54 | "multiSelect": false |
| 55 | } |
| 56 | ] |
| 57 | } |
| 58 | ``` |
| 59 | |
| 60 | For missing token pair: |
| 61 | |
| 62 | ```json |
| 63 | { |
| 64 | "questions": [ |
| 65 | { |
| 66 | "question": "Which token pair do you want to provide liquidity for?", |
| 67 | "header": "Pair", |
| 68 | "options": [ |
| 69 | { "label": "ETH / USDC", "description": "Most popular pair, high volume" }, |
| 70 | { "label": "ETH / USDT", "description": "High volume stablecoin pair" }, |
| 71 | { "label": "WBTC / ETH", "description": "Blue chip crypto pair" }, |
| 72 | { "label": "Custom pair", "description": "Specify your own tokens" } |
| 73 | ], |
| 74 | "multiSelect": false |
| 75 | } |
| 76 | ] |
| 77 | } |
| 78 | ``` |
| 79 | |
| 80 | Always use forms instead of plain text questions for better UX. |
| 81 | |
| 82 | ### Step 2: Resolve Token Addresses |
| 83 | |
| 84 | Resolve token symbols to addresses. See `../../references/chains.md` for common tokens by chain. |
| 85 | |
| 86 | For unknown tokens, use web search and verify on-chain. |
| 87 | |
| 88 | #### UNTRUSTED INPUT: Web-Discovered Tokens |
| 89 | |
| 90 | Tokens discovered via WebSearch are **UNTRUSTED**. Before proceeding with any web-discovered token: |
| 91 | |
| 92 | 1. **Label the source**: Explicitly tell the user "This token address was found via web search, not provided by you" |
| 93 | 2. **Warn about risks**: "Web-discovered tokens may be scams, honeypots, or rug pulls" |
| 94 | 3. **Require confirmation**: Use AskUserQuestion to get explicit user consent before generating a deep link for a web-discovered token |
| 95 | 4. **Show provenance**: In the position summary table, include a "Token Source" row showing whether each token was "User-provided" or "Web-discovered (unverified)" |
| 96 | |
| 97 | **Never proceed with a web-discovered token without explicit user confirmation via AskUserQuestion.** |
| 98 | |
| 99 | ### Input Validation (Required Before Any Shell Command) |
| 100 | |
| 101 | Before interpolating user-provided values into any shell command, validate all inputs: |
| 102 | |
| 103 | - **Token addresses** MUST match: `^0x[a-fA-F0-9]{40}$` |
| 104 | - **Chain/network names** MUST be from the allowed list in `../../references/chains.md` |
| 105 | - **Amounts** MUST be valid decimal numbers (match: `^[0-9]+\.?[0-9]*$`) |
| 106 | - **Reject** any input containing shell metacharacters (`;`, `|`, `$` |