000-docs/000a-planned-skills/core-forecasting/nixtla-anomaly-detector/SKILL.md
Detects anomalies in time series data using TimeGPT. Identifies outliers, level shifts, and trend breaks without model training. Use when identifying anomalies, outliers, or unusual patterns in time series. Trigger with "detect anomalies", "find outliers", "anomaly detection".
npx skillsauth add intent-solutions-io/plugins-nixtla nixtla-anomaly-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.
Automatically detect and flag anomalies in time series data using TimeGPT.
This skill leverages TimeGPT's anomaly detection capabilities to identify outliers, level shifts, and trend breaks in time series data without requiring model training. It accepts CSV data, runs anomaly detection via the Nixtla API, and produces a detailed report with visualizations.
Required:
nixtla, pandas, matplotlib packagesEnvironment Variables:
NIXTLA_TIMEGPT_API_KEY: Your TimeGPT API keyInstallation:
pip install nixtla pandas matplotlib
Ensure your CSV file has the required Nixtla schema columns:
| Column | Type | Description |
|--------|------|-------------|
| unique_id | string | Series identifier |
| ds | datetime | Timestamp |
| y | numeric | Value to analyze |
export NIXTLA_TIMEGPT_API_KEY=your_api_key_here
Execute the detection script:
python {baseDir}/scripts/detect_anomalies.py --input your_data.csv
Available options:
--input, -i: Input CSV file (required)--output-csv, -o: Anomaly output CSV (default: anomalies.csv)--output-plot, -p: Visualization plot (default: anomalies_plot.png)--output-summary, -s: Summary text file (default: anomaly_summary.txt)The script generates three output files:
Error: NIXTLA_TIMEGPT_API_KEY not set
Solution: Run export NIXTLA_TIMEGPT_API_KEY=your_key
Error: CSV file missing required columns
Solution: Ensure CSV has unique_id, ds, and y columns
Error: No anomalies detected
Solution: This is valid output - data may have no anomalies
Error: Connection error to TimeGPT API
Solution: Check network connection and API key validity
Input (traffic.csv):
unique_id,ds,y
website_1,2024-01-01,1000
website_1,2024-01-02,1050
website_1,2024-01-03,300
website_1,2024-01-04,980
Command:
python {baseDir}/scripts/detect_anomalies.py --input traffic.csv
Output (anomalies.csv):
unique_id,ds,y,anomaly_type
website_1,2024-01-03,300,outlier
Input (sales.csv):
unique_id,ds,y
store_1,2023-12-28,50
store_1,2023-12-29,55
store_1,2023-12-30,60
store_1,2023-12-31,150
store_1,2024-01-01,145
Command:
python {baseDir}/scripts/detect_anomalies.py -i sales.csv -o sales_anomalies.csv
Output: Detects trend break at 2023-12-31
{baseDir}/scripts/detect_anomalies.pytesting
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".