Skip to content
Security
Skill

/detection-engineering

Builds detection rules that are proven before they ship — fire on known-bad, stay silent on known-good — and keeps false positives from blinding the SOC. Use when writing a Sigma/Suricata/YARA rule, reviewing a detection before deployment, triaging alert fatigue, or deciding

From plugin
skills
15257 skills

Claude Code

$ npx -y skills add zero-lab-ai/skills --skill detection-engineering --agent claude-code

SKILL.md

detection-engineering.SKILL.md
name: detection-engineering
description: "Builds detection rules that are proven before they ship — fire on known-bad, stay silent on known-good — and keeps false positives from blinding the SOC. Use when writing a Sigma/Suricata/YARA rule, reviewing a detection before deployment, triaging alert fatigue, or deciding whether a rule has earned production."
allowed-tools: Read Grep Glob Bash

Detection engineering

A detection rule is a claim: *this pattern means an attack*. The claim is worth nothing until it has been tested both ways.

**Every rule must pass two tests, and neither substitutes for the other:**

  • **Fires on known-bad** — it actually triggered on a true-positive sample.
  • **Silent on known-good** — it did *not* trigger on a benign sample.

A rule tested only against the attack is unproven against false positives. A rule never tested against the attack is unproven, period. If you cannot show both for a rule in production, you have a rule collection, not a detection programme.

When to Use

  • Writing a Sigma/Suricata/YARA rule, reviewing a detection before deployment, triaging alert fatigue, or deciding whether a rule has earned production.
  • Use only within explicit authorization and the stated rules of engagement.

When NOT to Use

  • Do not treat this skill as permission to access, test, or change a target.
  • Do not convert missing evidence into a clean result or a stronger claim.

Prove it before it ships

uv run {baseDir}/scripts/check_detection.py record.json

Takes a test record per rule and fails any rule missing either proof, firing on known-good, over the false-positive ceiling, or unmapped to an ATT&CK technique. Exit `0` only when every rule is proven both ways; `1` on any unproven rule; `2` on empty input. See `references/test-record.md`.

Production decision

| Known-bad result | Known-good result | Disposition | | --- | --- | --- | | Fires | Silent | Eligible for controlled rollout | | Fires | Fires | Rewrite or narrowly tune; false-positive proof failed | | Silent | Silent | Do not ship; the rule did not detect the behavior | | Missing | Any result | Unproven; collect the missing test evidence | | Fires | Silent, but provenance or mapping missing | Hold until the rule can support a defensible coverage claim |

Record the decision per rule. A passing rule does not prove that the production pipeline will deliver or alert on it; live validation belongs to `detection-validate`.

False positives are the silent killer

Analysts go alert-blind within weeks when most of what fires is garbage — then the real alert gets the same shrug. Manage it in this order:

1. **Baseline first.** Run a new rule in detection-only mode for ~2 weeks. Count the fires, investigate a sample, learn what normal looks like. 2. **Exception lists, not rule disablement.** If a rule is noisy on one service account, exclude that account — do not switch the rule off for everyone. 3. **Track the rate.** Above ~90% false positives the logic is wrong, not the exceptions. Rewrite it; do not tune it.

Every rule carries its provenance

For each rule you should be able to answer: where did the idea come from, what threat it addresses, what log source powers it, when it was last tested, and its false-positive rate. A rule whose last test date is unknown is an unproven rule regardless of how long it has been deployed — time in production is not evidence.

Keep detections in version control

Rules in Git, tests beside them, CI that validates syntax and runs each rule against sample known-bad and known-good log data before it compiles to your SIEM format. A detection pipeline without a test step ships unproven rules by construction.

Rationalizations to reject

| Rationalization | Why it fails | |---|---| | “The attack sample fired, so the rule can ship.” | It remains unproven against false positives; the SOC goes blind | | “It has been in production for a year, so it works.” | Time deployed is not a test. If the last-tested date is unknown, the rule is unproven | | “The rule is noisy, so disable it.” | Disabling it loses the true positives with the false ones; use a bounded exception instead | | “We can tune around a 95% false-positive rate.” | The logic is wrong, not the thresholds — rewrite it | | “ATT&CK mapping is optional documentation.” | Without the mapping, the rule cannot support a defensible coverage claim |

References

  • [Test record format](references/test-record.md) — the JSON the checker consumes, and what each field proves
Read more
@zero-lab-ai
Ships withskills

Portable, evidence-bound security skills for authorized defensive assessment, penetration testing, red teaming, detection engineering, purple teaming, and engagement operations. The collection contains 56 skills in 10 installable plugins from zero-lab.ai.

Stars on GitHub

Momentum

stars in total
152
Star history of zero-lab-ai/skills on GitHub, a chart by star-history.com

Other skills on skills.

agent-runtime-validation

agent-runtime-validati…

Plans and evaluates bounded runtime tests of AI agents, tools, memory, hooks, approvals, and scope enforcement. Use when static…

@zero-lab-ai@zero-lab-aiInstall Skill
agent-surface-audit

agent-surface-audit

Reviews an MCP server's tool surface for tool poisoning, over-broad parameters, missing descriptions, and privilege escalation…

@zero-lab-ai@zero-lab-aiInstall Skill
cloud-attack-path

cloud-attack-path

Maps cloud identity and authorization paths across AWS, Azure, GCP, and hybrid trust boundaries, separating proven access from…

@zero-lab-ai@zero-lab-aiInstall Skill

More skills from other plugins.

api-security

api-security

Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication,…

@zhaoxuya520@zhaoxuya520Install Skill
nemoclaw-user-guide

nemoclaw-user-guide

Find official NemoClaw documentation for installation, configuration, operation, or troubleshooting. Also handles requested docs…

@nvidia@nvidiaInstall Skill

Questions about detection-engineering.

Which coding agents can use detection-engineering?
detection-engineering installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.