/candle:candle-drained-pool-writeofffrom candle
Detects when a held token's liquidity pool has been drained after entry, writing off the position at cost basis instead of marking at stale prices or retrying sells. Checks real pool reserves directly.
Ships in candle. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A token can pass every pre-buy check and still become unsellable after you own it: the liquidity
provider withdraws, and the pool's quote-asset reserve drops to dust. candle-risk-gate covers the
checks before a buy (lpLock, liquidityDrain, sellability). This skill covers what a book does
when the drain happens after entry.
Two things go wrong without it. The position keeps being marked at its last price, so the book's equity is overstated. And the exit logic keeps retrying sells against an empty pool, burning request budget and holding a slot that could be used elsewhere.
Detect a drain from the pool's own reserve, not from price. On confirmed depletion, take any proceeds a fresh quote offers above the cost of the sell transaction; otherwise write the position off at its full remaining cost basis, keep the quantity and evidence visible, free the slot and stop automatic retries. A failed quote alone is not a drain.
For each held position, periodically read the pool's real quote reserve directly:
Depletion of the pool you entered through is evidence about that pool, not proof that no route exists anywhere. Before writing off, request fresh sell quotes for the full remaining quantity through the normal route finder: a small, fixed number of attempts, spaced apart rather than back to back so a brief quote-service outage cannot decide the outcome. Persist the attempt count so a restart does not reset it. If a quote offers proceeds above the cost of the sell transaction, sell for them rather than writing off.
Each of these alone is not enough to write off a position:
Keep such positions open and under normal management, with the bounded retries described in
candle-trade-execution. onchain-strategy-research makes the same distinction for research:
silence is not a fill, and a dead market is different from an unavailable provider.
When depletion is confirmed and the bounded quote attempts found no positive proceeds:
candle-risk-gate: lpLock, liquidityDrain and sellability before you buy.candle-trade-execution: bounded retries, sticky terminal states and sell clamps.onchain-strategy-research: silence is not a fill; dead markets versus unavailable providers.candle-book-limits: slots that stay occupied by dead positions block new entries.candle-market-data-ingestion: why swap-only feeds miss liquidity events.This skill is advisory. It does not authorize trades, transfers, or limit changes; those remain your operator's decision.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub candledottv/agentic --plugin candle23 skills in this plugin
/candle-agent-operations[OPERATIONS] Run long-lived trading workers and data collectors so they recover from crashes without losing state, never extend their own run, report health truthfully, and hand over cleanly to the next agent session. Use when deploying a trading worker or collector that runs for hours or days, when a worker has crashed, hung or restarted, and when ending a session that leaves workers running./candle-book-limits[RISK CONTROL] Size and audit the lifetime caps, slot counts and wallet reserves of an autonomous trading book so they bound risk without silently stopping the book or blocking its exits. Use when designing a book's limits, when a running book has gone quiet, when an order is stuck unresolved, and when two books share one wallet./candle-first-live-trade[OPERATIONS] The plumbing test a trading bot needs before and during its first live trades: a supervised minimum-size round trip through the real code, a sell proven before buys scale, a control exercised on a live position, and the ledger reconciled against the wallet. Use when a bot is about to trade real money for the first time, after any change of key, signer, wallet, venue or quote asset, when an operator says to kill a newly live bot, when the first live fills look different from paper, and when a newly live book goes quiet./candle-kill-switches[RISK CONTROL] The operator controls an autonomous trading book needs so a human can stop new risk, cut one position or cut everything without editing code or killing a process mid-order, and how those controls differ from the rail's own profile stops. Use when building a trading worker, before running one with real money, and when an operator asks to pause, cut, stop or restart a running book./candle-launch[TOKEN LAUNCH] Launch a new token on Candle, on Solana or Hood, optionally seeded with a dev buy (same transaction on Solana; best-effort follow-up on Hood). Use when the user asks to launch, create, deploy, or seed a token./candle-llm-trade-judge[RESEARCH] Test whether a language model adds anything to trading decisions before trusting it, and give it the role where that can be measured: a judge or veto over a deterministic entry rule. Use when putting a language model in a trading loop, when evaluating an agent that decides entries or exits, and when a model-driven strategy keeps converging on the same trades whatever the prompt says.