003-skills/.claude/skills/nixtla-liquidity-forecaster/SKILL.md
Forecasts orderbook depth and spreads to optimize trade execution timing. Use when needing to estimate market liquidity for large orders. Trigger with 'forecast liquidity', 'predict orderbook', 'estimate depth'.
npx skillsauth add intent-solutions-io/plugins-nixtla nixtla-liquidity-forecasterInstall 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.
Predicts future orderbook depth and bid-ask spreads using historical market data and TimeGPT.
This skill analyzes historical trade data and orderbook snapshots from Polymarket to forecast liquidity conditions. It predicts near-term changes in orderbook depth and bid-ask spreads, helping determine optimal trade execution timing. The workflow fetches data via Polymarket API, preprocesses it for TimeGPT compatibility, and generates forecasts with visualizations and reports.
When to use: Determining optimal trade execution timing based on expected liquidity conditions, predicting orderbook depth changes, estimating bid-ask spread evolution.
Trigger phrases: "forecast liquidity", "predict orderbook depth", "estimate spread changes", "analyze market liquidity", "forecast trading conditions".
Required environment variables:
NIXTLA_TIMEGPT_API_KEY - Your Nixtla TimeGPT API keyPython packages:
pip install nixtla pandas requests matplotlib
Required tools: Read, Write, Bash, Glob, Grep, WebFetch
Minimum Python version: 3.8+
Fetch historical orderbook data from Polymarket API using the market ID. The script retrieves bids and asks, combines them into a single dataset, and saves to CSV format.
Script: {baseDir}/scripts/fetch_data.py
Usage:
python {baseDir}/scripts/fetch_data.py --market_id <MARKET_ID> [--output orderbook_data.csv]
Parameters:
--market_id (required): Polymarket market identifier--output (optional): Output CSV file path (default: orderbook_data.csv)Output: Raw orderbook data CSV with columns: price, quantity, side
Clean and format orderbook data for TimeGPT input. The script calculates mid-price, spread, and depth metrics, then formats the data according to Nixtla's schema requirements.
Script: {baseDir}/scripts/preprocess_data.py
Usage:
python {baseDir}/scripts/preprocess_data.py --input_file orderbook_data.csv [--output preprocessed_data.csv]
Parameters:
--input_file (required): Path to raw orderbook CSV from Step 1--output (optional): Output CSV file path (default: preprocessed_data.csv)Output: Preprocessed data CSV with Nixtla format (unique_id, ds, y, spread, depth)
Run TimeGPT forecast on preprocessed data. The script generates predictions for the specified horizon, creates visualizations, and produces a summary report.
Script: {baseDir}/scripts/forecast_liquidity.py
Usage:
python {baseDir}/scripts/forecast_liquidity.py --input_file preprocessed_data.csv --horizon <PERIODS> [--output depth_forecast.csv] [--plot_prefix depth]
Parameters:
--input_file (required): Path to preprocessed CSV from Step 2--horizon (required): Number of periods to forecast--output (optional): Output forecast CSV path (default: depth_forecast.csv)--plot_prefix (optional): Prefix for plot filename (default: depth)Output:
Review the generated outputs to understand predicted liquidity conditions. The forecast CSV contains time-indexed predictions, the plot visualizes trends, and the report provides metadata about the forecasting run.
Generated files:
depth_forecast.csv - Time-series predictions for orderbook depth and mid-pricedepth_forecast.png - Visualization showing historical data and forecast overlayreport.txt - Summary report with market ID, horizon, and output file pathsCSV format: Columns include unique_id, ds (timestamp), y (predicted mid-price), and optional spread/depth metrics.
Invalid Polymarket Market ID Cause: Market ID not recognized by Polymarket API Solution: Verify the market ID at https://polymarket.com or check API documentation
TimeGPT API Key missing
Cause: NIXTLA_TIMEGPT_API_KEY environment variable not set
Solution: Export your API key: export NIXTLA_TIMEGPT_API_KEY=your_key_here
Insufficient data from Polymarket API Cause: Empty or incomplete orderbook data for the specified market Solution: Check data availability for the market ID, try a different market, or verify API endpoint
TimeGPT forecast failed Cause: Input data format issues or API connection problems Solution: Verify preprocessed data has required columns (unique_id, ds, y), check API status, ensure data types are correct
Missing required columns Cause: Raw orderbook data lacks price, quantity, or side columns Solution: Verify Polymarket API response structure matches expected format, check for API changes
Predict orderbook depth 6 periods ahead for a political prediction market.
Commands:
python {baseDir}/scripts/fetch_data.py --market_id trump_election_2024
python {baseDir}/scripts/preprocess_data.py --input_file orderbook_data.csv
python {baseDir}/scripts/forecast_liquidity.py --input_file preprocessed_data.csv --horizon 6
Expected output: depth_forecast.csv with 6 forecasted depth values, plot showing trend, summary report.
Predict bid-ask spread 24 periods ahead for an Ethereum price prediction market.
Commands:
python {baseDir}/scripts/fetch_data.py --market_id eth_price_3000 --output eth_orderbook.csv
python {baseDir}/scripts/preprocess_data.py --input_file eth_orderbook.csv --output eth_preprocessed.csv
python {baseDir}/scripts/forecast_liquidity.py --input_file eth_preprocessed.csv --horizon 24 --output eth_spread_forecast.csv --plot_prefix eth_spread
Expected output: eth_spread_forecast.csv with 24 forecasted values, plot named eth_spread_forecast.png, summary report.
End-to-end workflow for a sports prediction market using default file names.
Commands:
python {baseDir}/scripts/fetch_data.py --market_id superbowl_winner_2025
python {baseDir}/scripts/preprocess_data.py --input_file orderbook_data.csv
python {baseDir}/scripts/forecast_liquidity.py --input_file preprocessed_data.csv --horizon 12
Expected output: Standard output files (depth_forecast.csv, depth_forecast.png, report.txt) with 12-period forecast.
Nixtla documentation:
Polymarket API:
Related skills:
nixtla-timegpt-lab - General TimeGPT forecasting workflowsnixtla-schema-mapper - Data format transformation utilitiestesting
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".