agent-runtime-validati…
Plans and evaluates bounded runtime tests of AI agents, tools, memory, hooks, approvals, and scope enforcement. Use when static…
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
Claude Code
$ npx -y skills add zero-lab-ai/skills --skill detection-engineering --agent claude-code
Codex
$ npx skills add zero-lab-ai/skills --skill detection-engineering -a codex -y
Cursor
$ npx skills add zero-lab-ai/skills --skill detection-engineering -a cursor -y
Gemini CLI
$ npx skills add zero-lab-ai/skills --skill detection-engineering -a gemini-cli -y
GitHub Copilot
$ npx skills add zero-lab-ai/skills --skill detection-engineering -a github-copilot -y
OpenCode
$ npx skills add zero-lab-ai/skills --skill detection-engineering -a opencode -y
Windsurf
$ npx skills add zero-lab-ai/skills --skill detection-engineering -a windsurf -y
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
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:**
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.
uv run {baseDir}/scripts/check_detection.py record.jsonTakes 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`.
| 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`.
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.
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.
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.
| 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 |
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.
Plans and evaluates bounded runtime tests of AI agents, tools, memory, hooks, approvals, and scope enforcement. Use when static…
Reviews an MCP server's tool surface for tool poisoning, over-broad parameters, missing descriptions, and privilege escalation…
Maps identity, authority, instruction, data, memory, and approval propagation across agents and agent-to-agent handoffs. Use when…
Assesses whether direct, indirect, multi-turn, retrieved, or tool-mediated instructions can override an AI system's intended…
Maps cloud identity and authorization paths across AWS, Azure, GCP, and hybrid trust boundaries, separating proven access from…
Tracks embedded-device and firmware assessment coverage across exact units, acquisition methods, debug interfaces, stored…
Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication,…
Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys)…
Clean and finalize authorized natural-language text intended for readers by auditing suspicious invisible Unicode and rewriting…