Build a zero-dependency OpenClaw skill that converts between American, decimal, fractional odds, implied probability, and Kalshi contract prices. No API key, no network — just Python math your agent can call from any other skill.

Why Your Agent Needs an Odds Converter

Every platform speaks a different odds language. Sportsbooks use American odds (-150, +200). European books use decimal (2.50). UK books use fractional (3/2). Polymarket reports implied probability (0.60). Kalshi quotes contract prices ($0.40).

If your agent pulls NFL moneylines from The Odds API and Polymarket futures in the same workflow, it’s comparing apples to oranges — unless it can normalize everything to a common format first.

The odds-converter skill is the Rosetta Stone of the Agent Betting Stack. It sits below every other skill as a utility layer. The arb-finder needs it to compare sportsbook odds against prediction market prices. The EV calculator needs it to turn offered odds into implied probability. The vig-calculator needs it to sum implied probabilities across outcomes.

This is the first skill you should install because every other skill assumes it exists.

What You’re Building

The odds-converter skill teaches your OpenClaw agent five operations:

  1. American to all formats — Convert American odds to decimal, fractional, implied probability, and Kalshi price
  2. Decimal to all formats — Convert decimal odds to every other format
  3. Fractional to all formats — Convert fractional odds (3/2, 5/1) to every other format
  4. Implied probability to all formats — Convert a probability percentage to odds in all formats
  5. Batch convert — Convert a list of odds values in one pass

The skill uses inline python3 -c commands — no pip packages, no external files, no API calls. It runs anywhere Python 3 is installed.

Prerequisites

  • OpenClaw installed and running — Any channel (WhatsApp, Telegram, Discord, WebChat)
  • Python 3 — Pre-installed on macOS and most Linux distributions

That’s it. No API keys. No network access required.

The Math Behind Odds Conversion

Every odds format encodes the same underlying value: the implied probability of an outcome. The conversion formulas are straightforward once you know the relationships.

American to Implied Probability:

For negative American odds (favorites):

implied_prob = |american| / (|american| + 100)

Example: -150 → 150 / (150 + 100) = 0.60 (60%)

For positive American odds (underdogs):

implied_prob = 100 / (american + 100)

Example: +200 → 100 / (200 + 100) = 0.3333 (33.3%)

Implied Probability to American:

If prob > 0.5:  american = -(prob / (1 - prob)) * 100
If prob < 0.5:  american = ((1 - prob) / prob) * 100
If prob == 0.5: american = +100 (or -100, equivalent)

Implied Probability to Decimal:

decimal = 1 / implied_prob

Example: 0.40 → 1 / 0.40 = 2.50

Implied Probability to Fractional:

fractional = (1 - implied_prob) / implied_prob

Example: 0.40 → 0.60 / 0.40 = 3/2

Kalshi Contract Price:

A Kalshi contract price is simply the implied probability expressed as a dollar value between $0.01 and $0.99. A $0.40 contract = 40% implied probability. The conversion is trivial but agents need it spelled out explicitly.

The Complete SKILL.md

Create the skill directory:

mkdir -p ~/.openclaw/skills/odds-converter

Create ~/.openclaw/skills/odds-converter/SKILL.md with this content:

---
name: odds-converter
description: "Convert between American odds, decimal odds, fractional odds, implied probability, and Kalshi contract prices. Use when asked to convert odds formats, explain what odds mean, or compare odds across platforms."
metadata:
  openclaw:
    emoji: "🔄"
    requires:
      bins: ["python3"]
---

# Odds Converter

Convert between any odds format: American (+150, -200), decimal (2.50), fractional (3/2), implied probability (40%), and Kalshi contract price ($0.40).

# When to Use

Use this skill when the user asks about:
- Converting odds from one format to another
- What specific odds mean (e.g., "what does -150 mean?")
- Comparing odds from different platforms that use different formats
- Implied probability of any odds value
- Kalshi contract price equivalents for sportsbook odds
- Batch converting multiple odds values

# Operations

### 1. American Odds → All Formats

Convert a single American odds value to every other format. Replace ODDS with the value (e.g., -150 or +200):

