simmer-preflight
БесплатноЗапускает вложенные скриптыНе проверенPre-trade readiness check for autonomous agents. One call returns wallet identity, venue status, spendable balance, open exposure, and a structured…
от SpartanLabsXyz★ 57 звёзд на GitHubОб этом скилле
Simmer Preflight
Live real-money trades now enforce this check. client.trade(..., dry_run=False) and client.place_combo(..., dry_run=False) on a live=True client against a real venue (polymarket / kalshi) auto-run preflight() and refuse if ok_to_trade is False, surfacing the blocker codes. The auto-gate's exposure cap is opt-in (EXPOSURE_CAP_USD set → enforced; unset → cap disabled) and sells are exempt from cap math so an over-cap book can still reduce exposure. Wallet / venue / gas blockers still run. Paper, venue="sim", and dry_run=True are unchanged. One-release migrate valve: skip_preflight=True or SIMMER_SKIP_PREFLIGHT=1 (deprecation warning). MCP simmer_trade uses the same live gate; SIMMER_MCP_ALLOW_LIVE is still required and is not a replacement.
Call client.preflight() yourself when you want the full result (wallet, exposure, client_preflight_id) before you size or submit. One call returns:
- Who you are: agent ID, tier, venue resolved from your API key context
- Which wallet will sign: execution wallet, deposit wallet, signer mode (OWS / external key / managed)
- Spendable balance: venue-specific USDC or $SIM balance from the briefing
- Open exposure: sum of
current_valueacross your existing positions (real venues only for USD cap) - Cap check: whether
planned_amount + open_exposure_totalexceeds yourexposure_cap_usd - Risk alerts: any briefing risk signals (concentration, expiry, reliability)
- ok_to_trade: a single boolean — True if no blockers
When to use
Call preflight before every automated trade, especially:
- Before the first real-money order of a run
- Before scaling into a position beyond your initial size
- When your heartbeat wakes up after a long sleep (state may have changed)
Do not call it on every polling tick — it makes 3 API calls. Once per trade intent is correct.
Call it
These examples prepare real-money trades, so opt in explicitly with live=True.
from simmer_sdk import SimmerClient
client = SimmerClient.from_env(venue="polymarket", live=True)
result = client.preflight(
venue="polymarket", # venue to check (defaults to client.venue)
planned_amount=5.0, # USDC you plan to spend on this trade
exposure_cap_usd=100.0, # your total cross-venue exposure limit
)
if not result.ok_to_trade:
print(f"Preflight blocked: {result.blockers}")
# e.g. ["EXPOSURE_CAP_EXCEEDED"]
return
# Log for audit
ledger.record({
"preflight_id": result.client_preflight_id,
"ok": result.ok_to_trade,
"exposure_before": result.open_exposure_total,
"planned": result.planned_amount,
})
Result fields
| Field | Type | Description |
|---|---|---|
client_preflight_id |
str | UUID for your trade ledger — log before every order |
agent_id |
str | None | Agent UUID from /api/sdk/agents/me |
tier |
str | None | Account tier: "free" / "pro" / "elite" |
resolved_venue |
str | Normalised venue: "sim" / "polymarket" / "kalshi" |
execution_wallet |
str | None | EOA that signs trades (per-agent OWS wallet for Elite per-agent callers) |
deposit_wallet |
str | None | Deposit wallet address (DW cohort only; None for Cohort A) |
signer_status |
str | "ows" / "external_key" / "managed" |
spendable_balance |
float | None | Venue balance: pUSD/USDC (real) or $SIM (sim) |
gas_balance |
float | None | POL / SOL for gas — None in v0 (deferred to v1) |
open_exposure_total |
float | Sum of current_value across open positions (real venues only when cap is USD) |
exposure_cap_usd |
float | The cap you passed in |
planned_amount |
float | The planned trade size you passed in |
would_exceed_cap |
bool | True if open_exposure_total + planned_amount > exposure_cap_usd |
pending_alerts |
list[dict] | Risk alerts from briefing (normalised to {message: str}) |
ok_to_trade |
bool | True if no blockers |
blockers |
list[str] | Blocker codes (see below) |
warnings |
list[str] | Non-blocking advisories (fetch failures, skipped checks) |
Blocker codes (v0)
| Code | Meaning | Fix |
|---|---|---|
EXPOSURE_CAP_EXCEEDED |
open_exposure_total + planned_amount > exposure_cap_usd |
Wait for existing positions to resolve, or raise your cap |
WALLET_UNVERIFIED |
Real venue requested but real_trading_enabled is False, or no wallet configured |
Claim agent + link wallet in dashboard |
VENUE_UNSUPPORTED |
Venue string not recognised | Use "sim", "polymarket", or "kalshi" |
INSUFFICIENT_GAS |
Structured risk_alert code is INSUFFICIENT_GAS (v0 proxy; no on-chain query) |
Fund wallet with POL / SOL |
EXPOSURE_UNKNOWN |
Real venue + active cap, but positions fetch failed — fail-closed | Check connectivity or set exposure_cap_usd=0 to disable cap temporarily |
Blockers are additive — all blocking conditions are reported, not just the first.
Per-agent caller (Elite OWS)
For per-a
Установить simmer-preflight в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл simmer-preflight?
Pre-trade readiness check for autonomous agents. One call returns wallet identity, venue status, spendable balance, open exposure, and a structured ok_to_trade verdict. Live real-venue trades auto-run this check and refuse when ok_to_trade is False.
Как установить скилл simmer-preflight?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл simmer-preflight запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic