Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/solanabr/position-manager-skillnpx agentmods add commands/solanabr/position-manager-skill/clmm-rebalanceWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/solanabr/position-manager-skill/clmm-rebalance)<a href="https://agentmods.dev/commands/solanabr/position-manager-skill/clmm-rebalance"><img src="https://agentmods.dev/badge/commands/solanabr/position-manager-skill/clmm-rebalance/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/solanabr/position-manager-skill/clmm-rebalance"><img src="https://agentmods.dev/badge/commands/solanabr/position-manager-skill/clmm-rebalance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00017 | $0.01381 |
| Opus 5.5 | $0.00007 | $0.00552 |
| Sonnet 5.5 | $0.00003 | $0.00276 |
| Haiku 4.5 | $0.00002 | $0.00138 |
Grade A, and why
clmm-rebalance scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 124 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/clmm-rebalance
Closes an out-of-range CLMM position and reopens it at a new tick range. Every execution path requires a simulation check AND a typed human confirmation. No bypass flag exists. This is non-negotiable.
Steps
-
Set environment:
export SOLANA_RPC_URL="https://your-rpc-endpoint" export OWNER_ADDRESS="YourWallet111..." export KEYPAIR_PATH="$HOME/.config/solana/id.json" # Safety caps (edit to your risk tolerance) export MAX_NOTIONAL_USD=50000 export MAX_POSITION_USD=100000 export MAX_SLIPPAGE_BPS=100 # 1% export DRY_RUN=true # set false only when ready to execute export REQUIRE_CONFIRM=true # never set false -
Plan the rebalance (no transaction yet):
npx tsx -e " import { planRebalance } from './skill/templates/rebalance'; import { fetchPositions } from './skill/templates/adapters/orca'; // or raydium/meteora const [pos] = await fetchPositions(process.env.OWNER_ADDRESS!); // planRebalance(position, newRange) -> RebalancePlan (synchronous; reads no chain) const plan = planRebalance(pos, { tickLower: 44500, tickUpper: 45500 }); console.log(JSON.stringify(plan, (_k, v) => (typeof v === 'bigint' ? v.toString() : v), 2)); "Review the plan output (note the
confirmPhraseyou must type to authorize):{ "venue": "orca", "pool": "<whirlpool-address>", "from": { "tickLower": 44000, "tickUpper": 45000 }, "to": { "tickLower": 44500, "tickUpper": 45500 }, "steps": [ { "kind": "collectFees" }, { "kind": "decreaseLiquidity" }, { "kind": "closePosition" }, { "kind": "openPosition" }, { "kind": "increaseLiquidity" } ], "estNotional": "9840000000", "estPosition": "9800000000", "confirmPhrase": "REBALANCE orca <whirlpool-address> [44000,45000]->[44500,45500]" } -
Simulate (automatic when executeRebalance is called; shown separately here):
The execute function calls
rpc.simulateTransactionbefore any signing. If simulation fails, execution aborts with the simulation error. You must fix the plan and retry; the error is never silently ignored.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 124 lines · 17 tokens per session scan A 93eae6eac1aa
clmm-rebalance is a command published in the GitHub repository solanabr/position-manager-skill (2 stars, last pushed 3mo ago), licensed MIT. It adds 17 tokens to every session and 1,381 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
hyperliquid-risk
Mission-critical real-time risk monitoring system with automated alerts, circuit breakers, and emergency shutdown for live Hyperliquid trading by ae.ltd.
global-flags
Cryptocurrency wallet for trading for Bitcoin, Bitcoin cash, Ethereum, ERC20, XRP Leger (Ripple).
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.