One routed Claude Code / Codex skill to monitor, backtest, rebalance, and tax-track concentrated-liquidity LP across every major Solana DEX.
Concentrated-liquidity LPs juggle five disconnected tools: one dashboard per venue (Orca, Raydium, Meteora, Kamino), a spreadsheet for IL math, a Telegram bot for alerts, and a separate exporter at tax time. Studies of Uniswap-style CLMM repeatedly show a majority of LPs are net-unprofitable after impermanent loss versus simply holding. The core failure mode is late information: polling a position every 60s means you learn you went out-of-range minutes after fees stopped accruing, and you size rebalances on stale quotes. By the time you react, the range has moved.
- Track every CLMM/DLMM position across Orca Whirlpools, Raydium CLMM, Meteora DLMM + DAMM v2, and Kamino vaults in one normalized
LpPositionview (tick bounds, in-range flag, unclaimed fees, token amounts). - Alert in realtime via reconnecting Yellowstone gRPC / websocket subscriptions, firing the moment the current tick crosses a stored bound, instead of polling.
- Backtest a range: IL-vs-HODL net P&L and fee-APR over historical price paths, plus the break-even range width where fees cover IL.
- Route yield: compare fee APR for a pair across venues so you LP where the capital actually earns.
- Rebalance safely: plan a close+reopen into a new range, always simulate first, and gate execution behind a typed human confirmation with slippage / exposure caps.
- Tax-lot ledger: build cost-basis lots (FIFO / HIFO / SPECID) from add/remove/collect events as a record-keeping aid.
Single-venue liquidity skills/SDKs exist (Orca, Raydium, Meteora, Kamino each ship their own); agiprolabs/claude-trading-skills covers CLMM math educationally (lp-math, impermanent-loss); and hosted CLMM rebalancing bots are a crowded market. None give you live, multi-venue position management as one routed skill. This repo is the build-out of the official solanabr/position-manager-skill seed - an empty stub the bounty explicitly invites contributors to fill - so it is an honest level-up of that seed pattern, not a claim of novelty. The differentiators, in one routed package:
- Realtime gRPC/websocket out-of-range alerting that replaces polling.
- IL-vs-HODL + fee-APR backtesting with an explicit break-even width.
- Cross-DEX yield routing for a single pair.
- A simulate-first, human-confirm rebalance gate with hard caps and no bypass flag.
It is scaffolding and knowledge you run yourself - never a hosted or auto-running bot.
SKILL.md is a router, not a manual. On activation it loads source-precedence rules and a Task Routing Guide that maps each intent to exactly one leaf file (references/positions.md, streaming.md, backtesting.md, yield-routing.md, kamino-vaults.md, rebalancing.md, tax-lots.md). The agent opens one leaf per task - minimal context, maximal precision. All Anchor / program / IDL / transaction-signing / priority-fee plumbing is delegated to the sibling ../solana-dev core skill via references/delegation.md.
# Claude Code plugin install
./install.sh # copies skill + templates into ~/.claude/skills/clmm-command-center
# or, from inside Claude Code:
/plugin install clmm-command-centerFor Codex, point your skills directory at this repo's skill/ folder. Templates under templates/ are importable TypeScript (@solana/kit / web3.js v2); adapters import venue SDKs lazily so the core compiles without every DEX SDK present.
# 1. Watch positions in realtime
> Watch my LP positions and alert me the moment any one goes out of range.
# 2. Backtest a range
> Backtest a 5% SOL/USDC range on Orca over the last 90 days: IL vs HODL and fee APR.
# 3. Rebalance with confirmation
> My SOL/USDC position is out of range. Plan a recenter, simulate it, and ask me to confirm before sending.
Rebalances always simulate (rpc.simulateTransaction) before submit and never auto-execute. Fund-moving and signing transactions require an explicit typed human confirmation; slippage, max-notional, max-position, and daily-loss caps plus a kill-switch are mandatory; configs default to DRY_RUN=true and REQUIRE_CONFIRM=true. No flag defeats the confirm-gate.
The tax-lot ledger is a record-keeping aid, not tax advice. Per-wallet cost-basis tracking became mandatory Jan 1 2025 (Rev. Proc. 2024-28); the new 2026 items are broker 1099-DA cost-basis reporting and the expiry of Notice 2025-7 spec-ID transitional relief. The taxability of LP add/remove is unsettled, so ambiguous lots are flagged for CPA review. Default method is FIFO (HIFO / SPECID supported).
@solana/kit ^6 (web3.js successor; npm major 6.x, lockstep with compat; v1 maintenance-only) - @solana/compat ^6 at v1-only SDK boundaries - @triton-one/yellowstone-grpc ^5 (Yellowstone gRPC streaming) - @orca-so/whirlpools ^8 (Kit) - @raydium-io/raydium-sdk-v2 0.2.53-alpha (pin exact) - @meteora-ag/dlmm ^1.9 + DAMM v2 - @kamino-finance/kliquidity-sdk ^13 (note kliquidity -> klend KaminoVault migration) - Anchor 1.0.2. See references/sdk-versions.md.
MIT (c) 2026 Alexandre Bandarra. See LICENSE.