[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GQXPCFD75VJH2BZKA2E8Q4":3,"skill-same:01M6GQXPCFD75VJH2BZKA2E8Q4":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":40,"linkOnly":41,"markdownContent":42,"markdownBody":43,"frontMatter":44,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":56,"repositoryHtmlUrl":57,"repositoryHomepageUrl":6,"ownerHtmlUrl":58,"ownerBlogUrl":59,"ownerDescription":60,"updatedAt":61,"install":62,"resources":75},"01M6GQXPCFD75VJH2BZKA2E8Q4","position-manager",null,"This skill should be used when the user asks to \"check my positions\", \"show my liquidity positions\", \"list my LP positions\", \"view my pools\", \"position status\", \"show open positions\", \"show closed positions\", \"my DeFi positions\", \"portfolio positions\", \"position performance\", \"how are my positions doing\", \"unclaimed fees\", \"position APR\", \"position earnings\", or wants to view, monitor, or analyze their DeFi liquidity positions. Queries the KyberSwap Earn Service API to display position details, APR, earnings, unclaimed fees, and portfolio summary across multiple chains and protocols.","jiayaoqijia\u002Fcryptoskill","jiayaoqijia","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1453879?v=4","01M6GMYTX7Q7S504VC6E756ENR","YQ","01M6GMYV1QKJ1CC75MTTGT9PR0",81,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Fkybernetwork-official-position-manager\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"position manager","manager","position","show","when","display","my","earnings","fees","positions","across","performance","portfolio","list","analyze","how","open","api","defi","portfolio summary","status","2026-11-10 10:12:30",false,"---\nname: position-manager\ndescription: This skill should be used when the user asks to \"check my positions\", \"show my liquidity positions\", \"list my LP positions\", \"view my pools\", \"position status\", \"show open positions\", \"show closed positions\", \"my DeFi positions\", \"portfolio positions\", \"position performance\", \"how are my positions doing\", \"unclaimed fees\", \"position APR\", \"position earnings\", or wants to view, monitor, or analyze their DeFi liquidity positions. Queries the KyberSwap Earn Service API to display position details, APR, earnings, unclaimed fees, and portfolio summary across multiple chains and protocols.\nmetadata:\n  tags:\n    - defi\n    - kyberswap\n    - positions\n    - liquidity\n    - portfolio\n    - evm\n    - concentrated-liquidity\n  provider: KyberSwap\n  homepage: https:\u002F\u002Fkyberswap.com\n---\n\n# KyberSwap Position Manager Skill\n\nQuery and display DeFi liquidity positions. View in-range, out-of-range, and closed positions with APR, earnings, unclaimed fees, and portfolio analytics.\n\n## Input Parsing\n\nThe user will provide input like:\n- `show my positions for 0xAbc123...`\n- `check positions on ethereum for 0xAbc123...`\n- `show open positions for 0xAbc123...`\n- `show closed positions on arbitrum for 0xAbc123...`\n- `how are my positions doing for 0xAbc123...`\n- `show my unclaimed fees for 0xAbc123...`\n- `position performance for 0xAbc123...`\n\nExtract these fields:\n- **wallet** (required) — the wallet address to query\n- **chain** (optional) — filter by chain; if omitted, show all chains\n- **status** (optional) — position status filter; default: in-range + out-of-range (active positions)\n- **keyword** (optional) — filter by token symbol or pool address\n- **sort** (optional) — sort order; default: `valueUsd:desc`\n- **page** (optional) — page number; default: 1\n- **pageSize** (optional) — results per page; default: 10\n\n**If the wallet address is not provided, ask the user for it before proceeding.** Do not guess or use a placeholder address.\n\n**Wallet address validation — reject or warn before proceeding:**\n- **Must not be the zero address** (`0x0000000000000000000000000000000000000000`) — this is an invalid address and the query will return no results.\n- **Must not be the native token sentinel** (`0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE`) — this is a placeholder for native tokens, not a real account.\n- **Must match the format** `^0x[a-fA-F0-9]{40}$` — reject malformed addresses.\n- **Warn if it matches a known contract address** (e.g., a token address or a router address) — querying positions for a contract is unusual and likely a mistake. Ask the user to confirm.\n\n## Supported Chains\n\nAll chains supported by the KyberSwap Earn Service. The API accepts any chain ID. Common ones:\n\n| Chain | Chain ID |\n|---|---|\n| Ethereum | `1` |\n| BNB Smart Chain | `56` |\n| Arbitrum | `42161` |\n| Polygon | `137` |\n| Optimism | `10` |\n| Base | `8453` |\n| Avalanche | `43114` |\n| Linea | `59144` |\n| Scroll | `534352` |\n| zkSync | `324` |\n| Sonic | `146` |\n| Berachain | `80094` |\n| Ronin | `2020` |\n\nWhen the user specifies a chain by name, map it to the corresponding chain ID. When viewing positions across all chains, leave the `chainIds` parameter as an empty string.\n\n## Workflow\n\n### Step 1: Build Query Parameters\n\nMap user input to API query parameters:\n\n| User says | API `statuses` value |\n|---|---|\n| \"open positions\" \u002F \"active positions\" (or no filter specified) | `PositionStatusInRange,PositionStatusOutRange` |\n| \"in-range positions\" | `PositionStatusInRange` |\n| \"out-of-range positions\" | `PositionStatusOutRange` |\n| \"closed positions\" | `PositionStatusClosed` |\n| \"all positions\" | `PositionStatusInRange,PositionStatusOutRange,PositionStatusClosed` |\n\nAdditional parameter mappings:\n- Specific chain → `chainIds={chainId}` (use chain ID number, not slug)\n- All chains → `chainIds=` (empty)\n- Token keyword → `keyword={symbol}`\n- Sort → `sorts=valueUsd:desc` (default)\n- Page → `page=1` (default, 1-indexed)\n- Page size → `pageSize=10` (default)\n\n### Step 2: Fetch Positions\n\nMake the request using **WebFetch**:\n\n```\nURL: https:\u002F\u002Fearn-service.kyberswap.com\u002Fapi\u002Fv1\u002Fpositions?wallet={wallet}&chainIds={chainIds}&protocols={protocols}&statuses={statuses}&keyword={keyword}&sorts={sorts}&page={page}&pageSize={pageSize}\nPrompt: Return the full JSON response body exactly as received.\n```\n\nAdd the `X-Client-Id: ai-agent-skills` header.\n\n### Step 3: Handle Errors\n\nCheck the response for errors before proceeding:\n\n| Scenario | Quick Fix |\n|---|---|\n| No positions found | Wallet has no positions matching the specified filters. Try broadening filters (e.g., \"all positions\") or verify the wallet address. |\n| Invalid wallet address | Validate format: `^0x[a-fA-F0-9]{40}$`. Ensure it is not the zero address or native token sentinel. |\n| API error (500) | Retry. The Earn Service may be temporarily unavailable. |\n| Rate limited (429) | Wait and retry with exponential backoff. |\n| Empty response | The API returned no data. Verify the wallet address and try again. |\n\nFor any error not listed here, refer to **`${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Ferror-handling\u002FSKILL.md`**.\n\n### Step 4: Parse and Calculate\n\nExtract the following from the response:\n\n**From top-level `data.stats`:**\n- Total positions: `stats.totalItems`\n- Total portfolio value: `stats.totalValueUsd`\n- Total unclaimed fees: `stats.totalUnclaimedFeeUsd`\n- Total earned fees: `stats.totalEarnedFeeUsd`\n- Total claimed fees: `stats.totalClaimedFeeUsd`\n- Total unclaimed rewards: `stats.totalUnclaimedRewardUsd`\n- Total claimed rewards: `stats.totalClaimedRewardUsd`\n- Total pending rewards: `stats.totalPendingRewardUsd`\n\n**For each position in `data.positions[]`:**\n- Token pair: `currentAmounts[0].token.symbol` \u002F `currentAmounts[1].token.symbol`\n- Position value: `valueInUSD`\n- Current amounts: `currentAmounts[].amount.usdValue` and human amount (`amount \u002F 10^decimals`)\n- Provided amounts (initial deposit): `providedAmounts[].amount.usdValue`\n- PnL: `sum(currentAmounts usdValue) + sum(unclaimed fee usdValue) - sum(providedAmounts usdValue)`\n- Unclaimed fees: `stats.earning.fee.unclaimed[].amount.usdValue`\n- APR: `stats.apr.all.30d` (use 30d as default display)\n- LP APR: `stats.apr.lp.30d`\n- Reward APR: `stats.apr.reward.lm` or `stats.apr.reward.eg` (30d values)\n- Earnings: `stats.earning.totalUsd` (24h, 7d, 30d)\n- Protocol: `pool.protocol.name`\n- Pool address: `pool.address`\n- Price range: `extra.priceRange.min` to `extra.priceRange.maxPrice`\n- Current pool price: `pool.price`\n- Chain: `chain.name` (chain ID: `chain.id`)\n- Token ID: `tokenId`\n- Token address (NFT manager): `tokenAddress`\n- Status: `status`\n- Created: `createdAtTime` (unix timestamp)\n- Last updated: `lastUpdatedAt` (unix timestamp)\n\n**Status mapping:**\n- `PositionStatusInRange` → In Range\n- `PositionStatusOutRange` → Out of Range\n- `PositionStatusClosed` → Closed\n\n### Step 5: Display Results\n\n**Portfolio Summary (always show first):**\n\n```\n## Liquidity Position Portfolio for `{wallet}`\n\n| Metric | Value |\n|---|---|\n| Total Positions | {totalItems} |\n| Total Value | ${totalValueUsd} |\n| Total Unclaimed Fees | ${totalUnclaimedFeeUsd} |\n| Total Earned Fees | ${totalEarnedFeeUsd} |\n```\n\n**Positions Table:**\n\n```\n## Active Positions\n\n| # | Chain | Pool | Protocol | Value | APR (30d) | Unclaimed Fees | Status |\n|---|---|---|---|---|---|---|---|\n| 1 | {chain} | {token0}\u002F{token1} | {protocol} | ${value} | {apr}% | ${fees} | In Range |\n| 2 | {chain} | {token0}\u002F{token1} | {protocol} | ${value} | {apr}% | ${fees} | Out of Range |\n```\n\n**Detailed position view (when user asks about a specific position or wants details):**\n\n```\n## Position #{tokenId} -- {token0}\u002F{token1} on {Chain}\n\n| Detail | Value |\n|---|---|\n| Protocol | {protocol.name} |\n| Pool | `{pool.address}` |\n| Token ID | #{tokenId} |\n| Status | {status} |\n| Value | ${valueInUSD} |\n| APR (30d) | {apr.all.30d}% (LP: {apr.lp.30d}% + Rewards: {apr.reward}%) |\n\n### Current Amounts\n| Token | Amount | USD Value | Price |\n|---|---|---|---|\n| {token0} | {amount0} | ${usdValue0} | ${priceUsd0} |\n| {token1} | {amount1} | ${usdValue1} | ${priceUsd1} |\n\n### Provided Amounts (Initial Deposit)\n| Token | Amount | USD Value |\n|---|---|---|\n| {token0} | {provided0} | ${providedUsd0} |\n| {token1} | {provided1} | ${providedUsd1} |\n\n### Unclaimed Fees\n| Token | Amount | USD Value |\n|---|---|---|\n| {token0} | {fee0} | ${feeUsd0} |\n| {token1} | {fee1} | ${feeUsd1} |\n\n### Price Range\n| | Value |\n|---|---|\n| Current Price | {pool.price} |\n| Min Range | {extra.priceRange.min} |\n| Max Range | {extra.priceRange.maxPrice} |\n| In Range | {yes\u002Fno} |\n\n### Earnings (30d)\n| Period | Earned |\n|---|---|\n| 24h | ${earning.24h} |\n| 7d | ${earning.7d} |\n| 30d | ${earning.30d} |\n```\n\nIf more than 10 positions are returned, note pagination: *\"Showing {count} of {total} positions. Use 'show positions page 2' for more.\"*\n\n### Structured JSON Output\n\nAfter the markdown tables, always include a JSON code block so other plugins or agents can consume the result programmatically:\n\n````\n```json\n{\n  \"type\": \"kyberswap-position-manager\",\n  \"wallet\": \"{wallet}\",\n  \"summary\": {\n    \"totalPositions\": {totalItems},\n    \"totalValueUsd\": {totalValueUsd},\n    \"totalUnclaimedFeeUsd\": {totalUnclaimedFeeUsd},\n    \"totalEarnedFeeUsd\": {totalEarnedFeeUsd}\n  },\n  \"positions\": [\n    {\n      \"tokenId\": {tokenId},\n      \"chain\": \"{chain}\",\n      \"chainId\": {chainId},\n      \"pool\": \"{poolAddress}\",\n      \"protocol\": \"{protocolName}\",\n      \"token0\": \"{token0Symbol}\",\n      \"token1\": \"{token1Symbol}\",\n      \"status\": \"{status}\",\n      \"valueUsd\": {valueInUSD},\n      \"apr30d\": {apr},\n      \"unclaimedFeesUsd\": {feeUsd},\n      \"priceRange\": {\n        \"min\": {min},\n        \"max\": {max},\n        \"current\": {currentPrice}\n      }\n    }\n  ]\n}\n```\n````\n\nThis JSON block enables downstream agents or plugins to parse the position data without scraping the markdown tables.\n\n### Step 6: Actionable Suggestions\n\nAfter displaying positions, suggest relevant actions based on position state:\n\n**For out-of-range positions:**\n> \"Position #{tokenId} is out of range and not earning fees. Consider migrating to a new range: `\u002Fzap migrate position #{tokenId} ...`\"\n\n**For positions with significant unclaimed fees (> $1 USD):**\n> \"You have ${fees} in unclaimed fees on position #{tokenId}. Consider zapping out to collect: `\u002Fzap out position #{tokenId} on {chain} from {wallet}`\"\n\n**For adding more liquidity:**\n> \"To add more liquidity: `\u002Fzap 1 ETH into {pool} on {chain} from {wallet}`\"\n\n**For checking token prices:**\n> \"Check current prices with `\u002Ftoken-info {token0} {token1} on {chain}`\"\n\n## API Reference\n\n### Endpoint\n\n```\nGET https:\u002F\u002Fearn-service.kyberswap.com\u002Fapi\u002Fv1\u002Fpositions\n```\n\n### Query Parameters\n\n| Parameter | Required | Description |\n|---|---|---|\n| `wallet` | Yes | Wallet address |\n| `chainIds` | No | Comma-separated chain IDs (empty = all chains) |\n| `protocols` | No | Filter by protocol |\n| `statuses` | No | Comma-separated status values: `PositionStatusInRange`, `PositionStatusOutRange`, `PositionStatusClosed` |\n| `keyword` | No | Search by token symbol or pool address |\n| `sorts` | No | Sort order, e.g. `valueUsd:desc`, `valueUsd:asc` |\n| `page` | No | Page number (1-indexed, default: 1) |\n| `pageSize` | No | Results per page (default: 10) |\n\n### Position Object Key Fields\n\n| Field | Type | Description |\n|---|---|---|\n| `chain` | `{ name, logo, id }` | Chain information |\n| `tokenId` | number | NFT token ID |\n| `tokenAddress` | string | NFT manager contract address |\n| `positionId` | string | Position identifier |\n| `wallet` | string | Owner wallet address |\n| `liquidity` | string | Liquidity amount |\n| `status` | string | `PositionStatusInRange`, `PositionStatusOutRange`, or `PositionStatusClosed` |\n| `valueInUSD` | number | Position value in USD |\n| `createdAtTime` | number | Unix timestamp of creation |\n| `createAtBlock` | number | Block number at creation |\n| `lastUpdatedAt` | number | Unix timestamp of last update |\n| `stats.apr.all` | `{ 24h, 7d, 30d }` | Combined APR |\n| `stats.apr.lp` | `{ 24h, 7d, 30d }` | LP fee APR |\n| `stats.apr.reward.lm` | `{ 24h, 7d, 30d }` | Liquidity mining reward APR |\n| `stats.apr.reward.eg` | `{ 24h, 7d, 30d }` | Elastic reward APR |\n| `stats.earning.totalUsd` | `{ 24h, 7d, 30d }` | Total earnings in USD |\n| `stats.earning.fee.unclaimed[]` | array | Unclaimed fee tokens with `{ amount: { usdValue, priceUsd, amount }, token: { logo, symbol, name, decimals, address } }` |\n| `stats.earning.fee.claimed[]` | array | Claimed fee tokens (same structure) |\n| `currentAmounts[]` | array | Current token amounts in the position |\n| `providedAmounts[]` | array | Initial deposit amounts |\n| `pool` | object | Pool details: `{ id, address, price, tokenAmounts[], fees[], tickSpacing, protocol: { type, logo, name }, category, hooks }` |\n| `extra.priceRange` | `{ min, maxPrice }` | Position price range |\n| `id` | number | Internal position ID |\n\n### Response Stats (Top-Level)\n\n| Field | Description |\n|---|---|\n| `data.stats.totalItems` | Total number of matching positions |\n| `data.stats.totalValueUsd` | Sum of all position values |\n| `data.stats.totalEarnedFeeUsd` | Total fees earned (all time) |\n| `data.stats.totalClaimedFeeUsd` | Total fees claimed |\n| `data.stats.totalUnclaimedFeeUsd` | Total unclaimed fees |\n| `data.stats.totalClaimedRewardUsd` | Total claimed rewards |\n| `data.stats.totalUnclaimedRewardUsd` | Total unclaimed rewards |\n| `data.stats.totalPendingRewardUsd` | Total pending rewards |\n\n## Important Notes\n\n- This is a **read-only skill** -- no transactions are built or submitted.\n- To add liquidity, use the **zap** skill (`${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fzap\u002FSKILL.md`).\n- To remove liquidity, use the **zap** skill's zap-out workflow.\n- To migrate positions, use the **zap** skill's migrate workflow.\n- Position values and APRs are estimates provided by the KyberSwap Earn Service and may differ slightly from on-chain values.\n- Unclaimed fees must be collected via a zap-out or collect transaction.\n- Default to showing active (in-range + out-of-range) positions sorted by value if no filter is specified.\n- When viewing positions across all chains, the `chainIds` parameter should be an empty string.\n- If the user doesn't specify a chain, query all chains.\n- Never guess wallet addresses. Always ask the user if not provided.\n\n## Additional Resources\n\n### Reference Files\n\n- **`${CLAUDE_PLUGIN_ROOT}\u002Freferences\u002Ftoken-registry.md`** -- Token addresses and decimals by chain\n- **`${CLAUDE_PLUGIN_ROOT}\u002Freferences\u002Fapi-reference.md`** -- Full API specification, error codes, rate limiting\n\n### Related Skills\n\n- **`${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fzap\u002FSKILL.md`** -- Zap in, zap out, and migrate positions\n- **`${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Ftoken-info\u002FSKILL.md`** -- Token price and information lookup\n\n### External Documentation\n\n- **KyberSwap Earn:** https:\u002F\u002Fkyberswap.com\u002Fearn\n\n## Troubleshooting\n\n| Issue | Resolution |\n|---|---|\n| No positions found | Verify the wallet address owns liquidity positions. Try \"all positions\" to include closed ones. Check the wallet on the KyberSwap Earn UI. |\n| Missing APR data | Some positions (especially newly created or low-liquidity ones) may not have APR data yet. The Earn Service calculates APR periodically. |\n| Stale position data | Position data is indexed periodically. Recent on-chain changes (deposits, withdrawals) may take a few minutes to appear. |\n| Chain not showing positions | Verify the chain ID is correct. Try querying all chains (omit `chainIds`) to see if positions exist on a different chain. |\n| Rate limited | The Earn Service may rate-limit requests. Wait and retry. |\n\nFor error codes not covered above, or for advanced debugging, refer to **`${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Ferror-handling\u002FSKILL.md`**.\n","# KyberSwap Position Manager Skill\n\nQuery and display DeFi liquidity positions. View in-range, out-of-range, and closed positions with APR, earnings, unclaimed fees, and portfolio analytics.\n\n## Input Parsing\n\nThe user will provide input like:\n- `show my positions for 0xAbc123...`\n- `check positions on ethereum for 0xAbc123...`\n- `show open positions for 0xAbc123...`\n- `show closed positions on arbitrum for 0xAbc123...`\n- `how are my positions doing for 0xAbc123...`\n- `show my unclaimed fees for 0xAbc123...`\n- `position performance for 0xAbc123...`\n\nExtract these fields:\n- **wallet** (required) — the wallet address to query\n- **chain** (optional) — filter by chain; if omitted, show all chains\n- **status** (optional) — position status filter; default: in-range + out-of-range (active positions)\n- **keyword** (optional) — filter by token symbol or pool address\n- **sort** (optional) — sort order; default: `valueUsd:desc`\n- **page** (optional) — page number; default: 1\n- **pageSize** (optional) — results per page; default: 10\n\n**If the wallet address is not provided, ask the user for it before proceeding.** Do not guess or use a placeholder address.\n\n**Wallet address validation — reject or warn before proceeding:**\n- **Must not be the zero address** (`0x0000000000000000000000000000000000000000`) — this is an invalid address and the query will return no results.\n- **Must not be the native token sentinel** (`0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE`) — this is a placeholder for native tokens, not a real account.\n- **Must match the format** `^0x[a-fA-F0-9]{40}$` — reject malformed addresses.\n- **Warn if it matches a known contract address** (e.g., a token address or a router address) — querying positions for a contract is unusual and likely a mistake. Ask the user to confirm.\n\n## Supported Chains\n\nAll chains supported by the KyberSwap Earn Service. The API accepts any chain ID. Common ones:\n\n| Chain | Chain ID |\n|---|---|\n| Ethereum | `1` |\n| BNB Smart Chain | `56` |\n| Arbitrum | `42161` |\n| Polygon | `137` |\n| Optimism | `10` |\n| Base | `8453` |\n| Avalanche | `43114` |\n| Linea | `59144` |\n| Scroll | `534352` |\n| zkSync | `324` |\n| Sonic | `146` |\n| Berachain | `80094` |\n| Ronin | `2020` |\n\nWhen the user specifies a chain by name, map it to the corresponding chain ID. When viewing positions across all chains, leave the `chainIds` parameter as an empty string.\n\n## Workflow\n\n### Step 1: Build Query Parameters\n\nMap user input to API query parameters:\n\n| User says | API `statuses` value |\n|---|---|\n| \"open positions\" \u002F \"active positions\" (or no filter specified) | `PositionStatusInRange,PositionStatusOutRange` |\n| \"in-range positions\" | `PositionStatusInRange` |\n| \"out-of-range positions\" | `PositionStatusOutRange` |\n| \"closed positions\" | `PositionStatusClosed` |\n| \"all positions\" | `PositionStatusInRange,PositionStatusOutRange,PositionStatusClosed` |\n\nAdditional parameter mappings:\n- Specific chain → `chainIds={chainId}` (use chain ID number, not slug)\n- All chains → `chainIds=` (empty)\n- Token keyword → `keyword={symbol}`\n- Sort → `sorts=valueUsd:desc` (default)\n- Page → `page=1` (default, 1-indexed)\n- Page size → `pageSize=10` (default)\n\n### Step 2: Fetch Positions\n\nMake the request using **WebFetch**:\n\n```\nURL: https:\u002F\u002Fearn-service.kyberswap.com\u002Fapi\u002Fv1\u002Fpositions?wallet={wallet}&chainIds={chainIds}&protocols={protocols}&statuses={statuses}&keyword={keyword}&sorts={sorts}&page={page}&pageSize={pageSize}\nPrompt: Return the full JSON response body exactly as received.\n```\n\nAdd the `X-Client-Id: ai-agent-skills` header.\n\n### Step 3: Handle Errors\n\nCheck the response for errors before proceeding:\n\n| Scenario | Quick Fix |\n|---|---|\n| No positions found | Wallet has no positions matching the specified filters. Try broadening filters (e.g., \"all positions\") or verify the wallet address. |\n| Invalid wallet address | Validate format: `^0x[a-fA-F0-9]{40}$`. Ensure it is not the zero address or native token sentinel. |\n| API error (500) | Retry. The Earn Service may be temporarily unavailable. |\n| Rate limited (429) | Wait and retry with exponential backoff. |\n| Empty response | The API returned no data. Verify the wallet address and try again. |\n\nFor any error not listed here, refer to **`${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Ferror-handling\u002FSKILL.md`**.\n\n### Step 4: Parse and Calculate\n\nExtract the following from the response:\n\n**From top-level `data.stats`:**\n- Total positions: `stats.totalItems`\n- Total portfolio value: `stats.totalValueUsd`\n- Total unclaimed fees: `stats.totalUnclaimedFeeUsd`\n- Total earned fees: `stats.totalEarnedFeeUsd`\n- Total claimed fees: `stats.totalClaimedFeeUsd`\n- Total unclaimed rewards: `stats.totalUnclaimedRewardUsd`\n- Total claimed rewards: `stats.totalClaimedRewardUsd`\n- Total pending rewards: `stats.totalPendingRewardUsd`\n\n**For each position in `data.positions[]`:**\n- Token pair: `currentAmounts[0].token.symbol` \u002F `currentAmounts[1].token.symbol`\n- Position value: `valueInUSD`\n- Current amounts: `currentAmounts[].amount.usdValue` and human amount (`amount \u002F 10^decimals`)\n- Provided amounts (initial deposit): `providedAmounts[].amount.usdValue`\n- PnL: `sum(currentAmounts usdValue) + sum(unclaimed fee usdValue) - sum(providedAmounts usdValue)`\n- Unclaimed fees: `stats.earning.fee.unclaimed[].amount.usdValue`\n- APR: `stats.apr.all.30d` (use 30d as default display)\n- LP APR: `stats.apr.lp.30d`\n- Reward APR: `stats.apr.reward.lm` or `stats.apr.reward.eg` (30d values)\n- Earnings: `stats.earning.totalUsd` (24h, 7d, 30d)\n- Protocol: `pool.protocol.name`\n- Pool address: `pool.address`\n- Price range: `extra.priceRange.min` to `extra.priceRange.maxPrice`\n- Current pool price: `pool.price`\n- Chain: `chain.name` (chain ID: `chain.id`)\n- Token ID: `tokenId`\n- Token address (NFT manager): `tokenAddress`\n- Status: `status`\n- Created: `createdAtTime` (unix timestamp)\n- Last updated: `lastUpdatedAt` (unix timestamp)\n\n**Status mapping:**\n- `PositionStatusInRange` → In Range\n- `PositionStatusOutRange` → Out of Range\n- `PositionStatusClosed` → Closed\n\n### Step 5: Display Results\n\n**Portfolio Summary (always show first):**\n\n```\n## Liquidity Position Portfolio for `{wallet}`\n\n| Metric | Value |\n|---|---|\n| Total Positions | {totalItems} |\n| Total Value | ${totalValueUsd} |\n| Total Unclaimed Fees | ${totalUnclaimedFeeUsd} |\n| Total Earned Fees | ${totalEarnedFeeUsd} |\n```\n\n**Positions Table:**\n\n```\n## Active Positions\n\n| # | Chain | Pool | Protocol | Value | APR (30d) | Unclaimed Fees | Status |\n|---|---|---|---|---|---|---|---|\n| 1 | {chain} | {token0}\u002F{token1} | {protocol} | ${value} | {apr}% | ${fees} | In Range |\n| 2 | {chain} | {token0}\u002F{token1} | {protocol} | ${value} | {apr}% | ${fees} | Out of Range |\n```\n\n**Detailed position view (when user asks about a specific position or wants details):**\n\n```\n## Position #{tokenId} -- {token0}\u002F{token1} on {Chain}\n\n| Detail | Value |\n|---|---|\n| Protocol | {protocol.name} |\n| Pool | `{pool.address}` |\n| Token ID | #{tokenId} |\n| Status | {status} |\n| Value | ${valueInUSD} |\n| APR (30d) | {apr.all.30d}% (LP: {apr.lp.30d}% + Rewards: {apr.reward}%) |\n\n### Current Amounts\n| Token | Amount | USD Value | Price |\n|---|---|---|---|\n| {token0} | {amount0} | ${usdValue0} | ${priceUsd0} |\n| {token1} | {amount1} | ${usdValue1} | ${priceUsd1} |\n\n### Provided Amounts (Initial Deposit)\n| Token | Amount | USD Value |\n|---|---|---|\n| {token0} | {provided0} | ${providedUsd0} |\n| {token1} | {provided1} | ${providedUsd1} |\n\n### Unclaimed Fees\n| Token | Amount | USD Value |\n|---|---|---|\n| {token0} | {fee0} | ${feeUsd0} |\n| {token1} | {fee1} | ${feeUsd1} |\n\n### Price Range\n| | Value |\n|---|---|\n| Current Price | {pool.price} |\n| Min Range | {extra.priceRange.min} |\n| Max Range | {extra.priceRange.maxPrice} |\n| In Range | {yes\u002Fno} |\n\n### Earnings (30d)\n| Period | Earned |\n|---|---|\n| 24h | ${earning.24h} |\n| 7d | ${earning.7d} |\n| 30d | ${earning.30d} |\n```\n\nIf more than 10 positions are returned, note pagination: *\"Showing {count} of {total} positions. Use 'show positions page 2' for more.\"*\n\n### Structured JSON Output\n\nAfter the markdown tables, always include a JSON code block so other plugins or agents can consume the result programmatically:\n\n````\n```json\n{\n  \"type\": \"kyberswap-position-manager\",\n  \"wallet\": \"{wallet}\",\n  \"summary\": {\n    \"totalPositions\": {totalItems},\n    \"totalValueUsd\": {totalValueUsd},\n    \"totalUnclaimedFeeUsd\": {totalUnclaimedFeeUsd},\n    \"totalEarnedFeeUsd\": {totalEarnedFeeUsd}\n  },\n  \"positions\": [\n    {\n      \"tokenId\": {tokenId},\n      \"chain\": \"{chain}\",\n      \"chainId\": {chainId},\n      \"pool\": \"{poolAddress}\",\n      \"protocol\": \"{protocolName}\",\n      \"token0\": \"{token0Symbol}\",\n      \"token1\": \"{token1Symbol}\",\n      \"status\": \"{status}\",\n      \"valueUsd\": {valueInUSD},\n      \"apr30d\": {apr},\n      \"unclaimedFeesUsd\": {feeUsd},\n      \"priceRange\": {\n        \"min\": {min},\n        \"max\": {max},\n        \"current\": {currentPrice}\n      }\n    }\n  ]\n}\n```\n````\n\nThis JSON block enables downstream agents or plugins to parse the position data without scraping the markdown tables.\n\n### Step 6: Actionable Suggestions\n\nAfter displaying positions, suggest relevant actions based on position state:\n\n**For out-of-range positions:**\n> \"Position #{tokenId} is out of range and not earning fees. Consider migrating to a new range: `\u002Fzap migrate position #{tokenId} ...`\"\n\n**For positions with significant unclaimed fees (> $1 USD):**\n> \"You have ${fees} in unclaimed fees on position #{tokenId}. Consider zapping out to collect: `\u002Fzap out position #{tokenId} on {chain} from {wallet}`\"\n\n**For adding more liquidity:**\n> \"To add more liquidity: `\u002Fzap 1 ETH into {pool} on {chain} from {wallet}`\"\n\n**For checking token prices:**\n> \"Check current prices with `\u002Ftoken-info {token0} {token1} on {chain}`\"\n\n## API Reference\n\n### Endpoint\n\n```\nGET https:\u002F\u002Fearn-service.kyberswap.com\u002Fapi\u002Fv1\u002Fpositions\n```\n\n### Query Parameters\n\n| Parameter | Required | Description |\n|---|---|---|\n| `wallet` | Yes | Wallet address |\n| `chainIds` | No | Comma-separated chain IDs (empty = all chains) |\n| `protocols` | No | Filter by protocol |\n| `statuses` | No | Comma-separated status values: `PositionStatusInRange`, `PositionStatusOutRange`, `PositionStatusClosed` |\n| `keyword` | No | Search by token symbol or pool address |\n| `sorts` | No | Sort order, e.g. `valueUsd:desc`, `valueUsd:asc` |\n| `page` | No | Page number (1-indexed, default: 1) |\n| `pageSize` | No | Results per page (default: 10) |\n\n### Position Object Key Fields\n\n| Field | Type | Description |\n|---|---|---|\n| `chain` | `{ name, logo, id }` | Chain information |\n| `tokenId` | number | NFT token ID |\n| `tokenAddress` | string | NFT manager contract address |\n| `positionId` | string | Position identifier |\n| `wallet` | string | Owner wallet address |\n| `liquidity` | string | Liquidity amount |\n| `status` | string | `PositionStatusInRange`, `PositionStatusOutRange`, or `PositionStatusClosed` |\n| `valueInUSD` | number | Position value in USD |\n| `createdAtTime` | number | Unix timestamp of creation |\n| `createAtBlock` | number | Block number at creation |\n| `lastUpdatedAt` | number | Unix timestamp of last update |\n| `stats.apr.all` | `{ 24h, 7d, 30d }` | Combined APR |\n| `stats.apr.lp` | `{ 24h, 7d, 30d }` | LP fee APR |\n| `stats.apr.reward.lm` | `{ 24h, 7d, 30d }` | Liquidity mining reward APR |\n| `stats.apr.reward.eg` | `{ 24h, 7d, 30d }` | Elastic reward APR |\n| `stats.earning.totalUsd` | `{ 24h, 7d, 30d }` | Total earnings in USD |\n| `stats.earning.fee.unclaimed[]` | array | Unclaimed fee tokens with `{ amount: { usdValue, priceUsd, amount }, token: { logo, symbol, name, decimals, address } }` |\n| `stats.earning.fee.claimed[]` | array | Claimed fee tokens (same structure) |\n| `currentAmounts[]` | array | Current token amounts in the position |\n| `providedAmounts[]` | array | Initial deposit amounts |\n| `pool` | object | Pool details: `{ id, address, price, tokenAmounts[], fees[], tickSpacing, protocol: { type, logo, name }, category, hooks }` |\n| `extra.priceRange` | `{ min, maxPrice }` | Position price range |\n| `id` | number | Internal position ID |\n\n### Response Stats (Top-Level)\n\n| Field | Description |\n|---|---|\n| `data.stats.totalItems` | Total number of matching positions |\n| `data.stats.totalValueUsd` | Sum of all position values |\n| `data.stats.totalEarnedFeeUsd` | Total fees earned (all time) |\n| `data.stats.totalClaimedFeeUsd` | Total fees claimed |\n| `data.stats.totalUnclaimedFeeUsd` | Total unclaimed fees |\n| `data.stats.totalClaimedRewardUsd` | Total claimed rewards |\n| `data.stats.totalUnclaimedRewardUsd` | Total unclaimed rewards |\n| `data.stats.totalPendingRewardUsd` | Total pending rewards |\n\n## Important Notes\n\n- This is a **read-only skill** -- no transactions are built or submitted.\n- To add liquidity, use the **zap** skill (`${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fzap\u002FSKILL.md`).\n- To remove liquidity, use the **zap** skill's zap-out workflow.\n- To migrate positions, use the **zap** skill's migrate workflow.\n- Position values and APRs are estimates provided by the KyberSwap Earn Service and may differ slightly from on-chain values.\n- Unclaimed fees must be collected via a zap-out or collect transaction.\n- Default to showing active (in-range + out-of-range) positions sorted by value if no filter is specified.\n- When viewing positions across all chains, the `chainIds` parameter should be an empty string.\n- If the user doesn't specify a chain, query all chains.\n- Never guess wallet addresses. Always ask the user if not provided.\n\n## Additional Resources\n\n### Reference Files\n\n- **`${CLAUDE_PLUGIN_ROOT}\u002Freferences\u002Ftoken-registry.md`** -- Token addresses and decimals by chain\n- **`${CLAUDE_PLUGIN_ROOT}\u002Freferences\u002Fapi-reference.md`** -- Full API specification, error codes, rate limiting\n\n### Related Skills\n\n- **`${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Fzap\u002FSKILL.md`** -- Zap in, zap out, and migrate positions\n- **`${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Ftoken-info\u002FSKILL.md`** -- Token price and information lookup\n\n### External Documentation\n\n- **KyberSwap Earn:** https:\u002F\u002Fkyberswap.com\u002Fearn\n\n## Troubleshooting\n\n| Issue | Resolution |\n|---|---|\n| No positions found | Verify the wallet address owns liquidity positions. Try \"all positions\" to include closed ones. Check the wallet on the KyberSwap Earn UI. |\n| Missing APR data | Some positions (especially newly created or low-liquidity ones) may not have APR data yet. The Earn Service calculates APR periodically. |\n| Stale position data | Position data is indexed periodically. Recent on-chain changes (deposits, withdrawals) may take a few minutes to appear. |\n| Chain not showing positions | Verify the chain ID is correct. Try querying all chains (omit `chainIds`) to see if positions exist on a different chain. |\n| Rate limited | The Earn Service may rate-limit requests. Wait and retry. |\n\nFor error codes not covered above, or for advanced debugging, refer to **`${CLAUDE_PLUGIN_ROOT}\u002Fskills\u002Ferror-handling\u002FSKILL.md`**.\n",{"name":5,"metadata":45,"description":7},{"tags":46,"homepage":51,"provider":52},[37,47,28,48,31,49,50],"kyberswap","liquidity","evm","concentrated-liquidity","https:\u002F\u002Fkyberswap.com","KyberSwap","main","3df1d0d67b30ff15236561f8c0f9f06d33f42dfd","skills\u002Fdefi\u002Fkybernetwork-official-position-manager",17,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia","https:\u002F\u002Feth2030.com","Hardcore infra. Building @alt-research and applied cryptography.","2026-11-15 02:28:10",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add jiayaoqijia\u002Fcryptoskill --skill position-manager",{"tool":68,"command":69},"bunx","bunx skills add jiayaoqijia\u002Fcryptoskill --skill position-manager",{"tool":71,"command":72},"pnpm","pnpm dlx skills add jiayaoqijia\u002Fcryptoskill --skill position-manager","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Fkybernetwork-official-position-manager\u002FSKILL.md",true,[76,82],{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"SOURCE.md","REFERENCE","参考文档",365,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Fkybernetwork-official-position-manager\u002FSOURCE.md",{"path":83,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":84,"sourceHtmlUrl":85},"TRUST.auto.yaml",2199,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fdefi\u002Fkybernetwork-official-position-manager\u002FTRUST.auto.yaml",[87,97,105,113,121,128],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":92,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":96},"01M7DTKCERMV0RNX3HZJP4CZ26","troves","Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say \"Troves\" explicitly.","MIT","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-troves\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-troves\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":101,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":96},"01M7DTK6CJSMGC8KCQHGNYFZBD","trade","Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say \"swap\".","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-trade\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-trade\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":109,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":96},"01M7DTJZ6A0X4PAW3Y8W4J9K64","staking","Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say \"stake\" explicitly.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-staking\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-staking\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":96},"01M7DTJSDZJKCDMW7GHRF4BRH5","send","Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say \"pay 10 STRK to 0x...\".","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-send\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-send\u002FSKILL.md",[],[],{"skillNo":122,"name":31,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":124,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":96},"01M7DTJG1E480D51ZQ7WKDQ26K","View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks \"what do I have\", \"show me everything\", \"how much am I worth\", \"my positions\", \"my investments\", \"rebalance my portfolio\", \"I want 50% ETH\", \"optimize my holdings\", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say \"portfolio\".","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-portfolio\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-portfolio\u002FSKILL.md",[],[],{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":91,"licenseFileUrl":132,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":96},"01M7DTJ7M8TE9R2N36HFBZDGVD","multi-swap","Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions \"two swaps\", \"three swaps\", \"swap X and Y at the same time\", or wants to convert multiple tokens in a single call.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-multi-swap\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-multi-swap\u002FSKILL.md",[],[]]