import-prom-rule

import-prom-rule is a skill for Claude Code, Codex from ccfos/nightingale. It costs 125 tokens per session (2,786 once invoked), scanned A, original, Apache-2.0.

A guide for importing many Prometheus alert rules from a YAML file. Prometheus is a monitoring system, and alert rules define conditions that should generate alerts.

In plain words
What is it for?
Use it to import rules from a public URL or pasted YAML, select the business group and data source, preview the result, and create the full set of rules at once.
Why use it?
It handles different rule-file formats and keeps large YAML content outside the conversation while the rules are fetched, checked, previewed, and written to Nightingale.

Skill for Claude CodeCodex

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

Good fit Use it to import rules from a public URL or pasted YAML, select the business group and data source, preview the result, and create the full set of rules at once.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ccfos/nightingale/import-prom-rule
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,282 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.

Any agent
npx skills add ccfos/nightingale --skill import-prom-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 import-prom-rule

README.md
[![agentmods](https://agentmods.dev/badge/skills/ccfos/nightingale/import-prom-rule/github.svg)](https://agentmods.dev/skills/ccfos/nightingale/import-prom-rule)
Your own site
<a href="https://agentmods.dev/skills/ccfos/nightingale/import-prom-rule"><img src="https://agentmods.dev/badge/skills/ccfos/nightingale/import-prom-rule/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for import-prom-rule

Your own site · 80×15
<a href="https://agentmods.dev/skills/ccfos/nightingale/import-prom-rule"><img src="https://agentmods.dev/badge/skills/ccfos/nightingale/import-prom-rule.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,786 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 76
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.00125 $0.02786
Opus 5 $0.00063 $0.01393
Sonnet 5 $0.00025 $0.00557
Haiku 4.5 $0.00013 $0.00279

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

Security

Grade A, and why

import-prom-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 9d 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/import-prom-rule/SKILL.md · 214 lines

How it starts

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

Skill: Import Prometheus Alert Rules

Overview

Bulk-create Prometheus official rule YAML (in any of the three forms: with groups, a plain rules array, or a single rule) into n9e. Typical sources:

  • A remote URL (e.g. awesome-prometheus-alerts on GitHub raw)
  • YAML text pasted directly by the user

The workflow is a fixed four steps: fetch YAML to a file → choose business group + datasource → preview → write to DB.

⚠️ Core constraint: the YAML file does not enter the LLM context. http_fetch with save_to_file=true writes the content to a temporary file, and the subsequent preview_prom_rule_yaml and import_prom_rule_yaml both read that path via payload_file. The file size can range from a few KB to a few MB; letting it enter the prompt would significantly slow things down, increase cost, and make it easy for the LLM to truncate or rewrite it.

Available Tools

Tool Purpose
http_fetch GET a public URL. When save_to_file=true, writes the body to a temporary file; the return contains only file_path, not the body. Only http/https; automatically rejects intranet/loopback addresses
preview_prom_rule_yaml Parse the YAML without writing to the DB. Prefer the payload_file argument (the file_path returned by http_fetch) to avoid large files entering the context. Returns each rule's name/severity/prom_ql etc. for the user to confirm
import_prom_rule_yaml Parse the YAML and bulk-write to the DB by business group + datasource. Prefer payload_file. Returns each rule's id or error
list_busi_groups List visible business groups so the user can pick a group_id
list_datasources List datasources, filtered by plugin_type=prometheus

Execution Steps

Step 1: Fetch the YAML to a temporary file

User gave a URL — always include save_to_file=true:

http_fetch(url="https://.../node-exporter.yml", save_to_file=true)

The return is:

{"status_code":200,"content_type":"text/plain","size":8731,"truncated":false,
 "file_path":"/var/folders/.../n9e-aiagent-fetch-xxx.yml"}

Read the full file on GitHub · 214 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. 9d ago First seen · 214 lines · 125 tokens per session scan A 3cf87227ee79

Subscribe to this mod's changes

import-prom-rule is a skill published in the GitHub repository ccfos/nightingale (13,282 stars, last pushed yesterday), licensed Apache-2.0. It adds 125 tokens to every session and 2,786 once invoked, about $0.0006 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.

Related

Other skills, from other repositories

cis-aws-database-10.8

Ensure Monitoring and Alerting is Enabled.

CyberStrikeus/CyberStrike · 17 tokens

github-ci-fix-onboarding

Onboards and troubleshoots GitHub PR CI fixing by configuring GitHub CLI authentication, a non-exposed GitHub token, a matching local checkout, and a ready coding agent before running fixgithubprci. Use for first-time setup, failed prerequisites, demos, or action-shaped requests to onboard the user onto the local…

Tracer-Cloud/opensre · 85 tokens

cicd-analytics-demo

CI/CD performance and reliability analytics for one repository over the last 30 days: executions, PR failure rate, CI-caused vs source failures, developer time blocked, default-branch red time, via analyzegithubcireliability; also the first-experience demo that scans the machine and picks a repository first. Use for…

Tracer-Cloud/opensre · 116 tokens

github-ci-fix

Fix failing GitHub CI / Actions checks via fixgithubprci and push to the existing PR head, or fix a branch's failing CI via a linked repair worktree.

Tracer-Cloud/opensre · 40 tokens

github-ci-fix

Use when the user asks OpenSRE to fix failing GitHub CI, GitHub Actions checks, failing pull request checks, a broken PR branch, or CI on a named branch such as main.

Tracer-Cloud/opensre · 45 tokens

github-ci-health

Read-only GitHub CI health report of the checks failing right now for one repository, optionally narrowed to a branch or pull request. Not for CI/CD performance, reliability KPIs, failure rates, or downtime over a period (use cicd-analytics-demo).

Tracer-Cloud/opensre · 56 tokens