/candle:candle-book-limitsfrom candle
Sizes and audits lifetime caps, slot counts, and wallet reserves for autonomous trading books to bound risk without silently stopping the book or blocking exits. Use when designing limits, troubleshooting quiet books, stuck orders, or shared wallets.
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 trading book carries several limits besides its loss limits: a cap on total purchases, a cap on requests, a cap on concurrent positions, a wallet reserve. Each one is meant to bound risk. Each one can also quietly stop the book, or stop its exits, in ways that look like a quiet market.
candle-trading-discipline covers the loss, drawdown and consecutive-loss limits that the rail
enforces on the key, and the difference between a volume cap and a loss cap. This skill covers the
limits a book enforces on itself, and how they fail. Loss limits are out of scope here: when one
trips, follow candle-trading-discipline: stop new entries and report. Exits continue unless the rail
or the operator says otherwise.
Size every lifetime cap from the experiment it has to complete. Never let a cap refuse an exit. Count only open positions against a slot limit. When a book goes quiet, check its caps before you blame the market.
This is design work for the operator, done before the book starts. A lifetime cap (total purchase principal, total requests, total episodes) does not reset. Size it from the question the book exists to answer:
If one request counter covers every call a book makes, then when it reaches its cap the book cannot fetch the quote it needs to sell. A book at that point holds positions it can no longer manage.
candle-trade-execution and candle-drained-pool-writeoff), so a failing
route cannot spend requests without limit.If closed positions stay in the map a book checks against its position limit, a book with its limit reached in closed positions refuses every new entry. Worse, it may drop candidates before logging anything, so there is no refusal event to find.
When a book that used to trade stops trading, check in this order before calling it a signal drought:
These checks are read-only. Changing any of them is covered below.
When an order's outcome is uncertain (timeout, error with no signature, reconcile pending):
A book that freezes all management on one uncertain order leaves every open position without an exit for as long as reconciliation takes, which can be hours.
To resolve the outcome, use the rail's own lookup (candle_get_operation by clientTradeId) and the
stage and retryable fields on the failed trade, documented in Candle's error catalog. Then confirm
on chain: an error with no signature and retryable: true can accompany a transaction that did land
and revert, so the error body alone is not proof that nothing reached the chain. See
candle-trade-execution for reconciliation.
Two books that draw from one wallet each believe the whole balance is theirs. Whichever buys first takes the funds, and the other refuses for lack of funds or, without a check, buys into the other book's exit reserve.
Changing a cap mid-run changes the experiment, and it is the operator's decision. The agent may report
that a cap is binding and propose a change with the numbers. The operator decides, records the old and
new value, the reason and the time, keeps the old policy, and re-authorizes the book where its
authorization is bound to its policy. Loss and drawdown limits are not changed this way; see
candle-trading-discipline.
candle-trading-discipline: loss, drawdown and consecutive-loss limits on the key; volume caps are not loss caps.candle-trade: candle_get_operation for trades that timed out.candle-trade-execution: reconciliation, retry caps and sticky terminal states.candle-kill-switches: operator controls that pause entries without touching exits.candle-agent-operations: request meters shared across processes.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-drained-pool-writeoff[RISK CONTROL] Recognize a held position whose pool was emptied after entry, and account for it as a loss instead of marking it at a stale price or retrying sells forever. Use when a held token's price has stopped updating, when sell quotes keep failing, when a mark looks healthy but no trades arrive, and when deciding whether an unsellable position can be closed out./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.