Skip to content
Back to skills

Iot Sensor Anomaly Detector

ASecurity

When the user needs to identify abnormal sensor readings by comparing real-time IoT sensor data against predefined operating parameter ranges. This skill queries time-series sensor data from BigQuery, loads parameter ranges from Excel configuration files, performs range validation, and generates anomaly reports in CSV format with timestamp, machine_id, sensor_type, reading, and normal_range fields. Triggers include IoT sensor data analysis, anomaly detection, operating parameter validation, f...

  • 8 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added May 29, 2026
data

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned May 29, 2026

npx -y skills add zjunlp/Skills --skill iot-sensor-anomaly-detector --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Iot Sensor Anomaly Detector?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Iot Sensor Anomaly Detector
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/zjunlp-iot-sensor-anomaly-detector/badge)](https://www.skillsdirectory.com/skills/zjunlp-iot-sensor-anomaly-detector)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: iot-sensor-anomaly-detector
description: When the user needs to identify abnormal sensor readings by comparing real-time IoT sensor data against predefined operating parameter ranges. This skill queries time-series sensor data from BigQuery, loads parameter ranges from Excel configuration files, performs range validation, and generates anomaly reports in CSV format with timestamp, machine_id, sensor_type, reading, and normal_range fields. Triggers include IoT sensor data analysis, anomaly detection, operating parameter validation, factory monitoring, BigQuery sensor queries, Excel configuration file processing, and CSV report generation.
---
# Instructions

## Overview
This skill identifies sensor readings that fall outside predefined normal operating ranges. It queries time-series sensor data from BigQuery, compares readings against parameter ranges defined in an Excel configuration file, and generates a CSV anomaly report.

## Core Workflow

### 1. Initial Setup & Discovery
- **Locate the Excel configuration file**: Search for `machine_operating_parameters.xlsx` in the workspace.
- **Verify BigQuery dataset**: Confirm the `machine_operating` dataset exists.
- **Identify Cloud Storage bucket**: Find the bucket with prefix `iot_anomaly_reports` for report upload.

### 2. Data Acquisition
- **Read parameter ranges**: Load the "Operating Parameters" sheet from the Excel file. Extract `machine_id`, `sensor_type`, `min_value`, and `max_value` columns.
- **Query sensor data**: Execute a BigQuery query to retrieve sensor readings (`timestamp`, `machine_id`, `sensor_type`, `reading`) for the specified time range.

### 3. Data Processing & Anomaly Detection
- **Merge datasets**: Join sensor data with parameter ranges using `machine_id` and `sensor_type` as keys.
- **Identify anomalies**: Flag readings where `reading < min_value` OR `reading > max_value`.
- **Format output**: Create `normal_range` column as "min - max" string.

### 4. Report Generation & Delivery
- **Create CSV report**: Generate `anomaly_report.csv` with columns: `timestamp`, `machine_id`, `sensor_type`, `reading`, `normal_range`.
- **Save locally**: Store the report in the workspace.
- **Upload to Cloud Storage**: Transfer the report to the identified `iot_anomaly_reports` bucket.

### 5. Cleanup
- Remove any temporary files or tables created during processing.

## Key Requirements
- **Timestamp format**: Preserve the exact timestamp format from BigQuery (e.g., `2025-08-19 11:33:59.878906+00`).
- **Error handling**: Gracefully handle missing sheets in Excel, unmatched sensor-parameter pairs, and data type mismatches.
- **Efficiency**: Process potentially large datasets efficiently using appropriate data structures.

## Common Variations
- **Different time ranges**: The skill should adapt to user-specified start/end times.
- **Alternative file locations**: The Excel file may be in different directories.
- **Multiple sensor types**: The skill handles various sensor types defined in the configuration.

## Output
The primary output is `anomaly_report.csv` containing all readings outside normal ranges, sorted by timestamp.

Files in this skill

  • SKILL.md3.1 KB
  • references/bigquery_queries.md112 B
  • references/cloud_storage_operations.md245 B
  • references/excel_structure.md1.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in data →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.