Skip to main content
skill CX Codex

detection-as-code-and-testing — Claude Code skill: features and setup

detection-as-code-and-testing is a Claude Code skill for managing detection rules as code and validating them in CI. It comes into play when teams build rule tests and deployment checks.

no license ★ 73 updated 2026-11-15

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add W4L33Dx/Cyber-Monster --skill detection-as-code-and-testing -a claude-code
Open on GitHub

What detection-as-code-and-testing does

The skill lays out a workflow that keeps rule sources in a repository, compiles them for target systems, and tests the resulting queries. Linting, compilation, and event replay are separate checks, so each stage has its own failure signal.

Tests use events that should match and near-misses that should not; rules with numeric thresholds also get a boundary case. Correlation rules need event pairs both inside and outside their time window. If telemetry for fixture fields is missing or not collected, the result is INCONCLUSIVE (Telemetry Gap), not Clean/Benign.

What it helps with

  • keep detection rule sources under version control
  • validate rule compilation in CI
  • catch false positives with near-miss event tests
  • test numeric thresholds and correlation windows
  • trace deployed rules back to their source commit

Example prompts for the agent

  • Set up CI checks for detection rules managed as code.
  • Add matching and near-miss events to test this rule.
  • Test the correlation rule with event pairs inside and outside its time window.

How to install detection-as-code-and-testing

1Skills CLI (Vercel)

npx skills add W4L33Dx/Cyber-Monster --skill detection-as-code-and-testing -a claude-code

2Manually: put the files in place

~/.claude/skills/detection-as-code-and-testing/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/detection-as-code-and-testing/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about detection-as-code-and-testing

How do I install detection-as-code-and-testing in Claude Code?

Run npx skills add W4L33Dx/Cyber-Monster --skill detection-as-code-and-testing -a claude-code. The skill file is at ~/.claude/skills/detection-as-code-and-testing/SKILL.md.

What does detection-as-code-and-testing do?

It describes a workflow for versioning detection rules, validating their compilation, and testing compiled queries against event fixtures. It also covers linking deployed rules to their source commit.

How does detection-as-code-and-testing test correlation rules?

Tests need one event pair within the time window and another outside it. They assert that the first pair fires the rule and the second does not.

Similar skills

All skills for Security →

From the same set61

The whole set →
sqlite-wal-and-browser-artifact-scripting sqlite-wal-and-browser-artifact-scripting is a Claude Code skill that writes Python tools for examining SQLite and browser artifacts. It activates for forensic work on Chromium or Firefox history, cookies, and downloads. CX Codex +1 ★ 73repo stars waf-bypass-and-payload-obfuscation waf-bypass-and-payload-obfuscation is a Claude Code skill that guides firewall evasion and input filter bypassing. Engages when an attack payload triggers a block despite an underlying security flaw. CX Codex +1 ★ 73repo stars soar-playbook-and-webhook-connector-development soar-playbook-and-webhook-connector-development is a Claude Code skill for building SOAR playbooks and Python webhook connectors. It applies to automated SOC response workflows. CX Codex +1 ★ 73repo stars database-forensics database-forensics is a Claude Code skill that inspects database files, transactional logs, and recovers deleted records. Runs during forensic investigations across server and embedded databases. CX Codex +1 ★ 73repo stars dns-and-beacon-analytics-beacon-periodicity dns-and-beacon-analytics-beacon-periodicity is a Claude Code skill that inspects network connection cadences for repetitive C2 callbacks. It measures interval jitter through order statistics. CX Codex +1 ★ 73repo stars sandbox-evasion-in-malware sandbox-evasion-in-malware is a Claude Code skill that spots malware checks used to avoid sandbox analysis. It helps investigate quiet runs, early exits, and environment-dependent behavior. CX Codex +1 ★ 73repo stars purple-team-telemetry-validation-harnesses purple-team-telemetry-validation-harnesses is a Claude Code skill that builds detection validation runners and ATT&CK layers. It executes lab checks and polls SIEM or EDR APIs with correlation IDs. CX Codex +1 ★ 73repo stars windows-evtx-and-powershell-audit-scripting windows-evtx-and-powershell-audit-scripting is a Claude Code skill for building Windows log parsers and audit collectors. It activates for offline .evtx analysis or live event collection with PowerShell. CX Codex +1 ★ 73repo stars

Project sponsors

Companies that keep this analytics open