Skip to main content
skill CX Codex

prediction-market-live-ops — Claude Code skill

prediction-market-live-ops — a skill for automated trading on prediction markets (Kalshi). Combines backtest methodology, live-execution safety rails, and hypothesis-falsification protocols derived from a real live-money campaign.

MIT 194 installs ★ 582 updated 2026-09-03

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add agiprolabs/claude-trading-skills --skill prediction-market-live-ops -a claude-code
Open on GitHub

What prediction-market-live-ops does

This skill packages operational knowledge from a live Kalshi trading run (August–September 2026: crypto/commodity maker ladders, regime tilts, tennis dust). Every strategy decision requires evidence: backtest → paper trading → live micro-probe → scale. Each stage has pre-declared kill conditions with properly calibrated probability math, written down before data arrives. If a threshold proves miscalibrated, correct it openly and re-declare.

The skill covers backtest hygiene (print-replay as an upper bound, correct time-series order, fill-conditioned validation, PnL concentration checks, early-settlement bias), live execution rules (smoke-test every order path, distinguish cancelled from filled orders, consistent shard routing, empirically measured rate limits, post_only for makers, halt-file and drawdown breaker, queue priority, geofencing), and scaling doctrine (house-money ratchet, capacity-curve measurement, fill-quality gates).

Built on reference implementation at https://github.com/agiprolabs/kalshi-stack and complements prediction-market-strategy (edge selection and sizing). This skill handles the operational side: validating, executing, and halting strategies on a live venue such that losses stay within the cost of the lesson.

What it helps with

  • Design a prediction-market backtest that avoids phantom profits from adverse selection
  • Deploy a trading bot on Kalshi with position-crash protection against rate limits and race conditions
  • Distinguish regime drift from a real edge when a pattern holds in one time period but vanishes in another
  • Scale a strategy in steps while maintaining the correlation between size and realized PnL
  • Maintain append-only fill ledgers and falsification records for post-hoc audit and result trust

Example prompts for the agent

  • Design a backtest for a maker strategy on tennis dust markets, accounting for print-replay overstatement
  • Set up a smoke test for live Kalshi orders and confirm that cancellations properly distinguish filled from cancelled state
  • Check whether a pattern across morning hours is a regime bet or true edge if it disappears in the afternoon

How to install prediction-market-live-ops

1Skills CLI (Vercel)

npx skills add agiprolabs/claude-trading-skills --skill prediction-market-live-ops -a claude-code

2Manually: put the files in place

~/.claude/skills/prediction-market-live-ops/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/prediction-market-live-ops/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about prediction-market-live-ops

How do I install prediction-market-live-ops in Claude Code?

Run npx skills add agiprolabs/claude-trading-skills --skill prediction-market-live-ops -a claude-code, then open ~/.claude/skills/prediction-market-live-ops/SKILL.md.

What does prediction-market-live-ops do?

It provides methodology and operational rules for building, backtesting, and running automated strategies on prediction markets like Kalshi. The skill covers honest historical validation, live execution with safety systems, and staged scaling.

How is this different from prediction-market-strategy?

prediction-market-strategy helps you choose an edge and size a position. prediction-market-live-ops covers the operations: validating a strategy honestly, launching it live without blowups, halting if outcomes diverge from expectations.

Source text

SKILL.md · MIT
---
name: prediction-market-live-ops
description: Use when building, backtesting, operating, or scaling automated trading on prediction markets (Kalshi or similar) — evidence-gated methodology, live-execution safety rails, and falsification protocols distilled from a real live-money campaign
---

# Prediction-Market Trading Doctrine

Hard-won operational knowledge from a live Kalshi campaign (Aug–Sep 2026:
crypto/commodity maker ladders, regime tilts, tennis dust vacuum — all
falsified honestly, infrastructure open-sourced). Reference implementation: https://github.com/agiprolabs/kalshi-stack.
Complements `prediction-market-strategy` (edge selection/sizing) — this skill
covers the OPERATIONAL side: validating, executing, and killing strategies
against a live venue without losing more than the lesson costs.

## The prime directive