```bash
python3 -c "
odds = ODDS
if odds < 0:
    impl = abs(odds) / (abs(odds) + 100)
elif odds > 0:
    impl = 100 / (odds + 100)
else:
    impl = 0.5
dec = round(1 / impl, 4) if impl > 0 else 0
from fractions import Fraction
frac = Fraction(1 - impl, impl).limit_denominator(100) if impl > 0 else 'N/A'
kalshi = round(impl, 2)
print(f'American: {odds:+d}')
print(f'Decimal:  {dec}')
print(f'Fractional: {frac}')
print(f'Implied Prob: {impl*100:.2f}%')
print(f'Kalshi Price: \${kalshi}')
"
```

### 2. Decimal Odds → All Formats

Convert decimal odds to every other format. Replace DEC with the value (e.g., 2.50):

```bash
python3 -c "
dec = DEC
impl = 1 / dec if dec > 0 else 0
if impl > 0.5:
    amer = round(-(impl / (1 - impl)) * 100)
elif impl < 0.5:
    amer = round(((1 - impl) / impl) * 100)
else:
    amer = 100
from fractions import Fraction
frac = Fraction(dec - 1).limit_denominator(100) if dec > 1 else '0/1'
kalshi = round(impl, 2)
print(f'Decimal:  {dec}')
print(f'American: {amer:+d}')
print(f'Fractional: {frac}')
print(f'Implied Prob: {impl*100:.2f}%')
print(f'Kalshi Price: \${kalshi}')
"
```

### 3. Fractional Odds → All Formats

Convert fractional odds to every other format. Replace NUM and DEN with numerator and denominator (e.g., 3 and 2 for 3/2):

```bash
python3 -c "
num, den = NUM, DEN
dec = round((num / den) + 1, 4)
impl = den / (num + den)
if impl > 0.5:
    amer = round(-(impl / (1 - impl)) * 100)
elif impl < 0.5:
    amer = round(((1 - impl) / impl) * 100)
else:
    amer = 100
kalshi = round(impl, 2)
print(f'Fractional: {num}/{den}')
print(f'Decimal:  {dec}')
print(f'American: {amer:+d}')
print(f'Implied Prob: {impl*100:.2f}%')
print(f'Kalshi Price: \${kalshi}')
"
```

### 4. Implied Probability → All Formats

Convert an implied probability to every other format. Replace PROB with the probability as a decimal (e.g., 0.40 for 40%):

```bash
python3 -c "
impl = PROB
dec = round(1 / impl, 4) if impl > 0 else 0
if impl > 0.5:
    amer = round(-(impl / (1 - impl)) * 100)
elif impl < 0.5:
    amer = round(((1 - impl) / impl) * 100)
else:
    amer = 100
from fractions import Fraction
frac = Fraction(1 - impl, impl).limit_denominator(100) if impl > 0 else 'N/A'
kalshi = round(impl, 2)
print(f'Implied Prob: {impl*100:.2f}%')
print(f'American: {amer:+d}')
print(f'Decimal:  {dec}')
print(f'Fractional: {frac}')
print(f'Kalshi Price: \${kalshi}')
"
```

### 5. Batch Convert

Convert a list of American odds values to all formats at once. Replace the list with actual values:

```bash
python3 -c "
odds_list = [-150, +200, -110, +300, -400]
print(f'{\"American\":>10} {\"Decimal\":>10} {\"Implied\":>10} {\"Kalshi\":>10} {\"Fractional\":>12}')
print('-' * 56)
for odds in odds_list:
    if odds < 0:
        impl = abs(odds) / (abs(odds) + 100)
    elif odds > 0:
        impl = 100 / (odds + 100)
    else:
        impl = 0.5
    dec = round(1 / impl, 4)
    from fractions import Fraction
    frac = Fraction(1 - impl, impl).limit_denominator(100)
    kalshi = round(impl, 2)
    print(f'{odds:>+10d} {dec:>10.2f} {impl*100:>9.1f}% {\"$\" + str(kalshi):>10} {str(frac):>12}')
"
```

# Output Rules

