agentleFS
quiczzquiczz/ship-safe-skills/skills/monitor-alerts-builder/SKILL.md

monitor-alerts-builder

Skill1 starsChanged 8 days agoMITView on GitHub

Design and build monitoring and alerting for an application - health endpoint, uptime checks, error tracking, alert rules (errors, latency, auth abuse, rate limits, backups, spend, certificates), notification channels and runbooks. Use when asked to add monitoring, set up alerts, or fix the "monitor and alerts" gap from app-readiness-audit. Use proactively when an app is about to be deployed or launched with no alerting.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Runs on its own: when a deploy or launch is being prepared and there is no health check or alerting, Claude offers to build it.

    line 10
  2. Very specific:

    Every alert needs: a name, a threshold with a duration (for: 5m), a severity, an owner, and a runbook link.

    line 38
  3. Distinctive:

    Use a duration or multiple failures before firing, so one blip does not page anyone.

    line 40
  4. Distinctive:

    Never put secrets, tokens, or personal data in alert text.

    line 42
  5. Distinctive:

    Test alerts after any change.

    line 43

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Monitor and Alerts Builder

Goal: a human is told within minutes when something important breaks, with enough context to act, and is not woken up by noise.

Runs on its own: when a deploy or launch is being prepared and there is no health check or alerting, Claude offers to build it.

Procedure

  1. Discover what exists. Look for: a health endpoint, an error-tracking SDK (Sentry etc.), a metrics library, logs, a cron or CI that could run checks, and where the app is hosted. Run app-readiness-audit scan if available. Do not add a second tool if one is already wired in.
  2. Ask three things only if the repo cannot answer them: where alerts should go (Slack, Discord, Telegram, email, PagerDuty), who owns them, and the hosting platform.
  3. Pick the lightest stack that fits (see table). Prefer the host's built-in monitoring plus one error tracker over running your own Prometheus.
  4. Build in this order (each step is useful on its own):
    1. Health endpoint (/healthz for "process is up", /readyz for "database and dependencies reachable").
    2. Uptime check hitting /readyz from outside, every 1 minute, alerting after 2 failures.
    3. Error tracking with release and environment tags, user ID but no email or tokens.
    4. Alert rules from references/alert-catalog.md (start with the "Day one" set).
    5. Notification channel wired and tested by firing a fake alert.
    6. One runbook per alert, from templates/runbook-template.md.
  5. Write out what you built: where each alert is defined, the threshold and why, who gets it, and the runbook link.

Choosing a stack

SituationSuggested setup
Small app, one server or PaaSHosted uptime check + Sentry + templates/healthcheck.py on cron for backups/disk/certs
Kubernetes or many servicesPrometheus + Alertmanager using templates/alert-rules.prometheus.yml, Grafana for dashboards
ServerlessProvider metrics (CloudWatch, Vercel, Cloudflare) + Sentry + external uptime check
Mobile appCrash reporting (Crashlytics or Sentry) + backend alerts above + release health

Alert design rules

  • Alert on symptoms users feel (errors, slowness, downtime) and on things that silently rot (backup age, certificate expiry, queue growth, spend). Do not alert on raw CPU unless it predicts an outage.
  • Every alert needs: a name, a threshold with a duration (for: 5m), a severity, an owner, and a runbook link. If you cannot write what the person should do, delete the alert.
  • Two severities are enough: page (act now, customers affected) and ticket (fix this week).
  • Use a duration or multiple failures before firing, so one blip does not page anyone.
  • Group and de-duplicate; send "resolved" messages; repeat reminders for unacknowledged pages only.
  • Never put secrets, tokens, or personal data in alert text.
  • Test alerts after any change. An untested alert is a guess.

Templates in this skill

  • templates/healthcheck.py: dependency-free script. Checks URLs, disk space, TLS certificate expiry, and backup freshness; posts to a Slack/Discord/Telegram/generic webhook. Run with cron or a scheduler. Try --help and --selftest.
  • templates/alert-rules.prometheus.yml: ready-to-adapt Prometheus rules.
  • templates/runbook-template.md: one-page runbook format.
  • references/alert-catalog.md: what to alert on, default thresholds, and why.
  • Security alert sets from sibling skills (use them when the user asks for API or Zero Trust monitoring): ../api-security-guard/references/monitoring.md (auth failures, credential stuffing, object probing, unknown routes, deprecated versions) and ../zero-trust-review/references/monitoring.md plus ../zero-trust-review/templates/aws-eventbridge-patterns.json (logging tampering, MFA, admin grants, exposure, service identity). If those skills are not installed, use the security rows in references/alert-catalog.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.