ops-monitoring

ops-monitoring is a command for Claude Code from christopherlouet/claude-base. It costs 0 tokens per session (634 once invoked), scanned A, original, MIT.

An observability setup assistant for logs, metrics, traces, error tracking, health checks, and alerts. Observability means collecting the information needed to understand whether software is working and why it fails.

In plain words
What is it for?
Use it to add structured logs, Prometheus metrics, OpenTelemetry tracing, health endpoints, error tracking, alert rules, and monitoring stacks such as Grafana, Loki, and Alertmanager.
Why use it?
It removes the work of adding monitoring to application code and connecting it to tools that collect, display, and alert on that data. It also helps keep sensitive information out of logs.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

Good fit Use it to add structured logs, Prometheus metrics, OpenTelemetry tracing, health endpoints, error tracking, alert rules, and monitoring stacks such as Grafana, Loki, and Alertmanager.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/christopherlouet/claude-base/ops-monitoring
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.

Clone the repo
git clone --depth 1 https://github.com/christopherlouet/claude-base

Made for: Claude Code.

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 ops-monitoring

README.md
[![agentmods](https://agentmods.dev/badge/commands/christopherlouet/claude-base/ops-monitoring/github.svg)](https://agentmods.dev/commands/christopherlouet/claude-base/ops-monitoring)
Your own site
<a href="https://agentmods.dev/commands/christopherlouet/claude-base/ops-monitoring"><img src="https://agentmods.dev/badge/commands/christopherlouet/claude-base/ops-monitoring/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 ops-monitoring

Your own site · 80×15
<a href="https://agentmods.dev/commands/christopherlouet/claude-base/ops-monitoring"><img src="https://agentmods.dev/badge/commands/christopherlouet/claude-base/ops-monitoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 634 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.00634
Opus 5 $0.00000 $0.00317
Sonnet 5 $0.00000 $0.00127
Haiku 4.5 $0.00000 $0.00063

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

Security

Grade A, and why

ops-monitoring 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.

.claude/commands/ops/ops-monitoring.md · 65 lines

How it starts

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

MONITORING Agent

Code instrumentation for monitoring/logging/alerting and deploying the observability stack.

Request context

$ARGUMENTS

Objective

Set up the 3 pillars of observability (logs, metrics, traces) with error tracking, health checks and alerting rules — then, when needed, deploy the backing stack (Prometheus, Grafana, Loki, Alertmanager).

Workflow — instrument the code

  • Analyze the technical stack and existing tools
  • Configure error tracking (Sentry)
  • Implement structured logging (Pino, structlog, zap)
  • Expose Prometheus metrics (/metrics)
  • Configure OpenTelemetry for distributed tracing (optional)
  • Add health checks (/health/live, /health/ready)
  • Define alerting rules (error rate, latency, CPU, memory)
  • Mask sensitive data in logs (GDPR)

Workflow — deploy the observability stack

  • Identify the deployment mode (Docker Compose for dev/staging, Kubernetes + Helm for prod, Victoria Metrics, managed)
  • Configure Prometheus (scrape configs, alert rules) and Alertmanager (routes, Slack/PagerDuty/email receivers)
  • Configure Grafana (provisioning datasources + dashboards) and Loki + Promtail (log aggregation)
  • Add node-exporter and cAdvisor for system metrics
  • Document the deployment and verification commands
  • Persistent storage for metrics; never expose Prometheus/Alertmanager without auth in production

Expected output

  1. Error tracking configured (Sentry or equivalent)
  2. Logger structured with sensitive data redaction
  3. Prometheus metrics exposed, health checks (liveness/readiness), alert rules
  4. Stack deployment (when requested): docker-compose.yml or Helm values, prometheus.yml + alert.rules.yml, alertmanager.yml, Loki/Promtail configs, Grafana provisioning
Agent Usage
/ops:ops-k8s Deploy the stack on Kubernetes
/ops:ops-docker Containerize the services
/ops:ops-health Quick health check
/qa:qa-perf Performance analysis

Read the full file on GitHub · 65 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 · 65 lines · 0 tokens per session scan A ace74608fc6b

Subscribe to this mod's changes

ops-monitoring is a command published in the GitHub repository christopherlouet/claude-base (5 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 634 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-09-03.