1. Always show ALL five formats in conversion output
2. American odds must include the +/- sign (e.g., +150, -200)
3. Decimal odds to 2-4 decimal places depending on value
4. Implied probability as a percentage with 1-2 decimal places
5. Kalshi price as a dollar value between $0.01 and $0.99
6. Fractional odds simplified to lowest terms with denominator ≤ 100
7. For batch conversions, use a table format with aligned columns
8. When a user says "what does X mean" — convert to all formats AND explain in plain English (e.g., "-150 means you risk $150 to win $100, implying a 60% chance")

# Error Handling

- If the user provides odds of exactly 0, explain that 0 is not valid in any odds format
- If the user provides implied probability > 1.0 or < 0, ask if they meant a percentage (e.g., 60  0.60)
- If the user provides decimal odds  1.0, explain that decimal odds must be greater than 1.0
- If the user gives a fraction with 0 denominator, explain it's invalid
- If the format is ambiguous (e.g., "150"), ask whether they mean +150 American or 1.50 decimal

Test It

Restart OpenClaw (or wait for hot-reload if your version supports it), then try these prompts:

PromptExpected Behavior
“Convert -150 to decimal”Returns decimal 1.6667 plus all other formats
“What does +200 mean?”Converts to all formats and explains: risk $100 to win $200, 33.3% implied probability
“Convert these odds: -110, +150, -200, +300”Batch conversion table with all formats
“What’s the implied probability of 2.50 decimal?”Returns 40% plus American (+150), fractional (3/2), Kalshi ($0.40)
“A Kalshi contract is at $0.65 — what’s that in American odds?”Converts 65% implied → -186 American, 1.538 decimal, etc.
“Convert 5/2 fractional to American”Returns +250 American plus all other formats

Your agent reads the SKILL.md, identifies the relevant operation, substitutes the right values, and runs the Python one-liner.

How It Works Under the Hood

OpenClaw skills are not plugins that execute code directly. The SKILL.md is a set of instructions that the LLM (Claude, GPT, etc.) reads and follows at runtime.

When you ask “convert -150 to decimal,” this is what happens:

User message → OpenClaw Gateway
  → LLM reads system prompt + active skills
  → LLM matches "convert -150" to odds-converter skill
  → LLM generates python3 -c command with odds = -150
  → OpenClaw executes command via shell tool
  → Python outputs all five formats
  → LLM formats output for user

Because the skill uses inline Python with no dependencies, there’s zero setup friction. No virtual environments, no package installs, no API authentication. The agent can convert odds in the middle of any workflow without breaking its execution chain.

Extending the Skill

Quick-Reference Conversion Table

Add a cron job that generates a fresh conversion table every morning for common odds values. Useful as a cheat sheet when reviewing lines:

{
  "cron": "0 8 * * *",
  "prompt": "Generate a conversion table for these common American odds: -500, -300, -200, -150, -110, +100, +110, +150, +200, +300, +500. Save as today's odds reference."
}

Chain with Other Skills

The odds-converter is the utility layer that other skills call implicitly:

  • odds-scanner — Fetches odds in American format; converter normalizes them for cross-platform comparison
  • arb-finder — Needs to compare sportsbook odds (American) with Polymarket prices (implied probability) in the same units
  • cross-market-pricer — Normalizes odds from three platforms into a single format; converter does the heavy lifting
  • ev-calculator — Converts offered odds to implied probability, then compares against your true probability estimate
  • vig-calculator — Sums implied probabilities across outcomes; needs converter to normalize from whatever format the book reports

This is why odds-converter is categorized as an “All Layers” skill — it’s not specific to any one layer of the Agent Betting Stack. It’s infrastructure.

Full Skill Series

This guide is part of the AgentBets OpenClaw Skills series. We’re building a complete library of betting-specific OpenClaw skills that map to the four layers of the Agent Betting Stack:

  • Layer 1 — Identity: Agent reputation tracking via Moltbook
  • Layer 2 — Wallet: Bankroll management, balance checking across platforms
  • Layer 3 — Trading: Odds scanning, Polymarket monitoring, Kalshi tracking, arbitrage detection
  • Layer 4 — Intelligence: EV calculation, Kelly sizing, CLV tracking, news sentiment

Each skill is a standalone SKILL.md you can install independently or compose into a full autonomous betting pipeline.

What’s Next