position-manager
БесплатноБез исполняемых скриптовНе проверен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…
от jiayaoqijia★ 81 звезда на GitHubОб этом скилле
KyberSwap Position Manager Skill
Query and display DeFi liquidity positions. View in-range, out-of-range, and closed positions with APR, earnings, unclaimed fees, and portfolio analytics.
Input Parsing
The user will provide input like:
show my positions for 0xAbc123...check positions on ethereum for 0xAbc123...show open positions for 0xAbc123...show closed positions on arbitrum for 0xAbc123...how are my positions doing for 0xAbc123...show my unclaimed fees for 0xAbc123...position performance for 0xAbc123...
Extract these fields:
- wallet (required) — the wallet address to query
- chain (optional) — filter by chain; if omitted, show all chains
- status (optional) — position status filter; default: in-range + out-of-range (active positions)
- keyword (optional) — filter by token symbol or pool address
- sort (optional) — sort order; default:
valueUsd:desc - page (optional) — page number; default: 1
- pageSize (optional) — results per page; default: 10
If the wallet address is not provided, ask the user for it before proceeding. Do not guess or use a placeholder address.
Wallet address validation — reject or warn before proceeding:
- Must not be the zero address (
0x0000000000000000000000000000000000000000) — this is an invalid address and the query will return no results. - Must not be the native token sentinel (
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) — this is a placeholder for native tokens, not a real account. - Must match the format
^0x[a-fA-F0-9]{40}$— reject malformed addresses. - 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.
Supported Chains
All chains supported by the KyberSwap Earn Service. The API accepts any chain ID. Common ones:
| Chain | Chain ID |
|---|---|
| Ethereum | 1 |
| BNB Smart Chain | 56 |
| Arbitrum | 42161 |
| Polygon | 137 |
| Optimism | 10 |
| Base | 8453 |
| Avalanche | 43114 |
| Linea | 59144 |
| Scroll | 534352 |
| zkSync | 324 |
| Sonic | 146 |
| Berachain | 80094 |
| Ronin | 2020 |
When 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.
Workflow
Step 1: Build Query Parameters
Map user input to API query parameters:
| User says | API statuses value |
|---|---|
| "open positions" / "active positions" (or no filter specified) | PositionStatusInRange,PositionStatusOutRange |
| "in-range positions" | PositionStatusInRange |
| "out-of-range positions" | PositionStatusOutRange |
| "closed positions" | PositionStatusClosed |
| "all positions" | PositionStatusInRange,PositionStatusOutRange,PositionStatusClosed |
Additional parameter mappings:
- Specific chain →
chainIds={chainId}(use chain ID number, not slug) - All chains →
chainIds=(empty) - Token keyword →
keyword={symbol} - Sort →
sorts=valueUsd:desc(default) - Page →
page=1(default, 1-indexed) - Page size →
pageSize=10(default)
Step 2: Fetch Positions
Make the request using WebFetch:
URL: https://earn-service.kyberswap.com/api/v1/positions?wallet={wallet}&chainIds={chainIds}&protocols={protocols}&statuses={statuses}&keyword={keyword}&sorts={sorts}&page={page}&pageSize={pageSize}
Prompt: Return the full JSON response body exactly as received.
Add the X-Client-Id: ai-agent-skills header.
Step 3: Handle Errors
Check the response for errors before proceeding:
| Scenario | Quick Fix |
|---|---|
| No positions found | Wallet has no positions matching the specified filters. Try broadening filters (e.g., "all positions") or verify the wallet address. |
| Invalid wallet address | Validate format: ^0x[a-fA-F0-9]{40}$. Ensure it is not the zero address or native token sentinel. |
| API error (500) | Retry. The Earn Service may be temporarily unavailable. |
| Rate limited (429) | Wait and retry with exponential backoff. |
| Empty response | The API returned no data. Verify the wallet address and try again. |
For any error not listed here, refer to ${CLAUDE_PLUGIN_ROOT}/skills/error-handling/SKILL.md.
Step 4: Parse and Calculate
Extract the following from the response:
From top-level data.stats:
- Total positions:
stats.totalItems - Total portfolio value:
stats.totalValueUsd - Total unclaimed fees:
stats.totalUnclaimedFeeUsd - Total earned fees:
stats.totalEarnedFeeUsd - Total claimed fees:
stats.totalClaimedFeeUsd - Total unclaimed rewards:
stats.totalUnclaimedRewardUsd - Total claimed rewards:
stats.totalClaimedRewardUsd - Total pending rewards:
stats.totalPendingRewardUsd
For each position in data.positions[]:
- Token pair:
currentAmounts[0].token.symbol/currentAmounts[1].token.symbol - Position value:
valueInUSD - Current amounts: `
Установить position-manager в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл position-manager?
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.
Как установить скилл position-manager?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл position-manager запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic