maxwellokumu/okaudit-claude-skills / log-monitoring/anomaly-detector
anomaly-detector
VerifiedCompare recent activity against a historical baseline to identify behavioral anomalies and help Claude explain which users or patterns warrant deeper investigation.
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 1.3 KB |
| SKILL.md | skill md | 1.7 KB |
| main.py | script | 12.6 KB |
| sample_input/baseline_logs.jsonl | other | 102.4 KB |
| sample_input/test_logs.jsonl | other | 17.4 KB |
| skill.yaml | config | 1.0 KB |
README.md
View on GitHub# anomaly-detector
Detect behavioural anomalies by comparing user activity in a test period against
a historical baseline. Uses mean + N×standard deviation thresholds per user. Also
flags new users and new source IPs not seen during the baseline period.
---
## Requirements
```bash
pip install python-dotenv
```
---
## Usage
```bash
# Basic comparison
python main.py \
--logs sample_input/baseline_logs.jsonl \
--test sample_input/test_logs.jsonl
# Higher sensitivity (fewer false positives)
python main.py \
--logs sample_input/baseline_logs.jsonl \
--test sample_input/test_logs.jsonl \
--sensitivity 3.0
# Lower sensitivity (catch more subtle anomalies)
python main.py \
--logs sample_input/baseline_logs.jsonl \
--test sample_input/test_logs.jsonl \
--sensitivity 1.5 \
--min-events 3
```
---
## Log Format
Both files use JSON-lines format:
```json
{"timestamp": "2025-07-01T09:00:00", "user": "alice", "action": "GetObject", "source_ip": "10.0.0.1"}
```
---
## How It Works
1. Reads the baseline log and computes **per-user, per-day** action counts
2. Calculates **mean** and **standard deviation** per user
3. Sets threshold = `mean + (sensitivity × std_dev)`
4. Evaluates each user in the test file against their personal threshold
5. Flags any day where count > threshold, plus new users and new IPs
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |