Skip to content
/monitorStable

Set up monitoring, alerting, and observability. Configures health checks, error tracking, and performance dashboards.

DevOpsObservabilityΒ· 2 min read

Quick import: Download the .md file and save it to .claude/commands/ (Claude Code), .cursorrules (Cursor), or paste as a system prompt in ChatGPT, Gemini, or any LLM API.

#What it does

The /monitor skill sets up monitoring, alerting, and observability for your application. It configures health endpoints, error tracking, uptime monitoring, and performance metrics so you know when something breaks before your users do.

#How to use

bash
/monitor
/monitor health-endpoint
/monitor alerts --channel slack

#Workflow

  1. Assess -- Identifies the application type, hosting platform, and existing monitoring gaps
  2. Instrument -- Adds health check endpoints and structured logging
  3. Configure -- Sets up error tracking (Sentry), uptime monitoring, and alerting
  4. Dashboard -- Creates key metrics: response time, error rate, uptime, throughput
  5. Alert -- Configures notification rules with severity levels and escalation

#Configuration

yaml
# Monitoring stack selection based on your infra:
monitoring:
  health_check: "/api/health"         # Liveness + readiness probes
  error_tracking: "sentry"            # Automatic error capture
  uptime: "betterstack"              # External uptime monitoring
  metrics: "prometheus + grafana"     # Custom application metrics
  logs: "structured JSON"            # Searchable, parseable logs
 
alerts:
  critical:                           # Page immediately
    - error_rate > 5% for 2 minutes
    - health_check down for 30 seconds
    - response_time p95 > 3 seconds
  warning:                            # Notify channel
    - error_rate > 1% for 5 minutes
    - disk_usage > 80%
    - memory_usage > 90%

#What you get

  • Health endpoint -- /api/health returning database, cache, and service status
  • Error tracking -- Automatic exception capture with context and stack traces
  • Uptime alerts -- External checks every 30 seconds with incident management
  • Structured logs -- JSON-formatted logs with request IDs for tracing
  • Alert routing -- Critical issues page on-call, warnings go to Slack

#Example

bash
> /monitor
 
# Analyzing application...
Stack: Next.js on Vercel, Postgres on Supabase
 
# Setting up:
  Created /api/health endpoint (checks DB + external APIs)
  Added Sentry SDK with error boundary
  Configured BetterStack uptime monitor
  Added structured logging middleware
  Set up Slack webhook for alerts
 
# Alert rules configured:
  CRITICAL  500 error rate > 5%     -> PagerDuty
  WARNING   Response time > 2s      -> #alerts Slack
  INFO      Deploy completed        -> #deploys Slack
Orel OhayonΒ·
View all skills