detection-as-code

detection-as-code is a skill for Claude Code, Codex from mtarcure/claude-vibe-squad. It costs 69 tokens per session (269 once invoked), scanned A, original, MIT.

A method for writing security detection rules in Sigma, YARA, KQL, or SPL for a specific attacker technique. These rules describe activity that security tools should detect.

In plain words
What is it for?
Use it to define the telemetry fields, create test examples, replay representative history, and prepare a rule for controlled rollout.
Why use it?
It reduces false alarms and missed detections by testing both cases that should trigger and cases that should not.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to define the telemetry fields, create test examples, replay representative history, and prepare a rule for controlled rollout.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mtarcure/claude-vibe-squad/detection-as-code
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.

Any agent
npx skills add mtarcure/claude-vibe-squad --skill detection-as-code
Clone the repo
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad

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 detection-as-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/mtarcure/claude-vibe-squad/detection-as-code/github.svg)](https://agentmods.dev/skills/mtarcure/claude-vibe-squad/detection-as-code)
Your own site
<a href="https://agentmods.dev/skills/mtarcure/claude-vibe-squad/detection-as-code"><img src="https://agentmods.dev/badge/skills/mtarcure/claude-vibe-squad/detection-as-code/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 detection-as-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/mtarcure/claude-vibe-squad/detection-as-code"><img src="https://agentmods.dev/badge/skills/mtarcure/claude-vibe-squad/detection-as-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 269 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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 medium

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 →

  • medium Excessive Agency · line 21
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
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.00069 $0.00269
Opus 5.5 $0.00028 $0.00108
Sonnet 5.5 $0.00014 $0.00054
Haiku 4.5 $0.00007 $0.00027

Measured 1mo ago against content hash 230cfa921d56, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

detection-as-code scanned grade A with 0 findings 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 1mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/detection-as-code/SKILL.md · 22 lines

What it actually says

Detection as Code

Author a SIEM/EDR detection rule as tested, versioned code (Sigma/YARA/KQL/SPL).

Steps

  1. State the target TTP, detection platform, and platform/schema version; confirm the telemetry prerequisites exist.
  2. Write the rule against real field names; keep attacker-TTP modelling strictly in service of detection.
  3. Add positive fixtures (must fire) and negative fixtures (must not over-fire); validate syntax.
  4. Backtest/replay against representative history; record expected FP/FN surface and rule cost/cardinality.
  5. Set rollout mode, owner, version, and rollback; deployment is operator-gated (production_mutation).

Acceptance

  • Positive fixture fires and negative fixture does not; syntax validated.
  • Replay/backtest evidence present, or an explicit unvalidated status.
  • Owner, version, and rollback recorded; no live deploy without approval.
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. 1mo ago First seen · 22 lines · 69 tokens per session scan A 230cfa921d56

Subscribe to this mod's changes

detection-as-code is a skill published in the GitHub repository mtarcure/claude-vibe-squad (165 stars, last pushed 1mo ago), licensed MIT. It adds 69 tokens to every session and 269 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.