security-detection-rule-management
Create, tune, and manage Elastic Security detection rules (SIEM and Endpoint).
Skill by elasticOfficial
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/elastic-security-detection-rule-management
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, testing, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Node.js package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/security-detection-rule-management
What's inside
- Skill name
security-detection-rule-management- Description
- Create, tune, and manage Elastic Security detection rules (SIEM and Endpoint). Use for false positives, exceptions, new coverage, noisy rules, or rule management via Kibana API.
- License
- Apache-2.0
- Compatibility
- Requires Node.js 22+, network access to Kibana and Elasticsearch. Environment variables: KIBANA_URL plus KIBANA_API_KEY or KIBANA_USERNAME/KIBANA_PASSWORD; ELASTICSEARCH_URL or ELASTICSEARCH_CLOUD_ID plus ELASTICSEARCH_API_KEY or ELASTICSEARCH_USERNAME/ELASTICSEARCH_PASSWORD.
- Metadata
- author: elastic · version: 0.1.0
- Instructions
- 273 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Agent Skills spec issues
- name: "security-detection-rule-management" does not match folder "detection-rule-management"
Files (11)
- SKILL.md
- detection-api-reference.md · references/
- endpoint-behavior-tuning-workflow.md · references/
- endpoint-exceptions-guide.md · references/
- endpoint-rule-exclusion-best-practices.md · references/
- add-endpoint-exception.js · scripts/
- check-exclusion-best-practices.js · scripts/
- es-client.js · scripts/
- fetch-endpoint-rule-from-github.js · scripts/
- kibana-client.js · scripts/
- rule-manager.js · scripts/
SKILL.md (first lines)
# Detection Rule Management Create new detection rules for emerging threats and coverage gaps, and tune existing rules to reduce false positives. All operations use the Kibana Detection Engine API via `rule-manager.js`. ## Execution rules - Start executing tools immediately — do not read SKILL.md, browse the workspace, or list files first. - Report tool output faithfully. Copy rule IDs, names, alert counts, exception IDs, and error messages exactly as returned by the API. Do not abbreviate rule UUIDs, invent rule names, or round alert counts. - When a tool returns an error (rule not found, API failure), report the exact error — do not guess at alternatives. ## Prerequisites Install dependencies before first use from the `skills/security` directory: ```bash cd skills/security && npm install ``` Set the required environment variables (or add them to a `.env` file in the workspace root): ```bash 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" ``` ## Common multi-step workflows | Task | Tools to call (in order) | | ----------------------------------- | ------------------------------------------------------------------------------------------------------- | | **Tune noisy SIEM rule** | `rule_manager` find/noisy-rules → `run_query` (investigate FPs) → `rule_manager` patch or add-exception | | **Add endpoint behavior exception** | `fetch_endpoint_rule` (get rule definition from GitHub) → `add_endpoint_exception` (scoped to rule.id) | | **Create new detection rule** | `run_query` (test query against data) → `rule_manager` create | | **Investigate rule alert volume** | `rule_manager` get → `run_query` (query alerts index) | For endpoint behavior rules, always fetch the rule definition first to understand query logic and existing exclusions before adding an exception. For SIEM rules, always investigate alert patterns with `run_query` before tuning. **Critical:** For endpoint behavior rules, always use `fetch_endpoint_rule` (not `shell` or direct script calls) to get the rule definition, then use `add_endpoint_exception` to add the exception. These are dedicated tools — do not invoke the underlying scripts manually. ## Workflow: Tune a rule for false positives ### Steps 1–2: Identify noisy rules and analyze false positives Find noisy rules with `noisy-rules` or `find`, then get the rule definition and investigate alerts: ```bash 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> node skills/security/alert-triage/scripts/run-query.js "kibana.alert.rule.name:\"<rule_name>\"" --index ".alerts-security.alerts-*" --days 7 --full ``` Look for patterns: same process/user/host → exception candidate; broad pattern → tighten query; legitimate software → exception; too broad → rewrite or adjust threshold. ### Step 3: Choose a tuning strategy **In order of preference:** 1. **Add exception** — Best for specific known-good processes, users, or hosts. Does not modify the rule query. Use when the rule is correct in general but fires on known-legitimate activity. 2. **Tighten the query** — Patch the rule's query to exclude the FP pattern. Best when the false positives stem from the query being too broad. 3. **Adjust threshold / alert suppression** — For threshold rules, increase the threshold value. For any rule type, enable alert suppression to reduce duplicate alerts on the same entity. 4. **Reduce risk score / severity** — Downgrade the rule's priority if it generates many low-value alerts but still has some detection value. 5. **Disable the rule** — Last resort. Only if the rule provides no value or is completely redundant with another rule. ### Steps 4–5: Apply tuning, verify, and document **Add exception** (single/multi-condition, wildcard via `matches`): ```bash 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" "process.parent.name:is:CcmExec.exe" \ --name "Exclude SCCM" --comment "FP: SCCM deployment" --tags "tuning:fp" "source:soc" --yes ``` **Patch query, threshold, severity, or disable:** ```bash node skills/security/detection-rule-management/scripts/rule-manager.js patch --id <rule_uuid> --query "process.name:powershell.exe AND NOT process.parent.name:CcmExec.exe" --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 patch --id <rule_uuid> --severity low --risk-score 21 --yes node skills/security/detection-rule-management/scripts/rule-manager.js disable --id <rule_uuid> --yes ``` Write operations (`patch`, `enable`, `disable`, `delete`, `add-exception`, `bulk-action`) prompt for confirmation by default. Pass `--yes` to skip the prompt (required when called by an agent). Verify with `rule-manager.js get --id <rule_uuid>`. Update triage cases via the `case-management` skill. --- ## Workflow: Create new detection rule ### Steps 1–2: Define the threat, data sources, and fields Specify MITRE ATT&CK technique(s), required data sources (Endpoint, Network, Cloud), and malicious vs legitimate behavior. Common indexes: `logs-endpoint.events.process-*`, `logs-endpoint.events.network-*`, `.alerts-security.alerts-*`, `logs-windows.*`, `logs-aws.*`. Key fields: `process.name`, `process.command_line`, `process.parent.name`, `destination.ip`, `winlog.event_id`, `event.action`. Verify data with `run-query.js`: ```bash node skills/security/alert-triage/scripts/run-query.js "process.name:certutil.exe" --index "logs-endpoint.events.process-*" --days 30 --size 5 ```
From elastic/agent-skills, Apache-2.0.
More from elastic/agent-skills
- 0.762score
elasticsearch-anomaly-detection
elasticOfficial
Create and manage Elastic ML anomaly detection jobs via the API.
SkillBFreshness: B★ 600Claude Code +9 - 0.762score
elasticsearch-anomaly-detection-explainer
elasticOfficial
Explain Elasticsearch ML anomaly detection scores, model behavior, and result interpretation.
SkillBFreshness: B★ 600Claude Code +9 - 0.762score
elasticsearch-esql
elasticOfficial
Execute ES|QL (Elasticsearch Query Language) queries, use when the user wants to query Elasticsearch data, analyze logs, aggregate metrics, explore data, or…
SkillBFreshness: B★ 600Claude Code +9 - 0.762score
elasticsearch-index-design
elasticOfficial
Design and review Elasticsearch index mappings for stated access patterns: correct field types, text+keyword multi-fields, doc_values tuning…
SkillBFreshness: B★ 600Claude Code +9 - 0.762score
elasticsearch-ingest
elasticOfficial
Load CSV and JSON files into Elasticsearch indices using the bulk API and explicit mappings when field types matter.
SkillBFreshness: B★ 600Claude Code +9 - 0.762score
elasticsearch-onboarding
elasticOfficial
Help developers new to Elasticsearch get from zero to a working search experience.
SkillBFreshness: B★ 600Claude Code +9 - 0.762score
elasticsearch-query-optimization
elasticOfficial
Diagnose slow Elasticsearch Query DSL searches and propose measured fixes.
SkillBFreshness: B★ 600Claude Code +9 - 0.762score
elasticsearch-reindex
elasticOfficial
Guide Elasticsearch reindex for performance: local and remote, slicing, throttling, task API.
SkillBFreshness: B★ 600Claude Code +9 - 0.762score
elasticsearch-search-relevance
elasticOfficial
Improve Elasticsearch search relevance for content and catalog indices: pin or promote results with query rules (correct rule type, criteria, and rule-query…
SkillBFreshness: B★ 600Claude Code +9 - 0.762score
kibana-agent-builder
elasticOfficial
Create and manage Kibana Agent Builder agents and custom tools.
SkillBFreshness: B★ 600Claude Code +9 - 0.762score
kibana-alerting-rules
elasticOfficial
Create and manage Kibana alerting rules.
SkillBFreshness: B★ 600Claude Code +9 - 0.762score
kibana-anomaly-detection
elasticOfficial
Elastic ML anomaly detection — investigation/RCA, score explanation, job lifecycle troubleshooting, and job operations.
SkillBFreshness: B★ 600Claude Code +9
Signals
- Stars
- 600
- Forks
- 55
- Open issues
- 4
- Last commit (this folder)
- Apr 24, 2026 (6 months ago)
- Last release
- Sep 4, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 0.1.0
- License
- Apache-2.0
- Repository
- github.com/elastic/agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from elastic
- 0.762score
elasticsearch-anomaly-detection
elasticOfficial
Create and manage Elastic ML anomaly detection jobs via the API.
SkillBFreshness: B★ 600Claude Code +9 - 0.762score
elasticsearch-anomaly-detection-explainer
elasticOfficial
Explain Elasticsearch ML anomaly detection scores, model behavior, and result interpretation.
SkillBFreshness: B★ 600Claude Code +9 - 0.762score
elasticsearch-esql
elasticOfficial
Execute ES|QL (Elasticsearch Query Language) queries, use when the user wants to query Elasticsearch data, analyze logs, aggregate metrics, explore data, or…
SkillBFreshness: B★ 600Claude Code +9 - 0.762score
elasticsearch-index-design
elasticOfficial
Design and review Elasticsearch index mappings for stated access patterns: correct field types, text+keyword multi-fields, doc_values tuning…
SkillBFreshness: B★ 600Claude Code +9 - 0.762score
elasticsearch-ingest
elasticOfficial
Load CSV and JSON files into Elasticsearch indices using the bulk API and explicit mappings when field types matter.
SkillBFreshness: B★ 600Claude Code +9 - 0.762score
elasticsearch-onboarding
elasticOfficial
Help developers new to Elasticsearch get from zero to a working search experience.
SkillBFreshness: B★ 600Claude Code +9
Cite this page
security-detection-rule-management skill. Agent Mart. https://agentmart.dev/skills/elastic-security-detection-rule-management (last updated 2026-10-24)