label-check

label-check is a skill for Claude Code, Codex from conallob/o11y-analysis-tools. It costs 0 tokens per session (1,238 once invoked), scanned A, original, BSD-3-Clause.

A static checker for PromQL expressions and, optionally, alert label blocks. PromQL is the query language used by Prometheus, a system for collecting and querying monitoring data.

In plain words
What is it for?
Use it to validate YAML rule files, check alert labels, or enforce label requirements in a CI pipeline.
Why use it?
It catches rules that omit required labels such as job, namespace, or cluster. This helps prevent monitoring data from one tenant or environment being confused with another.

Skill for Claude CodeCodex

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

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is go build -o bin/label-check ./cmd/label-check.

Good fit Use it to validate YAML rule files, check alert labels, or enforce label requirements in a CI pipeline.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/conallob/o11y-analysis-tools
agentmods
npx agentmods add skills/conallob/o11y-analysis-tools/label-check

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin label-check/plugin install label-check after adding the marketplace above.

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 label-check

README.md
[![agentmods](https://agentmods.dev/badge/skills/conallob/o11y-analysis-tools/label-check.svg)](https://agentmods.dev/skills/conallob/o11y-analysis-tools/label-check)
Your own site
<a href="https://agentmods.dev/skills/conallob/o11y-analysis-tools/label-check"><img src="https://agentmods.dev/badge/skills/conallob/o11y-analysis-tools/label-check.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,238 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.
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.00000 $0.01238
Opus 5 $0.00000 $0.00619
Sonnet 5 $0.00000 $0.00248
Haiku 4.5 $0.00000 $0.00124

Measured 8d ago against content hash 01dd5f30dd19, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

label-check 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 8d 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.

skills/label-check/SKILL.md · 115 lines

How it starts

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

label-check

Static validator that scans expr:/query: fields (and, in --check-alerts mode, alert labels: blocks) for a required set of label names. Hermetic — reads only the files/stdin you give it.

When to use this skill

  • A monitoring platform is multi-tenant and needs every rule to carry a tenant-scoping label (commonly job, sometimes namespace/cluster) to avoid one team's alert matching another team's series.
  • You want a CI gate that fails a PR if a new/edited rule omits a required label.
  • You want to enforce that every alert also carries required alert labels (see the important caveat below about what --alert-labels actually inspects).

Setup

go build -o bin/label-check ./cmd/label-check
# or: go install github.com/conallob/o11y-analysis-tools/cmd/label-check@latest

Usage

label-check [options] <file|directory>...

Accepts .yml/.yaml files, directories (walked recursively), or stdin via a literal - argument (e.g. for pre-commit hooks piping a single expression).

Flag Default Effect
--labels job Comma-separated required labels checked against every PromQL expression.
--check-alerts false Also validate each - alert: Name block's labels: section.
--alert-labels "" Comma-separated labels required in each alert's labels: section. Only takes effect with --check-alerts.

Typical invocations

# Default: require 'job' on every expression
label-check --check ./alerts/

# Multiple required labels
label-check --labels=job,namespace,cluster ./alerts/

# Also require alert-level labels
label-check --check-alerts --alert-labels=severity,team ./alerts/

# Single expression via stdin (e.g. pre-commit hook on a diff hunk)
echo 'rate(http_requests_total[5m])' | label-check --labels=job -

Important gotchas

  • --alert-labels checks the alert's labels: block, not annotations:. The CLI's own -h example (--alert-labels=severity, grafana_url,runbook) is misleading here: runbook and grafana_url conventionally live under annotations:, not labels:, so checking for them with this flag will always report them missing even when they're correctly set as annotations. Only use --alert-labels for names that are genuinely emitted as alert labels (e.g. severity, team, tier); it has no way to validate annotations:.
  • Label detection is regex-based, not a full PromQL parse. It counts a label as "present" if it appears either in a {label="..."}/label=~"..." matcher or in a by (...)/without (...) clause anywhere in the expression. That means sum(metric) by (job) counts as having the job label even though job there is a grouping key, not a selector — the underlying series could still span multiple jobs. Don't treat a pass as a hard guarantee against label collisions; treat it as a lint, and read the actual expression when the stakes are high (e.g. an alert routed by tenant).
  • There is no config-file support (.label-check.yml) despite it being mentioned in the repo's top-level README — as of this version, required labels can only be supplied via --labels/--alert-labels flags on every invocation. If a user asks for config-file support, tell them it's aspirational/undocumented-in-code, not implemented.

Read the full file on GitHub · 115 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. 8d ago First seen · 115 lines · 0 tokens per session scan A 01dd5f30dd19

Subscribe to this mod's changes

label-check is a skill published in the GitHub repository conallob/o11y-analysis-tools (4 stars, last pushed 1mo ago), licensed BSD-3-Clause. It costs nothing until one of its globs matches a file; then it loads 1,238 tokens. 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-31.

Related

Other skills, from other repositories

monitoring-observability

Monitoring and observability patterns for Prometheus metrics, Grafana dashboards, Langfuse v4 LLM tracing (astype, scorecurrentspan, shouldexportspan, LangfuseMedia), and drift detection. Use when adding logging, metrics, distributed tracing, LLM cost tracking, or quality drift monitoring.

yonatangross/orchestkit · 69 tokens

host_bash

A read-only shell skill for examining files and running diagnostic commands in a restricted environment. A shell is a text interface for operating-system commands.

ongridio/ongrid · 26 tokens

host_restart_service

A tool for restarting approved systemd services, which are background programs managed by Linux's service manager.

ongridio/ongrid · 23 tokens

golang-observability-opentelemetry

Instrumenting Go applications with OpenTelemetry for distributed tracing, Prometheus for metrics, and structured logging with slog.

bobmatnyc/claude-mpm-skills · 31 tokens

monitoring-expert

Expert-level monitoring and observability with Prometheus, Grafana, logging, and alerting. Use when the user mentions observability, Prometheus, Grafana, logging, metrics, or alerting, or when the task involves The Three Pillars of Observability, Monitoring Fundamentals, Prometheus Configuration, or Alert Rules.

personamanagmentlayer/pcl · 70 tokens

prometheus-expert

Expert-level Prometheus monitoring, metrics collection, PromQL queries, alerting, and production operations. Use when the user mentions monitoring, metrics, observability, alerting, or PromQL, or when the task involves Prometheus Architecture, Installation on Kubernetes, ServiceMonitor, or PromQL Queries.

personamanagmentlayer/pcl · 65 tokens