Agent skill

Kalshi Trade

by ryanfrigo in ryanfrigo/kalshi-ai-trading-bot

The disciplined process for autonomously and profitably trading the live Kalshi account on each /loop tick, with Claude as the decision-maker.

MITAuto-check passedBusiness, Finance & HR

Install Kalshi Trade

skills CLI
$ npx skills add ryanfrigo/kalshi-ai-trading-bot --skill kalshi-trade -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ryanfrigo/kalshi-ai-trading-bot kalshi-trade --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ryanfrigo/kalshi-ai-trading-bot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/kalshi-trade .claude/skills/kalshi-trade && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
kalshi-trade
GitHub stars
613
Token cost
~3.4k tokens
SKILL.md length
1,821 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

The disciplined process for autonomously and profitably trading the live Kalshi account on each /loop tick, with Claude as the decision-maker.

  • Works in 9 steps: ASSESS — cli.py brief. Read governor… → SURFACE EDGE — cli.py daily (dry-run, no… → RESEARCH — for the best 1–3 candidates,… → …
  • Include /loop ticks on the Kalshi mission
  • SKILL.md covers The loop (run every tick), Data-fed families: tools,…, Hard rules (never break) and What the REAL settlement data…, plus 2 more sections
  • Calls python

What it does

Kalshi Trade is an agent skill from ryanfrigo/kalshi-ai-trading-bot. The disciplined process for autonomously and profitably trading the live Kalshi account on each /loop tick, with Claude as the decision-maker. Use on every Kalshi trading loop iteration and whenever managing the kalshi-ai-trading-bot live account — to assess account state, surface edge, research true probabilities, decide with strict risk discipline, execute guarded orders, journal predictions, and measure realized edge. Triggers include "/loop" ticks on the Kalshi mission, "trade Kalshi", "run the Kalshi…

Its SKILL.md is about 3.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Business, Finance & HR, covering Trading and backtesting. It works with Kalshi and Python. The repository describes itself as: A toolkit for building AI-automated trading strategies on Kalshi prediction markets. The licence is MIT.

When your agent uses it

  • Include /loop ticks on the Kalshi mission
  • Run the Kalshi process
  • Check the Kalshi account
  • Managing live Kalshi positions

Example prompts

  • “ticks on the Kalshi mission,”
  • “run the Kalshi process”
  • “check the Kalshi account”
  • “/kalshi-trade”

Requirements

  • Python 3

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. ASSESS — cli.py brief. Read governor (halted? day P&L? drawdown?),
  2. SURFACE EDGE — cli.py daily (dry-run, no --live) prints the mechanical
  3. RESEARCH — for the best 1–3 candidates, estimate the TRUE probability the
  4. DECIDE — trade a candidate only if ALL hold
  5. EXECUTE — `cli.py trade --live --ticker T --side no --count N --price 0.NN
  6. JOURNAL — automatic on every trade. Records est_prob, edge, rationale.
  7. LEARN — run cli.py learnings (the integrated learn step). It joins live
  8. IMPROVE — run cli.py improve to close the loop: it re-derives the Edge
  9. REPORT — summarize trades, reasoning, and the equity delta. Then continue the loop.

What it can do on your machine

Read from SKILL.md and the folder at commit 7b9667b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Kalshi Trade loads about 3.4k tokens when it runs. Until then it costs about 149 tokens; SKILL.md has 1,821 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~149
When it runs · the whole SKILL.md, loaded when a task matches
~3.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ryanfrigo/kalshi-ai-trading-bot at commit 7b9667b, republished under its MIT licence (© ryanfrigo). 1,821 words, ~3,446 tokens.

Download SKILL.mdSave it as .claude/skills/kalshi-trade/SKILL.md (or your agent's skills folder).
name
kalshi-trade
description
The disciplined process for autonomously and profitably trading the live Kalshi account on each /loop tick, with Claude as the decision-maker. Use on every Kalshi trading loop iteration and whenever managing the kalshi-ai-trading-bot live account — to assess account state, surface edge, research true probabilities, decide with strict risk discipline, execute guarded orders, journal predictions, and measure realized edge. Triggers include "/loop" ticks on the Kalshi mission, "trade Kalshi", "run the Kalshi process", "check the Kalshi account", and managing live Kalshi positions.

Kalshi Agentic Trading Playbook

You (Claude) are at the helm of a real, live Kalshi account. Your edge over a mechanical bot is judgment: you can research whether an event will actually happen and form a calibrated true-probability estimate. Use it. Be disciplined, measure everything, and only deploy capital on real edge.

Run every command from the repo root: PYTHONPATH=. .venv/bin/python cli.py <cmd>. The standing mission and account facts live in the mission-autonomous-trading memory — read it if you lack context.

The loop (run every tick)

  1. ASSESS — cli.py brief. Read governor (halted? day P&L? drawdown?), equity, cash, positions, resting orders. If governor.halted is true: place NO new buys (you may still close/exit). Note anything that settled since last tick.
  2. SURFACE EDGE — cli.py daily (dry-run, no --live) prints the mechanical "near-certain NO, YES≤0.20, model-edge≥3¢" slice. On efficient days that's only un-tradeable 96¢ buckets, so also cast a wider net: scripts/hunt_candidates.py scans the FULL open universe (via the events API — /markets only returns KXMVE parlays) and buckets candidates into genuine longshot-NO fades and contested directional markets, enriched with LIVE orderbook prices. Both are raw material, not a buy list.
  3. RESEARCH — for the best 1–3 candidates, estimate the TRUE probability the NO side wins. Use real reasoning + WebSearch for current facts (sports results, event status, prices). This step is the whole point — it's where you beat the mechanical filter. Be skeptical: "edge" on hyper-efficient markets (crypto/BTC price buckets, major indices) is almost always illusory.
  4. DECIDE — trade a candidate only if ALL hold:
    • NO-side on a genuine longshot-YES market (favorite-longshot bias — longshots are chronically overpriced, so the NO is underpriced — is the real, documented edge).
    • Your researched true_no_prob beats the NO ask by a fee-aware margin: edge = true_no_prob − no_ask ≥ 0.05 (covers ~1¢ fee + safety). Use YOUR number, not the market's.
    • Category is plausibly inefficient (sports, niche events, obscure outcomes) — not efficient.
    • It clears the governor and the position cap.
    • It clears the Edge Policy gate. Run cli.py policy — the data-driven gate your OWN settled record earns. If your candidate's category is BLOCKED (your record proves it loses money) or its est_prob lands in a HAIRCUT band (you're overconfident there), respect it: cli.py trade will refuse a blocked category. Override only with a genuinely stronger, freshly-researched reason via --override-policy (it's recorded). The gate only ever tightens from your evidence — it encodes exactly the losing buckets below, automatically.
    • It passes the adversarial-verify gate. Before any live buy, run cli.py verify --ticker T — it researches the catalyst + true-YES, runs a SKEPTIC that tries to REFUTE the fade, then a deterministic gate recomputes the edge in points and returns BUY_NO/PASS with a size hint. Trade only on BUY_NO; treat PASS as a hard stop (it fired because the fade didn't survive, edge < 5pts, a positive/live catalyst, or an election frontrunner). Use its size_hint (full only for genuine sub-5% longshots) to size down. If no LLM API key is available, do the research + skeptic YOURSELF (with live web search), write the judgments to a JSON file, and run cli.py verify --ticker T --research-file f.json — the deterministic gate still recomputes the edge off the live book, so it stays a hard gate.
  5. EXECUTE — cli.py trade --live --ticker T --side no --count N --price 0.NN --est-prob P --rationale "why" --category C. The tool re-checks the governor, caps size (≤10% equity, ≤cash), places a resting maker limit by default (low fees), and journals your prediction. Omit --live first to preview.
  6. JOURNAL — automatic on every trade. Records est_prob, edge, rationale.
  7. LEARN — run cli.py learnings (the integrated learn step). It joins live settlements back into the decision journal (filling each trade's outcome), prints the calibration table (predicted vs actual win-rate by est_prob bucket — am I overconfident?) and per-category/side realized edge on YOUR trades, and appends new candidate learnings to data/runtime/learnings.jsonl. Review those candidates: confirm the real ones into this SKILL + memory, and concentrate future trading on categories where YOUR realized edge is positive; stop trading categories that lose. (cli.py settle/history remain for raw P&L.)
  8. IMPROVE — run cli.py improve to close the loop: it re-derives the Edge Policy from the whole settled record and persists it as the active pre-trade gate (data/runtime/edge_policy.json), printing the diff of what the newest settlements changed. From the next tick on, DECIDE's policy check enforces it — the losing buckets you just measured are auto-blocked. This is how the system self-improves without you hand-editing rules each tick.
  9. REPORT — summarize trades, reasoning, and the equity delta. Then continue the loop.

Data-fed families: tools, sources, and standing verdicts (2026-09-26)

Mechanical, data-resolvable families get priced from their resolution source, not from vibes. Before ANY trade in these families, run the family's tool and read data/aaa/alerts/ADJUDICATIONS.md — the standing verdicts live there.

FamilyResolution sourceToolStanding verdict
KXDIESELD daily ladderAAA national print (market closes BEFORE the print)scripts/aaa_pricer.py price --series KXDIESELD --target <date>EFFICIENT — retail-only model lost to the wholesale-convergence check; trade only if the excess gap (scripts/aaa_futures.py gap) is small AND the model still disagrees
KXDIESELMON / KXDIESELWAAA weekly/monthly printsscripts/aaa_pricer.py path --series ... --target <date>Snapshot-only so far; path model fair swings with the drift assumption — needs the forward sample
KXAAAGASD national + 21 statesAAA national/state pages`scripts/aaa_data.py todaystates+price --series KXAAAGASD<ST>`
KXA100MS monthly compute priceOrnn OCPI (public daily API)`scripts/ornn_data.py fetchstrike
KX*SHARE weeklyOpenRouter "Market Share" chart (Mon 10am ET, TEXT requests by author, 1dp; author in "Others" => all NO)`scripts/orshare_data.py snapshotday
KXTRUTHSOCIAL weekly bucketsRoll Call post count (10am ET Mon; Truths+ReTruths+Quotes)scripts/ts_posts.py --week <start> (proxy ±1 vs Roll Call)Count proxy validated; don't fade live-catalyst tail buckets
Jev forward logsame marketsscripts/jev_score.py (runs in the morning job)First forward scores: book Brier 0.054 > model 0.098 > Jev 0.153 (n=498). The sweep's model is NOT good enough to trade yet

Every pricing run writes a snapshot under data/aaa/pricings/ (and Ornn ladder pricings) that aaa_pricer.py score / jev_score.py forward-score against the realized print. Never add size to a family before its scored sample shows the model beating the book.

Show full SKILL.md (765 more words)Show less

Hard rules (never break)

  • Respect the governor. Halted ⇒ no new buys. The manual kill switch is data/runtime/TRADING_HALTED (drop a file to stop everything).
  • Never exceed 10% of equity in one position (the trade tool enforces it; don't fight it).
  • No prediction, no trade. Every order needs --est-prob + --rationale.
  • Edge floor ≥ 5¢ against YOUR probability estimate. Below fees you lose money slowly.
  • Prefer near-certain NO (no_ask ≥ 0.85) on longshot markets. Never buy YES longshots — you become the bag-holder.
  • When uncertain, don't trade. A no-trade tick is a valid, safe, often-correct outcome.

What the REAL settlement data says (measured 2026-06-19, 122 settled bets)

cli.py settle revealed the actual track record — read it before trading:

  • YES longshots: −$528 over 46 bets. Buying a longshot YES is the bag-holder trade. NEVER buy YES longshots. (Holding/closing existing YES is fine.)
  • NO side: 79% win rate but −$59 net over 76 bets — wins were small (+$81), the 16 losses were large (−$141). Picking up pennies, then run over.
  • The losses concentrated in FAKE longshots, not genuine ones:
    • Economic-data buckets (KXCPI, inflation, GDP-point, Fed-rate): the outcome has a real distribution — a "narrow bucket" can carry 10–20%, not 3–5%. AVOID NO bets on numeric/economic-data buckets.
    • Multi-outcome sports brackets/totals (KXMARMAD, KXNCAAMBTOTAL): several outcomes stay live; the NO is not near-certain. Avoid / size tiny.
  • The winners were GENUINE longshots (KXGDP overshoot, KXGUINEAWORM, KXBTCMAX150 extreme price, KXGOVTSHUTLENGTH, alien-confirmation-type): true YES < 5%, NO won 97%, real edge (+11¢/contract on winners).

Refined edge (the only version the data supports): NO-only, on genuine <5% longshots — extreme/binary events where YES is a real long shot — and avoid economic-data buckets and multi-outcome sports brackets. Run cli.py settle each tick and let the realized per-category P&L keep tightening this list. If a category's realized edge is negative, stop trading it.

Liquid markets are already sharp — large "edge" is a red flag (measured 2026-06-19)

A 12-agent research sweep (de-vigged sportsbook odds vs live Kalshi books on 11 markets) found 10/11 efficient; the one "+21¢ survivor" was a MIRAGE — a live tennis match where Kalshi's 0.85 was the correct in-play price and the research had anchored on stale PRE-MATCH odds. Burn these in:

  • A deep, tight, liquid Kalshi book IS a sharp price. Your research edge over the crowd there is ~0. If your "edge" comes from a third-party number that disagrees with a liquid market by >10pts, the liquid market is almost always right — defer to it.
  • Big edge on a liquid market = RED FLAG, not a gift (stale line, live-vs-pre-match, wrong-side mapping). Investigate before trusting; never size up into it.
  • Sports: pre-match odds go stale the instant play starts. Before trusting any sports edge, confirm the event hasn't started — market still active + price drifting + deep tight book ⇒ in-progress — then defer to Kalshi's live price. Don't compute edge from pre-match odds against a live market.
  • Price off the LIVE book, never the snapshot. The events-API *_dollars fields are stale (seen: snapshot 0.68 vs live 0.85). Live book = orderbook_fp.{yes_dollars, no_dollars} ($); best yes_ask = 1 − best_no_bid, best no_ask = 1 − best_yes_bid. scripts/hunt_candidates.py does this for the shortlist.
  • Where real edge actually lives: (a) genuine <5% structural longshots (the proven winner — extreme/binary YES), or (b) genuinely thin/obscure mispriced markets where the crowd is dumb AND you have superior research AND there's liquidity to fill+exit. Not liquid sports / efficient markets — wrong pond.
  • Named-event longshots usually have a REAL catalyst — confirm there is NONE before fading. On Kalshi, non-sports longshots priced 7–13¢ are mostly NOT naive lottery overpricings: the crowd has often correctly priced a live catalyst (active legislation, an M&A bid, genuine contention). Measured 2026-06-19: of 6 researched, 5 were efficient-given-catalyst ($250 Trump bill — Treasury printing it; GameStop→eBay — live bid; Mamdani corp tax — passed both NY houses; Trump-visits-Iran — war→deal; Nobel/Pope Leo — real ~7% contender). The ONE clean fade was the absurd-with-no-catalyst one: KXALIENS (true <1%, NO 0.90, +9¢). Always research the catalyst first; the favorite-longshot edge is much weaker here than theory claims.

Profitability discipline

The legacy −$588 track record was substantially mechanical-bot bugs, not a verdict on the edge — build your OWN measured track record from here and act on real, verified edge. Keep the hard risk rules; discipline ≠ timidity (hunt actively, but never trade a mirage). Reliable profit requires: (a) genuine <5% longshots OR thin researched mispricings, (b) the category exclusions above, (c) low-fee maker orders, (d) a real researched reason the price is wrong, (e) pricing off the LIVE book. Treat cli.py settle realized P&L on YOUR trades as the source of truth, and let it keep tightening the filter. Honesty over optimism: an honest no-trade after a rigorous hunt is a win, not a failure.

© ryanfrigo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/kalshi-trade of ryanfrigo/kalshi-ai-trading-bot.

Open the folder on GitHubat commit 7b9667b

Compare with similar skills

Kalshi Trade next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Kalshi Trade compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Kalshi Trade this skillryanfrigo/kalshi-ai-trading-bot613—~3.4kAutomated safety check: PassMIT
Polymarket Tennislivetennisapi/livetennisapi-mcp152—~3kAutomated safety check: PassMIT
Tushare Datazillionare/zillionare3212 repos~2.3kAutomated safety check: PassNone
Digital Oraclekomako-workshop/digital-oracle878—~5.9kAutomated safety check: PassMIT
Dr Manhattanguzus/dr-manhattan204—~2kAutomated safety check: PassApache-2.0
Quant Backtestjoemccann/market-data-warehouse183—~2.1kAutomated safety check: PassNone

Similar skills

  • Polymarket Tennis

    livetennisapi/livetennisapi-mcp

    Build observe-only Polymarket and Kalshi tennis market tooling on the polymarket-tennis Python package (MIT) plus the Live Tennis API free tier.

    152 GitHub stars~3k tokensUpdated 3 days ago
    Business, Finance & HRAuto-check passed
  • Tushare Data

    zillionare/zillionare

    面向中文自然语言的 Tushare 数据研究技能。用于把“看看这只股票最近怎么样”“帮我查财报趋势”“最近哪个板块最强”“北向资金在买什么”“给我导出一份行情数据”这类请求,转成可执行的数据获取、清洗、对比、筛选、导出与简要分析流程。适用于 A 股、指数、ETF/基金、财务、估值、资金流、公告新闻、板块概念与宏观数据等研究场景。

    321 GitHub starsUsed in 2 repos~2.3k tokens
    Business, Finance & HRAuto-check passed
  • Digital Oracle

    komako-workshop/digital-oracle

    Answer prediction questions using market trading data, not opinions.

    878 GitHub stars~5.9k tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed
  • Dr Manhattan

    guzus/dr-manhattan

    Trade prediction markets (Polymarket, Kalshi, Opinion, Limitless, Predict.fun) using a unified CCXT-style API.

    204 GitHub stars~2k tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed
  • Quant Backtest

    joemccann/market-data-warehouse

    Institutional-grade Python backtesting framework builder for Codex.

    183 GitHub stars~2.1k tokensUpdated 6 mo ago
    Business, Finance & HRAuto-check passed
  • Openscript

    marketcalls/openalgo

    Write an OpenScript study or strategy for OpenAlgo, and install it into strategies/openscript/ only after it compiles.

    2.8k GitHub stars~2.3k tokensUpdated yesterday
    Business, Finance & HRAuto-check: notes

Works with

Questions about Kalshi Trade

What does Kalshi Trade do?

The disciplined process for autonomously and profitably trading the live Kalshi account on each /loop tick, with Claude as the decision-maker. Kalshi Trade is an agent skill from ryanfrigo/kalshi-ai-trading-bot. The disciplined process for autonomously and profitably trading the live Kalshi account on each /loop tick, with Claude as the decision-maker.

When should I use Kalshi Trade?

Kalshi Trade fits situations like: include /loop ticks on the Kalshi mission; run the Kalshi process; check the Kalshi account; managing live Kalshi positions.

How do I install Kalshi Trade in Claude Code?

Run `npx skills add ryanfrigo/kalshi-ai-trading-bot --skill kalshi-trade -a claude-code`. Or copy the skill folder (.claude/skills/kalshi-trade in ryanfrigo/kalshi-ai-trading-bot) into .claude/skills/kalshi-trade in your project. Claude Code loads it when a task matches its description.

How do I install Kalshi Trade in Codex?

Run `npx skills add ryanfrigo/kalshi-ai-trading-bot --skill kalshi-trade -a codex`. Or copy the skill folder (.claude/skills/kalshi-trade in ryanfrigo/kalshi-ai-trading-bot) into .agents/skills/kalshi-trade in your project. Codex loads it when a task matches its description.

Can I use Kalshi Trade in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ryanfrigo/kalshi-ai-trading-bot --skill kalshi-trade -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kalshi-trade, .gemini/skills/kalshi-trade, .github/skills/kalshi-trade and .opencode/skills/kalshi-trade in your project.

What does Kalshi Trade need to run?

Going by SKILL.md and its folder, Kalshi Trade needs the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Kalshi Trade access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Kalshi Trade safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Kalshi Trade use?

Kalshi Trade is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Kalshi Trade use?

About 3.4k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Kalshi Trade?

Skills that share tags, products or a category with Kalshi Trade: Polymarket Tennis (livetennisapi/livetennisapi-mcp, 152 stars), Tushare Data (zillionare/zillionare, 321 stars), Digital Oracle (komako-workshop/digital-oracle, 878 stars) and Dr Manhattan (guzus/dr-manhattan, 204 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Kalshi Trade?

ryanfrigo (a GitHub user) maintains it in ryanfrigo/kalshi-ai-trading-bot, which has 613 GitHub stars. The repository was last updated on October 9, 2026.

Source: ryanfrigo/kalshi-ai-trading-bot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.