Every strategy decision is evidence-gated: backtest → paper → live micro-probe
→ ratchet. Each stage has a PRE-DECLARED kill condition with correctly
calibrated probability math, written down BEFORE the data arrives. When a
threshold turns out miscalibrated, correct it openly and re-declare — never
silently move a goalpost in either direction.

## Backtest hygiene (each rule was violated once, expensively)

- **Print-replay EV of passive-fill strategies is an UPPER BOUND, never an
  estimate.** The prints a resting order actually captures are an
  adversely-selected sample of the tape (sweeps deep enough to reach your
  queue skew toward true collapses). A tennis dust book that measured +125%/$
  on prints went 0-for-78 live (P<2%). Only fill-conditioned live outcomes
  validate a maker strategy.
- **Time-series joins use the last bar ending ≤ the decision instant.**
  A candle containing the instant is look-ahead and will fabricate
  covariates that vanish out-of-sample.
- **Taker backtests need print-confirmed executability**, not quoted-ask
  edges — stale quotes create phantom fills.
- **Any bucketed-PnL review includes a top-N-share column.** Lottery-payoff
  books concentrate EV; a "pattern" that is two elephant rounds is noise.
  Same rule when a holdout "wins": check concentration before believing it.
- **Early settlements are selection-biased toward losers** (collapses end
  fast; comebacks are long matches/rounds). Never read a verdict off the
  fast-settling prefix.
- **Static tilts that flip sign between tape halves are regime bets, not
  edges.** A conditioning scheme must beat baseline on BOTH halves and on
  each individual day; pre-register the rules, no per-day fitting.
- Mirror/complement markets are the SAME bet — deduplicate before computing
  independence-based probabilities.

## Live execution rules (the incident ledger)

- **Smoke-test every live order path with a real 1-lot round trip** (place,
  verify resting, cancel, verify gone) before any strategy trades through
  it. Paper cannot exercise venue routing parameters. Cost: $0.01.
- **Cancels must be truthful**: distinguish cancelled / already-gone
  (filled!) / failed. A 404 is not a cancel — it means wrong routing shard
  or a fill-race. Swallowed cancel failures + re-anchor loops = runaway
  position stacking (cost us $84 in one evening).
- **Route the exchange shard (`exchange_index`) consistently on EVERY call**
  — placement, reads, cancels, collateral. Collateral must be pre-positioned
  on the shard before orders.
- **Measure rate limits empirically with dust orders** (burst ladder +
  sustained test). Advertised budgets can be 10× off effective per-order
  cost. Pace bursts to the measured rate with retry-requeue on 429.
- **post_only for any maker strategy** — an "aggressive maker" price on a
  market trading inside your band silently becomes a taker fill of a
  different (unvalidated) trade. Tag and cohort maker vs taker fills
  separately in all realized-EV accounting.
- **Rails, always**: halt-file checked before every order batch (cancel-all
  on appearance), independent scheduler-driven drawdown breaker with
  deposit-jump detection, per-order and per-market size caps with anomaly
  ledger events, equity floor stand-down. The breaker baseline is set at
  session start per the operator's stated loss tolerance.
- **Queue priority is the product** in penny/maker books. Synchronized-open
  venues: NTP + fire at boundary+0 with a retry probe (measure the venue's
  open-transition latency). Event-driven venues: push-based discovery
  (lifecycle WebSocket channels) beats polling; a fresh market's book is
  empty, so first-to-rest owns the level for its lifetime.
- **Restart daemons at activity boundaries**; mid-round restarts orphan
  in-memory state (untracked orders, missed settlements).
- **Geofencing is real**: order-origin IP matters, categories differ
  (sports/elections vs financials), and enforcement can change overnight.
  Datacenter location is part of your compliance posture.

## Scaling doctrine

- **House-money ratchet**: double size only when realized profit at the
  current step covers the next step's incremental risk AND round-count and
  EV-continuity gates pass. Drop back a step on trailing degradation.
- **Measure the capacity curve** (EV/$ by per-print cap) before believing
  any scale projection; then the binding constraint is capture rate ×
  measured pool, and capture rate is only measurable live.
- **Fill quality is the untested link at every new size** — the paper/live
  EV-per-$ ratio at each step gates the next.

## Experiment operations

