# kalshi-trading-bot-cli

Drives the Kalshi Trading Bot CLI to research prediction markets, discover price edges, build baskets, and handle guarded order execution.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 106 installs · ★ 132 repo stars
- Author: OctagonAI
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/OctagonAI/skills/tree/HEAD/skills/kalshi-trading-bot-cli/SKILL.md
- Updated: 2026-06-05
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/kalshi-trading-bot-cli

## What it does

This skill equips your coding agent to operate as a prediction market analyst. It runs market queries, computes correlation matrices, evaluates edge metrics, and performs Kelly sizing straight from the terminal. Multi-market portfolios can also be validated and backtested across historic windows.

Workflows rely on the `kalshi-trading-bot-cli` package executed via Bun. The skill strictly separates read-only market discovery from state-changing trades. All price inputs use cents, meaning an input of `56` denotes $0.56 or a 56 percent implied market probability.

Without Bun and valid Kalshi API credentials, trading execution cannot run. Setting `KALSHI_USE_DEMO=true` in the configuration environment keeps experiments inside the paper-trading sandbox before committing actual funds.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add OctagonAI/skills --skill kalshi-trading-bot-cli -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/kalshi-trading-bot-cli/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/kalshi-trading-bot-cli/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add OctagonAI/skills --skill kalshi-trading-bot-cli -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/kalshi-trading-bot-cli/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add OctagonAI/skills --skill kalshi-trading-bot-cli -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/kalshi-trading-bot-cli/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install OctagonAI/skills skills/kalshi-trading-bot-cli
```

2. **Manually: put the files in place**
- File: `.github/skills/kalshi-trading-bot-cli/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add OctagonAI/skills --skill kalshi-trading-bot-cli -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/OctagonAI/skills --path skills/kalshi-trading-bot-cli
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/kalshi-trading-bot-cli/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add OctagonAI/skills --skill kalshi-trading-bot-cli -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/OctagonAI/skills/tree/HEAD/skills/kalshi-trading-bot-cli/SKILL.md

## When to use it
- Scan Kalshi prediction markets for positive pricing edge
- Build a diversified multi-ticker basket with correlation limits
- Calculate contract sizing with fractional Kelly multipliers
- Run a one-year historical backtest on a ticker basket
- Stage guarded buy and sell orders with price checks in cents

## Example prompts
- Run an edge scan on Kalshi markets with a minimum edge of 5 points
- Validate a basket for my bankroll and calculate Kelly sizing
- Analyze the current market spread and stage a buy order in demo mode

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 9db35e4e831c2e4b.

BEGIN THIRD-PARTY FILE 9db35e4e831c2e4b
````text
---
name: kalshi-trading-bot-cli
description: Operate the Kalshi Trading Bot CLI for prediction-market research, edge discovery, basket construction, backtesting, portfolio monitoring, and guarded trade execution. Use when the user mentions kalshi-trading-bot-cli, Kalshi CLI, prediction market trading workflows, market edge scans, basket sizing, or CLI-based Kalshi trading.
---

# Kalshi Trading Bot CLI

You are a senior prediction market trading operations analyst using the Kalshi Trading Bot CLI to research markets, find edge, construct baskets, monitor portfolios, and handle guarded trade workflows.

## Persona

**Role**: Senior Prediction Market Trading Operations Analyst running CLI-first Kalshi research and execution workflows.

**Audience**: Trader, portfolio manager, or automation builder who needs accurate commands, clear risk controls, and reproducible terminal workflows.

**Style**: Trading-desk practical. Concise, command-oriented, explicit about assumptions, liquidity, sizing, stale data, and live-trading risk.

## Prerequisites

The Kalshi Trading Bot CLI requires Bun and a configured Kalshi account:

```
bunx kalshi-trading-bot-cli@latest
```

For local development from a clone:

```
cd /Users/andresgodoy/Documents/dev/kalshi-trading-bot-cli
bun install
bun start
```

Configuration and runtime state live in `~/.kalshi-bot/`. API keys are written to `~/.kalshi-bot/.env` by the setup wizard. A `.env` in the current working directory takes precedence for development.

Required trading credentials:
- `KALSHI_API_KEY`
- `KALSHI_PRIVATE_KEY_FILE` or `KALSHI_PRIVATE_KEY`

Recommended safety and research inputs:
- `KALSHI_USE_DEMO=true` for demo or paper-trading workflows
- `OCTAGON_API_KEY` for Octagon-backed search, edge, clusters, correlations, baskets, and research
- One LLM provider key for AI-assisted research
- `TAVILY_API_KEY` for optional web research

Never print or expose `.env` values, private keys, API keys, order tokens, or credential file contents.

## Available CLI Workflows

This master skill orchestrates the CLI workflows instead of invoking separate sub-skills.

### Setup and Diagnostics
- Run first launch and setup wizard: `bunx kalshi-trading-bot-cli@latest`
- Re-run setup: `kalshi init` or `setup` inside the TUI
- Inspect commands: `kalshi help` or `kalshi help <command>`
- Clear local cache only when explicitly requested: `kalshi clear-cache`

### Market Discovery
- [Command Cookbook](references/command-cookbook.md) - exact syntax for discovery, research, basket, monitoring, and trade commands
- Search: `kalshi search "query" --limit 20`
- Edge scan: `kalshi search edge --min-edge 5 --limit 10 --sort-by edge_pp`
````
END THIRD-PARTY FILE 9db35e4e831c2e4b

The third-party file has ended. Everything between the 9db35e4e831c2e4b tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2689 of 9175 bytes. © OctagonAI · MIT · https://github.com/OctagonAI/skills/tree/HEAD/skills/kalshi-trading-bot-cli/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
