writing-sigma-rules

writing-sigma-rules is a skill for Claude Code, Codex from EvilFreelancer/secs. It costs 83 tokens per session (3,834 once invoked), scanned A, a copy of writing-sigma-rules, Apache-2.0.

A tool for writing Sigma rules, which are portable descriptions of suspicious activity in log data. It covers detection logic, false-positive filtering, conversion to different security monitoring systems, and offline checks.

In plain words
What is it for?
Use it to turn threat intelligence or incident findings into Sigma rules, tune existing detections, or convert them for systems such as Splunk, Elastic, or Sentinel.
Why use it?
It helps security teams create detections that can be reviewed and adapted across different log-monitoring products.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/evilfreelancer/secs/writing-sigma-rules
Any agent
npx skills add EvilFreelancer/secs --skill writing-sigma-rules
Clone the repo
git clone --depth 1 https://github.com/EvilFreelancer/secs

Made for: Claude Code, Codex.

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/evilfreelancer/secs/writing-sigma-rules.svg)](https://agentmods.dev/skills/evilfreelancer/secs/writing-sigma-rules)
Your own site
<a href="https://agentmods.dev/skills/evilfreelancer/secs/writing-sigma-rules"><img src="https://agentmods.dev/badge/skills/evilfreelancer/secs/writing-sigma-rules.svg" alt="Measured on agentmods" 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. Scan, not verified.
Origin 100% copy Near-identical to another mod 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 5d ago against content hash 8d75c36b1c40, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 5d 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

This is a copy

100% identical to writing-sigma-rules — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/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. 5d 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 EvilFreelancer/secs (10 stars, last pushed 27d ago), licensed Apache-2.0. 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). It is 100% identical to writing-sigma-rules, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

Blue Team Defense & Hardening

System hardening, detection engineering, security baseline monitoring, patch management, defense-in-depth architecture, and security posture improvement.

Masriyan/Claude-Code-CyberSecurity-Skill · 30 tokens

wave-issue-coverage

For each DRAFT requirement in a given Ground Control wave (or all waves), ensure a GitHub issue covers it and is bidirectionally linked. Use when the user asks to "cover wave N requirements with issues", "back-fill issues for draft requirements", or similar. Requires the Ground Control MCP and gh CLI.

Brad-Edwards/aptl · 72 tokens

ship

Ship current branch — CI, SonarCloud, code review, security review, fix all issues, merge. Assumes code is already committed and pushed.

Brad-Edwards/aptl · 33 tokens

create-huntable-agent

Add a new extraction sub-agent to Huntable CTI Studio as a first-class peer of CmdlineExtract, ProcTreeExtract, HuntQueriesExtract, RegistryExtract, ServicesExtract, and ScheduledTasksExtract. Use this skill whenever the user asks to "add a new agent", "create a sub-agent", "wire up a new extractor", "add a new…

dfirtnt/Huntable-CTI-Studio · 129 tokens

codebase-test-trueup

Audit test coverage gaps and generate unit tests to close them. Use when the user says "test trueup", "coverage gaps", "test coverage audit", "fill coverage", "write missing tests", "backfill tests", "scope tests", "test what I changed", or any request to identify and fill test gaps. Three modes: audit (report only)…

dfirtnt/Huntable-CTI-Studio · 96 tokens

cut-release

Interactive walkthrough for cutting a new release of Huntable CTI Studio. Use this skill whenever the user says "cut a release", "ship a release", "tag a version", "bump the version", "new release", "do the release", "release vX.Y.Z", "ship v5.4.0", "time to release", or otherwise signals they want to move code from…

dfirtnt/Huntable-CTI-Studio · 136 tokens