003-skills/.claude/skills/nixtla-polymarket-analyst/SKILL.md
Analyze and forecast Polymarket contracts using TimeGPT with confidence intervals. Use when predicting contract prices. Trigger with 'Polymarket analysis' or 'forecast prediction market'.
npx skillsauth add intent-solutions-io/plugins-nixtla nixtla-polymarket-analystInstall 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.
Analyzes and forecasts Polymarket prediction market contract prices using historical data and TimeGPT forecasting models.
This skill fetches Polymarket contract data via API, transforms it into Nixtla time series format, and generates probabilistic forecasts using TimeGPT. The agent produces price forecasts with confidence intervals, trend analysis, and trading signals. Useful for traders and analysts seeking data-driven insights on prediction markets. Outputs include CSV forecasts, visualizations, and analysis reports with risk disclaimers.
Required Tools: Read, Write, Bash, Glob, Grep, WebFetch
Environment Variables:
NIXTLA_TIMEGPT_API_KEY - Required for TimeGPT forecasting (get at https://dashboard.nixtla.io)Python Packages:
pip install nixtla pandas requests matplotlib
Script Files: All Python scripts are located in {baseDir}/scripts/:
fetch_contract.py - Fetches contract data from Polymarket APItransform_data.py - Transforms data to Nixtla format (unique_id, ds, y)forecast_contract.py - Generates TimeGPT forecasts with confidence intervalsanalyze_polymarket.py - Complete end-to-end analysis pipelineThe agent should follow this workflow when analyzing Polymarket contracts:
Check that the TimeGPT API key is configured:
echo $NIXTLA_TIMEGPT_API_KEY
If not set, instruct the user to export their API key.
Use the fetch script to retrieve contract metadata and historical prices:
python {baseDir}/scripts/fetch_contract.py <condition_id> --days 30
This creates contract_{id}_data.json with the contract question, description, volume, liquidity, and hourly price history.
Convert raw Polymarket data to Nixtla format (unique_id, ds, y columns):
python {baseDir}/scripts/transform_data.py contract_{id}_data.json
Output: contract_{id}_nixtla.csv ready for forecasting. The script validates data quality and warns about insufficient data points.
Run TimeGPT forecasting with specified horizon and frequency:
python {baseDir}/scripts/forecast_contract.py contract_{id}_nixtla.csv \
--horizon 48 \
--freq H \
--output forecast_results
Generates:
forecast_results_forecast.csv - Predicted prices with confidence intervals (80%, 90%, 95%)forecast_results_plot.png - Visualization of historical vs forecastforecast_results_metadata.json - Analysis with trend, signal, and metadataFor end-to-end analysis in one command:
python {baseDir}/scripts/analyze_polymarket.py <condition_id> \
--horizon 48 \
--days 30 \
--output-dir ./results
This runs all steps automatically and produces complete analysis outputs.
The agent should interpret forecast results as follows:
Trend Classification:
Confidence Intervals: 95% CI shows the range where the true price is likely to fall. Wide intervals indicate higher uncertainty.
Risk Factors: Consider market liquidity, trading volume, time until contract resolution, and external events that may affect outcomes.
The agent generates these artifacts:
polymarket_{id}_historical.csv) - Nixtla-formatted time seriespolymarket_{id}_forecast.csv) - Predictions with confidence intervalspolymarket_{id}_plot.png) - Chart showing historical prices, forecast, and confidence bandspolymarket_{id}_analysis.json) - Complete metadata including:
Error: Invalid contract ID
Error: NIXTLA_TIMEGPT_API_KEY not set
export NIXTLA_TIMEGPT_API_KEY='your-key-here'Error: Insufficient data
--days parameter or wait for more trading history. Minimum 10-20 data points recommended.Error: API rate limit exceeded
Error: Connection timeout
User Request: "Analyze the 2024 election contract 0x1234abcd with 48-hour forecast"
Agent Actions:
python {baseDir}/scripts/analyze_polymarket.py 0x1234abcd --horizon 48 --days 60
Expected Output:
Contract: "Will candidate X win the 2024 election?"
Current Price: $0.4500
Forecast Price: $0.5200
Expected Change: +15.56%
Signal: BUY (BULLISH)
95% CI: [0.4800, 0.5600]
Interpretation: The model predicts a 15.56% increase in the "yes" price, suggesting growing confidence in the outcome. The tight confidence interval indicates reasonable certainty.
User Request: "What's the forecast for the ETH price contract?"
Agent Actions:
python {baseDir}/scripts/analyze_polymarket.py 0xdef456 --horizon 24 --days 14
Expected Output:
Contract: "Will ETH be above $3000 on Dec 31?"
Current Price: $0.6800
Forecast Price: $0.6500
Expected Change: -4.41%
Signal: HOLD (NEUTRAL)
95% CI: [0.6000, 0.7000]
Interpretation: The model predicts a slight decrease, but within the neutral range. Wide confidence interval suggests uncertainty. No strong trading signal.
Risk Disclaimer: Forecasts are probabilistic estimates, not guarantees. Past performance does not indicate future results. This is not financial advice. Always verify data before making trading decisions.
tools
This skill enables Claude to create and execute load tests for performance validation. It is designed to generate load test scripts using tools like k6, JMeter, and Artillery, based on specified test scenarios. Use this skill when the user requests to create a "load test", conduct "performance testing", validate "application performance", or needs a "stress test" to identify breaking points in the application. The skill helps define performance thresholds and provides execution instructions.
testing
This skill enables Claude to collect comprehensive infrastructure performance metrics across compute, storage, network, containers, load balancers, and databases. It is triggered when the user requests "collect infrastructure metrics", "monitor server performance", "set up performance dashboards", or needs to analyze system resource utilization. The skill configures metrics collection, sets up aggregation, and helps create infrastructure dashboards for health monitoring and capacity tracking. It supports configuration for Prometheus, Datadog, and CloudWatch.
tools
This skill enables Claude to monitor and analyze application error rates to improve reliability. It is used when the user needs to track and understand errors occurring in their application, including HTTP errors, application exceptions, database errors, external API errors, background job errors, and client-side errors. Use this skill when the user asks to "monitor errors", "analyze error rates", "track application errors", or requests help with "error monitoring". It sets up comprehensive error tracking and alerting based on defined thresholds.
development
This skill automates the setup of distributed tracing for microservices. It helps developers implement end-to-end request visibility by configuring context propagation, span creation, trace collection, and analysis. Use this skill when the user requests to set up distributed tracing, implement observability, or troubleshoot performance issues in a microservices architecture. The skill is triggered by phrases such as "setup tracing", "implement distributed tracing", "configure opentelemetry", or "add observability to microservices".