meltedinhex/analyst-ai-pack / skills/operationalizing-a-hunt-into-a-detection
operationalizing-a-hunt-into-a-detection
VerifiedConverts a successful threat hunt into a durable detection by extracting the discriminating logic, defining data sources and thresholds, and emitting a Sigma rule plus a test and tuning plan. Activates for requests to operationalize a hunt, turn a finding into a detection rule, or productionize hunt logic as a Sigma detection.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 340 B |
| SKILL.md | skill md | 2.8 KB |
| references/api-reference.md | markdown | 1.3 KB |
| scripts/analyst.py | script | 2.7 KB |
references/api-reference.md
View on GitHub# API Reference: Operationalizing a Hunt Into a Detection
## Overview
`scripts/analyst.py` generates a Sigma rule from a detection spec describing the logsource,
selection, optional filter, condition, level, and ATT&CK tags. It generates text only and executes
nothing.
## Dependencies
| Package | Version | Purpose |
|---------|---------|---------|
| (stdlib) | — | JSON, file IO |
## Spec format
```json
{
"title": "Suspicious certutil download",
"logsource": {"category": "process_creation", "product": "windows"},
"selection": {"Image|endswith": "\\certutil.exe", "CommandLine|contains": ["-urlcache", "http"]},
"filter": {"CommandLine|contains": "internal-mirror"},
"condition": "selection and not filter",
"level": "high",
"attack": ["T1218", "T1105"]
}
```
## Core functions
### `generate(spec, out)`
Writes a Sigma YAML rule with title/status/logsource/detection/condition/falsepositives/level/tags.
## Usage
```bash
python scripts/analyst.py generate --spec detection.json --out rule.yml
```
## Sources
- Sigma rule specification — https://github.com/SigmaHQ/sigma-specification
- MITRE ATT&CK threat-hunting resources (hunt→detect loop) — https://attack.mitre.org/resources/
- Sigma logsource/detection/condition structure from the official specification
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |