security-detection-rule-management

security-detection-rule-management is a skill for Claude Code, Codex from aspectrr/deer. It costs 43 tokens per session (952 once invoked), scanned A, original, MIT.

Guidance for creating and maintaining Elastic Security detection rules, which search security data for signs of threats. It covers rules used by SIEM and Endpoint systems and includes work through the Kibana API.

In plain words
What is it for?
Use it to create rules for emerging threats, find noisy rules, investigate false positives, inspect existing rules, and add exceptions in Elastic Security.
Why use it?
It helps security teams investigate noisy alerts, reduce false positives, add exceptions, and improve detection coverage. It provides command-based workflows for finding, inspecting, and tuning rules.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Not installable on its own: it runs a file from its repository that does not travel with it. Clone the repository, or install whatever ships that file. The line is node skills/security/detection-rule-management/scripts/rule-manager.js noisy-rules --days 7 --top 20.

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

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 security-detection-rule-management

README.md
[![agentmods](https://agentmods.dev/badge/skills/aspectrr/deer/security-detection-rule-management.svg)](https://agentmods.dev/skills/aspectrr/deer/security-detection-rule-management)
Your own site
<a href="https://agentmods.dev/skills/aspectrr/deer/security-detection-rule-management"><img src="https://agentmods.dev/badge/skills/aspectrr/deer/security-detection-rule-management.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 952 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00043 $0.00952
Opus 5 $0.00022 $0.00476
Sonnet 5 $0.00009 $0.00190
Haiku 4.5 $0.00004 $0.00095

Measured 6d ago against content hash 3fea4e2c9639, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

security-detection-rule-management 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 6d 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.

deer-cli/internal/skill/defaults/security-detection-rule-management/SKILL.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Detection Rule Management

Create new detection rules for emerging threats and tune existing rules to reduce false positives.

Prerequisites

export ELASTICSEARCH_URL="https://your-cluster.es.cloud.example.com:443"
export ELASTICSEARCH_API_KEY="your-api-key"
export KIBANA_URL="https://your-cluster.kb.cloud.example.com:443"
export KIBANA_API_KEY="your-kibana-api-key"

Workflow: Tune noisy rules

Step 1: Find noisy rules

node skills/security/detection-rule-management/scripts/rule-manager.js noisy-rules --days 7 --top 20
node skills/security/detection-rule-management/scripts/rule-manager.js find --filter "alert.attributes.name:*Suspicious*" --brief
node skills/security/detection-rule-management/scripts/rule-manager.js get --id <rule_uuid>

Step 2: Investigate false positives

node skills/security/alert-triage/scripts/run-query.js "kibana.alert.rule.name:\"<rule_name>\"" --index ".alerts-security.alerts-*" --days 7 --full

Step 3: Tune

Add exception (preferred):

node skills/security/detection-rule-management/scripts/rule-manager.js add-exception \
  --rule-uuid <rule_uuid> \
  --entries "process.executable:is:C:\\Program Files\\SCCM\\CcmExec.exe" \
  --name "Exclude SCCM" --comment "FP: SCCM deployment" --yes

Patch query/threshold/severity:

node skills/security/detection-rule-management/scripts/rule-manager.js patch --id <rule_uuid> --query "..." --yes
node skills/security/detection-rule-management/scripts/rule-manager.js patch --id <rule_uuid> --max-signals 50 --yes
node skills/security/detection-rule-management/scripts/rule-manager.js disable --id <rule_uuid> --yes

Workflow: Create new rule

Step 1: Define threat and data sources

Specify MITRE ATT&CK technique(s), required data sources, and malicious vs legitimate behavior.

Step 2: Test the query

node skills/security/alert-triage/scripts/run-query.js "process.name:certutil.exe" --index "logs-endpoint.events.process-*" --days 30

Read the full file on GitHub · 111 lines

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. 6d ago First seen · 111 lines · 43 tokens per session scan A 3fea4e2c9639

Subscribe to this mod's changes

security-detection-rule-management is a skill published in the GitHub repository aspectrr/deer (404 stars, last pushed 4mo ago), licensed MIT. It adds 43 tokens to every session and 952 once invoked, about $0.0002 per session on Opus 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.