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
npx skills add W4L33Dx/Cyber-Monster --skill detection-as-code-and-testing -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/detection-as-code-and-testing/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/detection-as-code-and-testing/
1Skills CLI (Vercel)
npx skills add W4L33Dx/Cyber-Monster --skill detection-as-code-and-testing -a codex2Manually: put the files in place
.agents/skills/detection-as-code-and-testing/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add W4L33Dx/Cyber-Monster --skill detection-as-code-and-testing -a cursor2Manually: put the files in place
.cursor/skills/detection-as-code-and-testing/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install W4L33Dx/Cyber-Monster blue-team/detection-and-monitoring/detection-as-code-and-testing2Manually: put the files in place
.github/skills/detection-as-code-and-testing/SKILL.md1Skills CLI (Vercel)
npx skills add W4L33Dx/Cyber-Monster --skill detection-as-code-and-testing -a gemini-cli2Platform CLI
gemini skills install https://github.com/W4L33Dx/Cyber-Monster --path blue-team/detection-and-monitoring/detection-as-code-and-testingManually: put the files in place
.devin/skills/detection-as-code-and-testing/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.