Skip to main content

Kwery Skills

Pre-built reasoning guides that teach Claude how to use Kwery data correctly for backtesting, signals, derivatives analysis, and research.

What Are Skills?

Skills are Markdown files loaded into Claude's context. They describe data normalization rules, API patterns, and worked examples specific to a workflow. They don't add tools — they teach Claude to use Kwery tools correctly for a specific domain. Load a skill before starting a task; it tells Claude which tools to call, in what order, and how to handle edge cases.

Available Skills

SkillDescriptionKey tools used
backtestPoint-in-time accurate backtesting on prediction marketspolymarket_candles, kalshi_prices, polymarket_snapshot_at, kalshi_snapshot_at
signalCross-platform signal construction (funding vs PM divergence, liquidation setups)binance_funding, kalshi_prices, binance_liquidations
derivativesFunding rate, OI, and liquidation analysis across venuesbinance_funding, binance_oi, hyperliquid_funding, hyperliquid_oi
researchHistorical market research and resolution analysispolymarket_markets, kalshi_markets, kwery_limits

How to Load a Skill

Option A — Claude Code slash commands (kwery-plugin, coming soon):

/backtest
/signal
/derivatives
/research

Option B — Manual (works today):

Copy the skill content from github.com/KweryAPI/core-ai into your Claude conversation as a system message or initial prompt before starting your analysis.

Option C — Reference by URL:

Ask Claude to read the skill file directly from GitHub before starting work:

Read the backtest skill at https://raw.githubusercontent.com/KweryAPI/core-ai/main/kwery-skills/backtest.md and then help me backtest a Polymarket position.

backtest

The backtest skill enforces point-in-time accuracy — no look-ahead bias.

Key rules it enforces:

  • Use snapshot_at tools for fills, not candles (candles are finalized after the bar closes)
  • Normalize Kalshi prices from cents [0–100] to probability [0–1] before any comparison
  • Check kwery_limits before pulling large datasets to avoid running out of credits mid-backtest

Example workflow:

  1. Use polymarket_markets or kalshi_markets to find the market and get its ID
  2. Use polymarket_snapshot_at or kalshi_snapshot_at with exact timestamps to get the order book state at each simulated fill time
  3. Reconstruct the P&L using the mid-price from each snapshot — never the candle close

signal

The signal skill covers cross-platform divergence and flow-based setups.

Key patterns:

  • Funding rate vs PM probability divergence — elevated funding while PM probability is rising can signal crowded positioning
  • Liquidation cascade detection — a spike in binance_liquidations on the long side often precedes a PM probability drop
  • Directional flow — binance_flow buy_ratio above 0.6 or below 0.4 indicates strong directional pressure
  • Cross-venue imbalance — compare Binance vs Hyperliquid OI to detect venue-specific positioning
⚠️Kalshi normalization

Kalshi prices are in cents (0–100). Always divide by 100 before comparing to Polymarket probabilities (0–1) or any normalized signal.


derivatives

The derivatives skill covers funding rates, open interest, and liquidations across Binance and Hyperliquid.

Key patterns:

  • Annualize funding: rate × 3 × 365 — Binance pays every 8 hours (3 payments/day)
  • Elevated funding threshold: 0.1%/8h = ~109% APR. Historically elevated; watch for mean reversion
  • Cross-venue OI comparison: Pull both binance_oi and hyperliquid_oi to detect venue flow shifts

Funding annualization:

# Binance funding rate is per 8h payment
rate_per_8h = 0.001          # 0.1%
annualized = rate_per_8h * 3 * 365
print(f"{annualized:.1%}")   # 109.5%

research

The research skill covers historical market discovery, resolution analysis, and cross-platform probability comparison.

Use cases:

  • Historical resolution analysis — find all markets that resolved YES/NO on a given event and analyze the price path
  • Market discovery by keyword or category — use polymarket_markets and kalshi_markets with --query to find relevant markets
  • Cross-platform probability comparison at a point in time — use snapshot_at tools to compare Polymarket and Kalshi prices for the same underlying event at the same timestamp

Links