Xspoonai official logfile alerts

From jiayaoqijia/cryptoskill · View interactive version

Xspoonai official logfile alerts is an AI agent skill from the GitHub repository jiayaoqijia/cryptoskill. Scan log files for patterns and emit structured alerts. Identifies errors, warnings, and anomalies with configurable alert thresholds.

How to use this skill

Skill file

Description

Scan log files for patterns and emit structured alerts. Identifies errors, warnings, and anomalies with configurable alert thresholds.

Inputs

{
  "log_file": "Path to log file",
  "patterns": ["ERROR", "WARNING"],
  "threshold": "Number of occurrences"
}

Outputs

{
  "ok": true,
  "data": {
    "alerts": [],
    "total_matches": 0
  }
}

Usage

Demo Mode

python scripts/main.py --demo

Scan Logs

echo '{"log_file":"/var/log/app.log","patterns":["ERROR"]}' | python3 scripts/main.py

Examples

Example 1: Log Analysis

$ echo '{"log_file":"app.log","patterns":["ERROR"],"threshold":5}' | python3 scripts/main.py
{
  "ok": true,
  "data": {
    "alerts": ["5 ERROR entries found"],
    "total_matches": 5
  }
}

Error Handling

When an error occurs, the skill returns:

{
  "ok": false,
  "error": "Error description",
  "details": {
    "log_file": "File not found"
  }
}
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.