Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generic detection rule creation and management using Sigma, the universal SIEM rule format. Sigma provides vendor-agnostic detection logic for log analysis across multiple SIEM platforms. Use when: (1) Creating detection rules for security monitoring, (2) Converting rules between SIEM platforms (Splunk, Elastic, QRadar, Sentinel), (3) Threat hunting with standardized detection patterns, (4) Building detection-as-code pipelines, (5) Mapping detections to MITRE ATT&CK tactics, (6) Implementing com
.claude/skills/aiskillstore-detection-sigma/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-18 | ✗→✓ | ▲ Improved | 230% | 0% |
| case-02 | ✓→✗ | ▼ Worse | 77% | 0% |
| case-04 | ✓→✗ | ▼ Worse | 167% | 0% |
| case-14 | ✓→✗ | ▼ Worse | 150% | 0% |
| case-16 | ✓→✓ | = Same ✓ | 135% | 0% |
Sigma is to log detection what Snort is to network traffic and YARA is to files - a universal signature format for describing security-relevant log events. This skill helps create, validate, and convert Sigma rules for deployment across multiple SIEM platforms, enabling detection-as-code workflows.
Core capabilities:
bashpip install pysigma pysigma-backend-splunk pysigma-backend-elasticsearch pyyaml
yamltitle: Suspicious PowerShell Execution id: 7d6d30b8-5b91-4b90-a71e-4f5a3f5a3c3f status: experimental description: Detects suspicious PowerShell execution with encoded commands references: - https://attack.mitre.org/techniques/T1059/001/ author: Your Name date: YYYY/MM/DD modified: YYYY/MM/DD tags: - attack.execution - attack.t1059.001 logsource: category: process_creation product: windows detection: selection: Image|endswith: '\powershell.exe' CommandLine|contains: - '-enc' - '-EncodedCommand' - 'FromBase64String' condition: selection falsepositives: - Legitimate administrative scripts level: medium
bash# Convert to Splunk python scripts/sigma_convert.py rule.yml --backend splunk # Convert to Elasticsearch python scripts/sigma_convert.py rule.yml --backend elasticsearch # Convert to Microsoft Sentinel python scripts/sigma_convert.py rule.yml --backend sentinel
Progress: ] 1. Identify detection requirement from threat intelligence or compliance ] 2. Research log sources and field mappings for target environment ] 3. Create Sigma rule using standard template ] 4. Validate rule syntax: python scripts/sigma_validate.py rule.yml ] 5. Test rule against sample logs or historical data ] 6. Convert to target SIEM format ] 7. Deploy and tune based on false positive rate ] 8. Document rule metadata and MITRE ATT&CK mapping
Work through each step systematically. Check off completed items.
For proactive threat hunting based on TTPs:
python scripts/sigma_validate.py hunting-rule.ymlWhen migrating between SIEM platforms:
bash# Validate all rules first python scripts/sigma_validate.py --directory rules/ --report validation-report.json # Convert entire rule set python scripts/sigma_convert.py --directory rules/ --backend splunk --output converted/ # Generate deployment report python scripts/sigma_convert.py --directory rules/ --backend splunk --report conversion-report.md
Review conversion report for:
For implementing compliance monitoring (PCI-DSS, NIST, ISO 27001):
assets/compliance-rules/python scripts/compliance_coverage.py --framework pci-dssyamltitle: Human-readable rule name id: UUID (generate with: python -c "import uuid; print(uuid.uuid4())") status: stable|test|experimental|deprecated description: Detailed description of what this detects author: Your Name date: YYYY/MM/DD modified: YYYY/MM/DD logsource: category: process_creation|network_connection|file_event|... product: windows|linux|macos|azure|aws|... detection: selection: FieldName: value condition: selection level: informational|low|medium|high|critical
yamlreferences: - https://attack.mitre.org/techniques/T1059/ tags: - attack.execution - attack.t1059.001 falsepositives: - Legitimate use cases fields: - CommandLine - User - ParentImage
yaml# Simple selection detection: selection: Field: value condition: selection # Multiple conditions (AND) detection: selection: Field1: value1 Field2: value2 condition: selection # OR conditions detection: selection1: Field: value1 selection2: Field: value2 condition: selection1 or selection2 # NOT conditions detection: selection: Field: suspicious_value filter: Field: legitimate_value condition: selection and not filter # Complex logic detection: selection: EventID: 4688 suspicious_cmd: CommandLine|contains: - 'powershell' - 'cmd.exe' filter_legitimate: ParentImage|endswith: '\explorer.exe' condition: selection and suspicious_cmd and not filter_legitimate
Common modifiers for flexible matching:
|contains - Contains substring (case-insensitive)|endswith - Ends with string|startswith - Starts with string|re - Regular expression match|all - All values must match|base64 - Base64-encoded value matching|base64offset - Base64 with offset variationsExample:
yamldetection: selection: CommandLine|contains|all: - 'powershell' - '-enc' Image|endswith: '\powershell.exe'
scripts/sigma_convert.py - Convert Sigma rules to target SIEM backend formatsscripts/sigma_validate.py - Validate Sigma rule syntax and detect common errorsscripts/compliance_coverage.py - Analyze detection coverage for compliance frameworksscripts/generate_rule_template.py - Generate Sigma rule template with MITRE ATT&CK tagsreferences/mitre-attack-mapping.md - Common MITRE ATT&CK techniques and Sigma detection patternsreferences/log-source-guide.md - Log source categories, products, and field mappingsreferences/compliance-mappings.md - Compliance framework to detection rule mappingsreferences/backend-support.md - Supported SIEM backends and conversion capabilitiesreferences/field-modifiers.md - Comprehensive guide to Sigma field modifiers and regex patternsassets/rule-templates/ - Pre-built Sigma rule templates for common attack patternslateral-movement.yml - Lateral movement detection templateprivilege-escalation.yml - Privilege escalation detection templatepersistence.yml - Persistence mechanism detection templatecredential-access.yml - Credential dumping detection templateassets/compliance-rules/ - Compliance-focused rule templatespci-dss-monitoring.yml - PCI-DSS monitoring requirementsnist-800-53-audit.yml - NIST 800-53 audit logging requirementsiso27001-logging.yml - ISO 27001 logging and monitoringDetect suspicious process creation with command-line analysis:
yamllogsource: category: process_creation product: windows detection: selection: Image|endswith: - '\powershell.exe' - '\cmd.exe' CommandLine|contains: - 'Invoke-' - 'IEX' - 'FromBase64String'
Detect suspicious outbound connections:
yamllogsource: category: network_connection product: windows detection: selection: Initiated: 'true' DestinationPort: - 4444 - 5555 - 8080 filter: DestinationIp|startswith: - '10.' - '172.16.' - '192.168.' condition: selection and not filter
Detect file creation in suspicious locations:
yamllogsource: category: file_event product: windows detection: selection: TargetFilename|contains: - '\Windows\Temp\' - '\AppData\Roaming\' TargetFilename|endswith: - '.exe' - '.dll' - '.ps1'
Build detection-as-code pipelines:
yaml# .github/workflows/sigma-validation.yml name: Sigma Rule Validation on: [push, pull_request] jobs: validate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Validate Sigma Rules run: | pip install pysigma python scripts/sigma_validate.py --directory rules/ - name: Convert to Production Format run: | python scripts/sigma_convert.py --directory rules/ --backend splunk --output converted/
Automated rule deployment:
splunk-sdk for savedsearchesSee references/backend-support.md for deployment examples.
Enrich rules with threat intel:
Solution: Check backend compatibility and field mappings. Some backends have limitations:
references/backend-support.md for known limitationssigma_convert.py --backend <backend> --debug for detailed error outputSolution: Refine detection logic with additional filters:
|endswith vs |contains)Solution: Verify log source availability and field mappings:
sigma_convert.py --show-fields to see mappingTag rules with ATT&CK tactics and techniques:
yamltags: - attack.execution # Tactic - attack.t1059.001 # Technique: PowerShell - attack.defense_evasion # Additional tactic - attack.t1027 # Technique: Obfuscated Files
Common tactic tags:
attack.initial_accessattack.executionattack.persistenceattack.privilege_escalationattack.defense_evasionattack.credential_accessattack.discoveryattack.lateral_movementattack.collectionattack.exfiltrationattack.command_and_controlattack.impactFor detailed technique mappings, see references/mitre-attack-mapping.md.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-16 | pass→pass | 10,240 | 3,005 | -71% | 1 | 1 | 0% | 1,783 | 4,185 | +135% | 0 | 0 | — |
case-05 | pass→pass | 5,221 | 6,304 | +21% | 1 | 1 | 0% | 886 | 4,924 | +456% | 0 | 0 | — |
case-06 | pass→pass | 9,171 | 2,644 | -71% | 1 | 1 | 0% | 1,718 | 4,171 | +143% | 0 | 0 | — |
case-15 | pass→pass | 7,525 | 4,746 | -37% | 1 | 1 | 0% | 1,319 | 4,471 | +239% | 0 | 0 | — |
case-01 | fail→fail | 14,104 | 4,410 | -69% | 1 | 1 | 0% | 2,425 | 4,486 | +85% | 0 | 0 | — |
case-02 | pass→fail | 19,581 | 13,997 | -29% | 1 | 1 | 0% | 3,617 | 6,415 | +77% | 0 | 0 | — |
case-03 | pass→pass | 14,680 | 16,085 | +10% | 1 | 1 | 0% | 2,501 | 6,618 | +165% | 0 | 0 | — |
case-04 | pass→fail | 10,976 | 10,684 | -3% | 1 | 1 | 0% | 2,123 | 5,661 | +167% | 0 | 0 | — |
case-07 | pass→pass | 9,836 | 3,816 | -61% | 1 | 1 | 0% | 2,032 | 4,445 | +119% | 0 | 0 | — |
case-08 | pass→pass | 8,356 | 4,660 | -44% | 1 | 1 | 0% | 1,421 | 4,532 | +219% | 0 | 0 | — |
case-09 | pass→pass | 6,410 | 4,021 | -37% | 1 | 1 | 0% | 1,100 | 4,429 | +303% | 0 | 0 | — |
case-10 | pass→pass | 6,263 | 4,680 | -25% | 1 | 1 | 0% | 1,137 | 4,698 | +313% | 0 | 0 | — |
case-11 | pass→pass | 3,496 | 2,905 | -17% | 1 | 1 | 0% | 562 | 4,212 | +649% | 0 | 0 | — |
case-12 | fail→fail | 6,944 | 4,747 | -32% | 1 | 1 | 0% | 1,279 | 4,589 | +259% | 0 | 0 | — |
case-13 | pass→pass | 3,364 | 4,107 | +22% | 1 | 1 | 0% | 548 | 4,433 | +709% | 0 | 0 | — |
case-14 | pass→fail | 11,506 | 9,025 | -22% | 1 | 1 | 0% | 2,220 | 5,561 | +150% | 0 | 0 | — |
case-17 | pass→pass | 6,068 | 3,961 | -35% | 1 | 1 | 0% | 1,168 | 4,456 | +282% | 0 | 0 | — |
case-18 | fail→pass | 7,845 | 4,583 | -42% | 1 | 1 | 0% | 1,351 | 4,461 | +230% | 0 | 0 | — |
case-19 | pass→pass | 13,199 | 9,811 | -26% | 1 | 1 | 0% | 2,360 | 5,495 | +133% | 0 | 0 | — |
case-20 | pass→pass | 10,754 | 6,100 | -43% | 1 | 1 | 0% | 1,864 | 4,793 | +157% | 0 | 0 | — |
case-21 | pass→pass | 3,624 | 2,162 | -40% | 1 | 1 | 0% | 548 | 4,114 | +651% | 0 | 0 | — |
case-22 | pass→pass | 3,271 | 4,333 | +32% | 1 | 1 | 0% | 549 | 4,424 | +706% | 0 | 0 | — |
case-23 | pass→pass | 3,005 | 2,932 | -2% | 1 | 1 | 0% | 435 | 4,189 | +863% | 0 | 0 | — |
case-24 | pass→pass | 5,460 | 5,111 | -6% | 1 | 1 | 0% | 1,005 | 4,483 | +346% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted. The headline lift of -60 percentage points is the difference between those two pass rates over the 24 comparable cases. 4 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.