writing-sigma-rules

writing-sigma-rules is a skill for Claude Code from trilwu/secskills. It costs 83 tokens per session (3,834 once invoked), scanned A, original, MIT.

A guide for writing Sigma rules, which are vendor-neutral instructions for spotting suspicious activity in log data. It covers rule structure, conversion to different security monitoring systems, and offline checks.

In plain words
What is it for?
Writing, reviewing, tuning, converting, and validating Sigma rules for systems such as Splunk, Elastic, Sentinel, CrowdStrike, and Chronicle.
Why use it?
It helps turn threat reports and incident findings into precise detections that can be reviewed and reused across monitoring systems. It also helps reduce false alarms and avoid wasting analysts’ time.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is hayabusa csv-timeline -d ./sample_evtx/ -r rules/rule.yml.

Part of the secskills-defense plugin — 22 skills shipped together

Good fit Writing, reviewing, tuning, converting, and validating Sigma rules for systems such as Splunk, Elastic, Sentinel, CrowdStrike, and Chronicle.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/trilwu/secskills
agentmods
npx agentmods add skills/trilwu/secskills/writing-sigma-rules

Made for: Claude Code.

Or install secskills-defense, the plugin that ships this one along with the rest of its 22 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for writing-sigma-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/trilwu/secskills/writing-sigma-rules/github.svg)](https://agentmods.dev/skills/trilwu/secskills/writing-sigma-rules)
Your own site
<a href="https://agentmods.dev/skills/trilwu/secskills/writing-sigma-rules"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/writing-sigma-rules/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for writing-sigma-rules

Your own site · 80×15
<a href="https://agentmods.dev/skills/trilwu/secskills/writing-sigma-rules"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/writing-sigma-rules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,834 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high YARA Match · line 141
    YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
    Fix: Remove the malware payload or compromised file entirely. Investigate how it entered the skill and audit all other artifacts for additional indicators of compromise.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00083 $0.03834
Opus 5 $0.00042 $0.01917
Sonnet 5 $0.00017 $0.00767
Haiku 4.5 $0.00008 $0.00383

Measured 11d ago against content hash 8d75c36b1c40, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

writing-sigma-rules scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -sL "https://defuddle.md/<url>" # scheme in the path is optional
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

secskills-defense/skills/writing-sigma-rules/SKILL.md · 404 lines

How it starts

The opening of the file, as written. The whole thing — 404 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Writing Sigma Rules

Sigma is the common language for detection logic -- write once, convert to any SIEM. The value is portability and reviewability, but only if the rule is precise: a Sigma rule that matches everything is worse than no rule, because it consumes analyst time and trains the team to ignore alerts. The work is specificity without brittleness.

When to Use

  • Translating a TTP, threat intel report, or incident finding into a portable detection rule
  • Writing vendor-agnostic detection logic that converts to multiple SIEM backends
  • Building or maintaining a detection-as-code pipeline centered on Sigma
  • Reviewing or tuning existing Sigma rules for precision and false-positive reduction
  • Converting Sigma rules between backends (Splunk, Elastic, Sentinel, CrowdStrike, Chronicle)
  • Contributing rules upstream to SigmaHQ or maintaining a private rule repository

When NOT to Use

  • Broader detection engineering including YARA, Suricata, and the full detection lifecycle -- use engineering-detections
  • The signature belongs on files or memory, not log telemetry -- use writing-yara-rules
  • Hypothesis-driven threat hunting, not rule writing -- use hunting-threats
  • Active incident response, not rule development -- use responding-to-incidents

Sigma Rule Structure

Every rule is a YAML document with these fields in order:

The specification requires only three fields: title, logsource, and detection (which must contain a condition). Everything else is optional to the spec. Do not confuse that with the SigmaHQ rule repository, which requires far more — id, status, description, author, date, level, and ATT&CK tags — before it will accept a contribution. Write to the stricter SigmaHQ convention by default, because a rule without an id or a level is unmanageable in a real pipeline, but know which constraint you are meeting when a converter accepts a rule your reviewer rejects.

title: Short Descriptive Name              # REQUIRED by spec, max ~100 chars
id: a1b2c3d4-0000-4000-8000-000000000001  # optional to spec; UUIDv4, never reuse
related:                                    # optional, link to predecessor rules
  - id: <uuid>
    type: derived | obsoletes | merged | renamed | similar
status: experimental                        # optional; see lifecycle below
description: >                              # optional to spec, expected by SigmaHQ
  Detects X behaviour consistent with Y technique.
references:                                 # optional, strongly recommended
  - https://attack.mitre.org/techniques/T1059/001/
author: Your Name                           # optional to spec
date: 2026-07-26                            # optional; ISO 8601 YYYY-MM-DD
modified: 2026-07-26                        # optional; same format, on update
tags:                                       # optional to spec, expected by SigmaHQ
  - attack.execution                        #   tactic (lowercase, dotted)
  - attack.t1059.001                        #   technique (lowercase)
logsource:                                  # REQUIRED by spec
  category: process_creation
  product: windows
detection:                                  # REQUIRED by spec
  selection:
    CommandLine|contains: 'some-indicator'
  condition: selection                      # REQUIRED inside detection
falsepositives:                             # optional to spec
  - Legitimate admin scripts using the same flag
level: medium                               # optional; informational|low|medium|high|critical

Read the full file on GitHub · 404 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 404 lines · 83 tokens per session scan A 8d75c36b1c40

Subscribe to this mod's changes

writing-sigma-rules is a skill published in the GitHub repository trilwu/secskills (138 stars, last pushed 6d ago), licensed MIT. It adds 83 tokens to every session and 3,834 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

build-mcp-server

This skill should be used when the user asks to "build an MCP server", "create an MCP", "make an MCP integration", "wrap an API for Claude", "expose tools to Claude", "make an MCP app", or discusses building something with the Model Context Protocol. It is the entry point for MCP server development — it interrogates…

anthropics/claude-plugins-official · 111 tokens

data-manager-api-setup

Guides developers through client library installation and authentication setup steps for the Data Manager API. Use this skill when a user is getting started with the Data Manager API and needs to setup their local environment, install the client library, or setup access to the API. Don't use for implementing audience…

google/skills · 86 tokens

workers-best-practices

Cloudflare Workers best practices for production applications. Use when writing, reviewing, or configuring Workers.

cloudflare/skills · 25 tokens

new

Create a new project to start development quickly.

clacky-ai/openclacky · 10 tokens

skd-edit

A focused editor for 1C data composition schemas, the report definitions that describe queries, fields, filters, totals, and parameters. It changes an existing Template.xml file through specific operations.

Nikolay-Shirokov/cc-1c-skills · 55 tokens

skd-info

A structure reader for 1C data composition schemas, the report definitions that contain queries, fields, parameters, and display variants. It gives a compact summary instead of requiring you to read the raw XML.

Nikolay-Shirokov/cc-1c-skills · 52 tokens