000-docs/000a-planned-skills/prediction-markets/nixtla-arbitrage-detector/SKILL.md
Detects arbitrage opportunities between Polymarket and Kalshi prediction markets. Use when a user wants to find price discrepancies for the same event on different platforms. Trigger with "find arbitrage", "detect market inefficiencies", "compare Polymarket and Kalshi prices".
npx skillsauth add intent-solutions-io/plugins-nixtla nixtla-arbitrage-detectorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Identifies potential arbitrage opportunities across Polymarket and Kalshi prediction markets.
Finds discrepancies in contract prices for the same event across Polymarket and Kalshi prediction markets, calculating potential profit after fees.
Scans Polymarket and Kalshi for matching events. Fetches current prices for each event. Calculates the potential profit from buying on one platform and selling on the other, factoring in fees. Outputs a list of arbitrage opportunities ranked by potential profit.
Tools: Read, Write, Bash, Glob, Grep, WebFetch
Environment: None required
Packages:
pip install requests pandas
Run the Polymarket data fetcher:
python {baseDir}/scripts/fetch_polymarket.py
This fetches active markets and current prices from Polymarket CLOB API, saving results to polymarket_data.json.
Run the Kalshi data fetcher:
python {baseDir}/scripts/fetch_kalshi.py
This fetches open markets from Kalshi API, saving results to kalshi_data.json.
Run the arbitrage analyzer:
python {baseDir}/scripts/detect_arbitrage.py
This compares prices across platforms using fuzzy string matching (70% similarity threshold), calculates arbitrage strategies, and outputs opportunities sorted by profit percentage.
Create the summary report:
python {baseDir}/scripts/generate_report.py
Generates a formatted markdown report with top opportunities and risk warnings.
Error: Polymarket API Error
Solution: Check Polymarket API status at status.polymarket.com. Retry after 30 seconds.
Error: Kalshi API Error
Solution: Check Kalshi API status. May need API authentication for some endpoints.
Error: No matching events found
Solution: Lower the similarity threshold (default 0.7) or manually map event names.
Error: Insufficient data to calculate arbitrage
Solution: Ensure both platforms have YES and NO prices > 0.
Scenario: Same election event on both platforms
Event: "Will candidate X win the 2024 election?"
Polymarket: YES = 0.45, NO = 0.55
Kalshi: YES = 0.52, NO = 0.48
Strategy: Buy Polymarket YES + Kalshi NO
Cost: 0.45 * 1.02 + 0.48 * 1.01 = 0.459 + 0.485 = 0.944
Guaranteed Return: $1.00
Profit: $0.056 (5.9%)
Scenario: Prices are efficiently aligned
Event: "Will it rain tomorrow in NYC?"
Polymarket: YES = 0.50, NO = 0.50
Kalshi: YES = 0.50, NO = 0.50
Cost of any strategy > $1.00 after fees
Result: No profitable arbitrage
{baseDir}/scripts/fetch_polymarket.py{baseDir}/scripts/fetch_kalshi.py{baseDir}/scripts/detect_arbitrage.py{baseDir}/scripts/generate_report.pyRun the complete workflow:
# 1. Fetch data from both platforms
python {baseDir}/scripts/fetch_polymarket.py
python {baseDir}/scripts/fetch_kalshi.py
# 2. Detect arbitrage opportunities
python {baseDir}/scripts/detect_arbitrage.py
# 3. Generate report
python {baseDir}/scripts/generate_report.py
Or invoke this skill to generate and execute all scripts automatically.
testing
This skill enables Claude to manage isolated test environments using Docker Compose, Testcontainers, and environment variables. It is used to create consistent, reproducible testing environments for software projects. Claude should use this skill when the user needs to set up a test environment with specific configurations, manage Docker Compose files for test infrastructure, set up programmatic container management with Testcontainers, manage environment variables for tests, or ensure cleanup after tests. Trigger terms include "test environment", "docker compose", "testcontainers", "environment variables", "isolated environment", "env-setup", and "test setup".
tools
This skill uses the test-doubles-generator plugin to automatically create mocks, stubs, spies, and fakes for unit testing. It analyzes dependencies in the code and generates appropriate test doubles based on the chosen testing framework, such as Jest, Sinon, or others. Use this skill when you need to generate test doubles, mocks, stubs, spies, or fakes to isolate units of code during testing. Trigger this skill by requesting test double generation or using the `/gen-doubles` or `/gd` command.
tools
This skill enables Claude to generate realistic test data for software development. It uses the test-data-generator plugin to create users, products, orders, and custom schemas for comprehensive testing. Use this skill when you need to populate databases, simulate user behavior, or create fixtures for automated tests. Trigger phrases include "generate test data", "create fake users", "populate database", "generate product data", "create test orders", or "generate data based on schema". This skill is especially useful for populating testing environments or creating sample data for demonstrations.
development
This skill analyzes code coverage metrics to identify untested code and generate comprehensive coverage reports. It is triggered when the user requests analysis of code coverage, identification of coverage gaps, or generation of coverage reports. The skill is best used to improve code quality by ensuring adequate test coverage and identifying areas for improvement. Use trigger terms like "analyze coverage", "code coverage report", "untested code", or the shortcut "cov".