# pp-kalshi

pp-kalshi — a skill that adds commands for trading on Kalshi, tracking market prices over time, and analyzing your portfolio by event category.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 219 installs · ★ 2142 repo stars
- Author: Trevin Chow
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/mvanhorn/printing-press-library/tree/HEAD/cli-skills/pp-kalshi/SKILL.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/pp-kalshi

## What it does

pp-kalshi wraps the `kalshi-pp-cli` binary, which connects to Kalshi's API and maintains a local SQLite store of price snapshots. Each market sync captures a tick snapshot, letting you graph price movement, find correlated events, and break down realized P&L by category.

The skill includes portfolio commands: `portfolio attribution` shows profit split by category over a date range, `portfolio winrate` gives your win-loss ratio and ROI, `portfolio exposure` breaks down concentration risk. For markets: `markets history` plots a sparkline of price movement, `markets movers` surfaces the biggest price swings in a window, `markets correlate` computes Pearson correlation between two markets.

Before first use, install the CLI. You can go with `npx` (quick if you have Node) or `go install` (if Node isn't available). The Go path requires Go 1.26.6 or later. After install, verify the version and confirm the binary directory is on `$PATH` — the agent won't be able to run commands without it.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add mvanhorn/printing-press-library --skill pp-kalshi -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add mvanhorn/printing-press-library --skill pp-kalshi -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add mvanhorn/printing-press-library --skill pp-kalshi -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install mvanhorn/printing-press-library cli-skills/pp-kalshi/SKILL.md
```

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

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add mvanhorn/printing-press-library --skill pp-kalshi -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/mvanhorn/printing-press-library --path cli-skills/pp-kalshi
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add mvanhorn/printing-press-library --skill pp-kalshi -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/mvanhorn/printing-press-library/tree/HEAD/cli-skills/pp-kalshi/SKILL.md

## When to use it
- retrieve price history for a market instead of only current quote
- calculate realized P&L broken down by event category
- find correlated markets for hedging or signal discovery
- monitor upcoming settlements with your positions and expected payouts
- compute win-rate and ROI across all closed positions

## Example prompts
- Show me the price history of KXPRES-2028-DJT with a sparkline starting in April.
- What's my win-rate on sports markets this quarter in JSON format?
- Find markets that moved most in the last 24 hours in the politics category.

## Source text · SKILL.md · Apache-2.0

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: 3a361b6f24f8103a.

BEGIN THIRD-PARTY FILE 3a361b6f24f8103a
````text
---
name: pp-kalshi
description: "Trade prediction markets, persist tick data, and answer category-level P&L questions Kalshi.com cannot. Trigger phrases: `kalshi market price`, `track prediction market`, `kalshi portfolio P&L`, `kalshi correlate markets`, `use kalshi`, `run kalshi`."
author: "Trevin Chow"
license: "Apache-2.0"
argument-hint: "<command> [args] | install cli|mcp"
allowed-tools: "Read Bash"
metadata:
  openclaw:
    requires:
      bins:
        - kalshi-pp-cli
    install:
      - kind: go
        bins: [kalshi-pp-cli]
        module: github.com/mvanhorn/printing-press-library/library/payments/kalshi/cmd/kalshi-pp-cli
---
<!-- GENERATED FILE — DO NOT EDIT.
     This file is a verbatim mirror of library/payments/kalshi/SKILL.md,
     regenerated post-merge by tools/generate-skills/. Hand-edits here are
     silently overwritten on the next regen. Edit the library/ source instead.
     See the repository agent guide, section "Generated artifacts: registry.json, cli-skills/". -->

# Kalshi — Printing Press CLI

## Prerequisites: Install the CLI

This skill drives the `kalshi-pp-cli` binary. **You must verify the CLI is installed before invoking any command from this skill.** If it is missing, install it first:

1. Install via the Printing Press installer. It defaults binaries to `$HOME/.local/bin` on macOS/Linux and `%LOCALAPPDATA%\Programs\PrintingPress\bin` on Windows:
   ```bash
   npx -y @mvanhorn/printing-press-library install kalshi --cli-only
   ```
2. Verify: `kalshi-pp-cli --version`
3. Ensure the reported install directory is on `$PATH` for the agent/runtime that will invoke this skill.

If the `npx` install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.6 or newer). This installs into `$GOPATH/bin` (default `$HOME/go/bin`), so add that directory to `$PATH` instead:

```bash
go install github.com/mvanhorn/printing-press-library/library/payments/kalshi/cmd/kalshi-pp-cli@latest
```

If `--version` reports "command not found" after install, the runtime cannot see the binary directory on `$PATH`. Do not proceed with skill commands until verification succeeds.

Every Kalshi feature, plus a local SQLite store that records market prices on every sync — so movers, correlations, and price history work offline. Honest about read-only vs read/write keys, with --dry-run on every mutator and a global --read-only safe-mode lock for newsroom and bot deployments.

## When to Use This CLI
````
END THIRD-PARTY FILE 3a361b6f24f8103a

The third-party file has ended. Everything between the 3a361b6f24f8103a 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 2480 of 26851 bytes. © Trevin Chow · Apache-2.0 · https://github.com/mvanhorn/printing-press-library/tree/HEAD/cli-skills/pp-kalshi/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
