agentleFS
Dokkabei97Dokkabei97/forged-claude-code/skills/cto/monitoring-setup/SKILL.md

monitoring-setup

Skill2 starsChanged 8 months agoMITView on GitHub

Configures application monitoring, log collection, and alerting. Generates setup for Datadog, Grafana+Prometheus, CloudWatch, and Sentry with startup-appropriate thresholds.

  • Reads credentials
  • Installs packages

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create health check endpoints

    line 131
  2. Distinctive:

    Create cloud provider accounts

    line 134

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “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

Monitoring Setup - Observability Configuration

Overview

Sets up the "detect before users complain" system. Minimum viable monitoring that grows with your startup.


1. When to Apply

TriggerBehavior
Post-launch monitoring setupFull observability stack
"monitoring", "alerting"Tool-specific configuration
First production incidentRetroactive monitoring gaps

2. Monitoring Stack by Budget

BudgetStackMonthly Cost
$0Sentry (free) + UptimeRobot + CloudWatch basic$0
$0-50Sentry + Grafana Cloud (free) + Better Uptime$0-50
$50-500Datadog (Pro) or Grafana Cloud (Pro)$50-500

3. Essential Alerts (Day 1)

## Must-Have Alerts

| Alert | Condition | Channel | Priority |
|-------|-----------|---------|----------|
| **Site Down** | Health check fails 3x | Slack + PagerDuty | P0 |
| **Error Rate Spike** | >5% 5xx in 5 min | Slack | P1 |
| **Slow Response** | p95 > 2s for 5 min | Slack | P2 |
| **DB Connections** | >80% pool used | Slack | P1 |
| **Disk Space** | >85% used | Slack | P2 |
| **Memory** | >90% for 10 min | Slack | P1 |
| **SSL Expiry** | <14 days to expiry | Email | P2 |

4. Quick Setup: Sentry (Error Tracking)

// Next.js — sentry.client.config.ts
import * as Sentry from "@sentry/nextjs"

Sentry.init({
  dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
  tracesSampleRate: 0.1,      // 10% of transactions
  replaysSessionSampleRate: 0, // Save cost, enable when needed
  environment: process.env.NODE_ENV,
})
# FastAPI — main.py
import sentry_sdk
from sentry_sdk.integrations.fastapi import FastApiIntegration

sentry_sdk.init(
    dsn=os.getenv("SENTRY_DSN"),
    traces_sample_rate=0.1,
    environment=os.getenv("ENVIRONMENT", "production"),
    integrations=[FastApiIntegration()],
)

5. Health Check Endpoint

// app/api/health/route.ts
export async function GET() {
  const checks = {
    status: 'ok',
    timestamp: new Date().toISOString(),
    uptime: process.uptime(),
    checks: {
      database: await checkDB(),
      redis: await checkRedis(),
    }
  }
  const allHealthy = Object.values(checks.checks).every(c => c === 'ok')
  return Response.json(checks, { status: allHealthy ? 200 : 503 })
}

6. Tool Coordination

ToolPurpose
WriteGenerate config files, health endpoints
ReadAnalyze existing monitoring setup
BashInstall SDKs (npm install @sentry/nextjs)

7. Boundaries

Will:

  • Generate monitoring configurations for major platforms
  • Set up error tracking (Sentry), uptime monitoring, basic APM
  • Define alert thresholds appropriate for startups
  • Create health check endpoints

Will Not:

  • Create cloud provider accounts
  • Set up PagerDuty/OpsGenie on-call rotations
  • Build custom dashboards (recommend tools instead)
  • Monitor business metrics (use metrics-tracker)

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.

Reviews can't be read right now.

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.