meltedinhex/analyst-ai-pack / skills/writing-sigma-detection-rules
writing-sigma-detection-rules
VerifiedConverts hunt findings into portable Sigma detection rules: choosing the right logsource, expressing robust selection/filter logic, setting level and ATT&CK tags, and validating before converting to a SIEM query. Activates for requests to write a Sigma rule, convert a hunt to a detection, or create portable SIEM detection logic.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 340 B |
| SKILL.md | skill md | 3.1 KB |
| references/api-reference.md | markdown | 1.2 KB |
| scripts/analyst.py | script | 2.0 KB |
references/api-reference.md
View on GitHub# API Reference: Writing Sigma Detection Rules
## Overview
`scripts/analyst.py` emits a Sigma YAML rule skeleton with a pinned logsource, selection/filter
pattern, ATT&CK tag, level, and falsepositives list. It emits text only; use sigma-cli to
validate and convert.
## Dependencies
| Package | Version | Purpose |
|---------|---------|---------|
| (stdlib) | — | text generation |
## External tools
| Tool | Purpose |
|------|---------|
| sigma-cli (pysigma) | Validate (`sigma check`) and convert (`sigma convert`) rules |
## Core functions
### `scaffold(title, category, technique, level, author)`
Returns a Sigma rule skeleton with selection, negated filter, tags, and falsepositives.
## Usage
```bash
python scripts/analyst.py scaffold --title "Encoded PowerShell" --category process_creation \
--technique T1059.001 --level high
sigma convert -t splunk rules/encoded_powershell.yml
```
## Sources
- Sigma specification — https://github.com/SigmaHQ/sigma-specification
- Sigma rules repository (logsource taxonomy, rule structure) — https://github.com/SigmaHQ/sigma
- Selection + negated-filter pattern for low false positives, established detection-engineering
practice
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 |