create-alert-rule

create-alert-rule is a skill for Claude Code, Codex from ccfos/nightingale. It costs 197 tokens per session (6,924 once invoked), scanned A, original, Apache-2.0.

A helper for creating alert rules in Nightingale, a monitoring system that watches services and metrics for problems. It can reuse ready-made rule sets for systems such as Linux, MySQL, Redis, Kafka, PostgreSQL, and Elasticsearch, or create a custom rule when needed.

In plain words
What is it for?
Adding one alert, a group of alerts, or a complete rule pack for a monitored system, and writing a custom condition when no matching rule is available.
Why use it?
It reduces the work and risk of writing monitoring conditions by hand when a validated rule already exists.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: names the AskUserQuestion tool.

About the project

Nightingale is an open-source monitoring and alerting system that connects to stored metrics and log data, evaluates alert rules, and distributes notifications. Operations teams use it to manage alarms and explore observability data alongside existing data sources and collectors. Catalogue add-ons provide skills for operating Nightingale.

ccfos/nightingale · 13,280 stars · on GitHub · n9e.github.io

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.

agentmods
npx agentmods add skills/ccfos/nightingale/create-alert-rule
Any agent
npx skills add ccfos/nightingale --skill create-alert-rule
Clone the repo
git clone --depth 1 https://github.com/ccfos/nightingale

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 create-alert-rule

README.md
[![agentmods](https://agentmods.dev/badge/skills/ccfos/nightingale/create-alert-rule.svg)](https://agentmods.dev/skills/ccfos/nightingale/create-alert-rule)
Your own site
<a href="https://agentmods.dev/skills/ccfos/nightingale/create-alert-rule"><img src="https://agentmods.dev/badge/skills/ccfos/nightingale/create-alert-rule.svg" alt="Measured on agentmods" height="20"></a>
Per session 197 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,924 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.00197 $0.06924
Opus 5 $0.00098 $0.03462
Sonnet 5 $0.00039 $0.01385
Haiku 4.5 $0.00020 $0.00692

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

Security

Grade A, and why

create-alert-rule 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.

aiagent/skill/embedded/builtin/create-alert-rule/SKILL.md · 440 lines

How it starts

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

Skill: Nightingale (N9E) Alert Rule Creation

Two tools: import_alert_rule_template (reuse the validated rules in integrations) and create_alert_rule (hand-write rules).

Prefer reusing the rules in integrations: the rules under integrations/<component>/alerts/ are finished products that have been hand-tuned and validated (severity, duration, evaluation interval, appended tags, annotations, and effective time windows are all configured), and their quality far exceeds hand-crafted rules. But import as many as the user needs—do not blindly import the whole pack:

  • The user wants "a set / common" alerts for some component → import the whole pack (do not pass names)
  • The user names only a few categories (e.g. "disk and memory alerts") → import only those (pass them in names)
  • The user wants a single alert for a specific metric → if the pack happens to contain a matching rule, import just that one (pass one entry in names) or borrow its expression; if the pack has nothing that fits, hand-write with create_alert_rule

Only go to Approach B (create_alert_rule) when integrations has no matching rule, or when the user provides a fully custom query condition.

When a component ships both a categraf and an exporter rule pack, prefer categraf: first probe whether the categraf metrics have data; if found, use the categraf pack, otherwise fall back to the exporter pack (see Approach A step 3 for details).

User need What to do
Configure a set / a few alerts for a standard component (Linux / MySQL / Redis / Kafka / PostgreSQL / Elasticsearch / Ceph / Oracle / Windows / MongoDB …) Approach A: preview_alert_rule_template to see what's in the pack → import_alert_rule_template to import as needed
A single alert for a specific metric, and the integration pack has a matching rule Approach A: import_alert_rule_template + names to import just that one
Fully custom rules that integrations doesn't cover (including niche conditions like Loki / ES / SQL query values / log counts) Approach B: create_alert_rule

⚠️ Do NOT use this skill for bulk YAML imports—when the user provides a URL or a YAML file, awesome-prometheus-alerts, node-exporter.yml, and the like, use import-prom-rule instead.

Read the full file on GitHub · 440 lines

Files

What ships with it

10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 440 lines · 197 tokens per session scan A ec6bd2dccc6a

Subscribe to this mod's changes

create-alert-rule is a skill published in the GitHub repository ccfos/nightingale (13,280 stars, last pushed yesterday), licensed Apache-2.0. It adds 197 tokens to every session and 6,924 once invoked, about $0.0010 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.