theaisingularity/hermesclaw/anomaly-detection
Claude Code and agent skill by theaisingularity/hermesclaw
- community
Checking that the SKILL.md file is still in the repository.
Daily database anomaly detection — runs metric queries against Postgres, flags deviations > 2σ from the 7-day baseline, and sends a summary to Slack or Telegram
Install
npx vskill@latest install theaisingularity/hermesclaw/anomaly-detectionSKILL.md
anomaly-detection
This skill runs daily metric queries against your Postgres database, detects statistical anomalies, and delivers a structured report to your alert channel.
When to invoke
- Daily on a cron schedule (recommended: 7am before business hours)
- When the user asks "any anomalies today?" or "how are our metrics?"
- After a deploy, incident, or data pipeline change
Steps to execute
- Load metric configuration from memory
- Read MEMORY.md for: metric names, SQL queries, alert thresholds (if custom), alert channel (Slack/Telegram)
- If no metrics are configured, ask the user to provide their key metric queries
- Run current-period queries
- Execute each metric SQL query via the Postgres MCP server
- Record: metric name, current value, query timestamp
- Run baseline queries
- For each metric, run the same query for each of the past 7 days
- Build a 7-day array:
[d-7, d-6, d-5, d-4, d-3, d-2, d-1]
- Compute statistics using the detect.py helper
- Pass results to
scripts/detect.pyvia stdin as JSON:
``json {"metric": "daily_revenue", "current": 24150, "baseline": [24800, 23900, 25100, 24200, 23800, 24900, 24100]} ``
- The script returns:
``json {"metric": "daily_revenue", "mean": 24400, "std": 422, "z_score": -0.59, "is_anomaly": false} ``
- An anomaly is flagged when
|z_score| > 2.0
- Build the report
- Summary line: "All metrics normal" or "X anomalies detected"
- For each metric: current value, 7-day avg, % change, anomaly flag
- For anomalies: include possible causes from the user's mental model (stored in MEMORY.md)
- Deliver the report
- Send to the configured alert channel (Slack or Telegram)
- For anomalies: send an immediate separate alert with higher urgency
- Update memory
- Record today's values in MEMORY.md under the metric history
- Note any anomalies and whether they were followed by a user explanation
Example output
For anomalies:
Error handling
- If Postgres MCP is unavailable: report the connection error and skip the run
- If a query fails: skip that metric, continue with others, note the failure in the report
- If the alert channel is unavailable: save report to
/sandbox/anomaly-report-[date].json
Notes
- Use a read-only database role for the connection string (see guide for SQL setup)
- The
scripts/detect.pyhelper handles all statistical computation — no external libraries needed in the LLM - After 30+ daily runs, Hermes will auto-create an optimized version of this skill calibrated to your metrics
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/anomaly-detection/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/theaisingularity/hermesclaw/anomaly-detection)