- Cohort every fill (maker/taker, band, source) at write time — post-hoc
  attribution is what lets a bug contaminate a verdict.
- Ship one variable at a time; changing size and placement logic in the same
  window destroys attribution.
- Run A/B variants in paper against a frozen baseline (small-footprint
  variant, shared rounds, EV/premium-$ as the scale-free judge).
- Log everything to append-only ledgers; reconcile realized PnL to the
  venue's own fills/settlements, never to internal marks.
- Post results (wins AND falsifications) to the operator's channel; write a
  decision record with evidence and reversal conditions for every ship,
  retire, and kill.

© agiprolabs · MIT · agiprolabs/claude-trading-skills

Similar skills

All skills for AI and ML →
Prediction Markets — Polymarket & Kalshi Live Odds axel-belfort Prediction Markets — Polymarket & Kalshi Live Odds is an MCP server for Claude Code that connects AI agents to live Polymarket and Kalshi data to assess event probabilities and track trading activity. CX Codex +1 4,215installs Rekko AI — Prediction Market Intelligence rekko-ai The Rekko AI — Prediction Market Intelligence MCP server for Claude Code connects agents to Kalshi, Polymarket, Robinhood, and Coinbase to spot price spreads and calculate probability forecasts. CX Codex +1 573installs predexon-prediction-market-trading-1-5-teneo TeneoProtocolAI predexon-prediction-market-trading-1-5-teneo is a Claude Code skill that queries the Predexon agent through Teneo CLI. It fetches current commands, arguments, and prices before running a trading task. CX Codex +1 490installs Oracle3 prediction-market arbitrage checks YichengYang-Ethan Oracle3 prediction-market arbitrage checks wires Kalshi and Polymarket into your agent: contract search, quotes, relationship checks and fee math. Handy when you need to compare markets and see the net edge. CX Codex +1 ★ 570repo stars matchwire.win — Mapped Prediction Markets (Kalshi, Polymarket, Predict.fun) MatchWire-Win matchwire.win — Mapped Prediction Markets (Kalshi, Polymarket, Predict.fun) is a Claude Code MCP server. Maps a game across Kalshi, Polymarket US/International and Predict.fun to one row with ids. CX Codex +1 prediction-markets-analysis OctagonAI prediction-markets-analysis is a Claude Code skill that compares Kalshi contract prices with model probabilities and factors that could shift outcomes. For pre-trade research or checking a market thesis. CX Codex +1 255installs

From the same set68

The whole set →
cost-basis-engine cost-basis-engine computes cost basis for crypto trades with FIFO, LIFO, HIFO, specific ID and average cost, so you can compare the tax hit across methods. CX Codex +1 471installs regulatory-reporting regulatory-reporting prepares cryptocurrency trade data for IRS Form 8949 and Schedule D line items. Helps organize taxable dispositions before handing records to an accountant. CX Codex +1 470installs raptor-dex raptor-dex connects coding agents to a self-hosted Solana DEX aggregator with no rate limits. Helps route swaps across 25+ DEXes and submit transactions via Yellowstone Jet TPU. CX Codex +1 463installs prediction-market-strategy prediction-market-strategy is a Claude Code skill for selecting binary prediction-market trades by net edge, sizing positions, and backtesting. CX Codex +1 366installs kalshi-api kalshi-api — a skill covering RSA-PSS signing, order schema and the YES/NO book on Kalshi. Useful when you write trading code against that API. CX Codex +1 355installs kalshi-weather-markets kalshi-weather-markets covers daily high/low temperature contracts on Kalshi: ticker structure, the forecast-to-P(YES) map, settlement rules, and weather-specific pitfalls. CX Codex +1 352installs polymarket-api Skill for Polymarket API integration, a decentralized prediction exchange on Polygon blockchain. Access market data, order books, and settlement mechanics through Gamma, CLOB, and Data APIs. CX Codex +1 351installs kalshi-crypto-index-markets The kalshi-crypto-index-markets skill covers Kalshi daily and hourly range markets for BTC, ETH, S&P 500, and Nasdaq-100. Use it to model bracket probabilities and decision timing. CX Codex +1 346installs

Project sponsors

Companies that keep this analytics open