/utopia-product:monitoring-setupfrom utopia-product
Sets up production monitoring: Sentry error tracking, PostHog product analytics, health checks and alerting, with verification commands and output templates. Use when the user asks to set up monitoring, add error tracking, configure Sentry or PostHog, add analytics or set up alerts. Not for wiring GitHub or Sentry alerts into Slack (use dev-tool-integrations).
Ships in utopia-product. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Sets up production monitoring so you know when things break before your users tell you.
# Check for error tracking
grep -rn "@sentry/\|sentry-sdk\|SENTRY_DSN" package.json requirements.txt --include="*.env*" . 2>/dev/null | head -5
# Check for analytics
grep -rn "posthog\|gtag\|mixpanel\|amplitude\|NEXT_PUBLIC_POSTHOG\|GA_TRACKING_ID" --include="*.ts" --include="*.tsx" --include="*.env*" . 2>/dev/null | head -5
# Check for logging
grep -rn "winston\|pino\|structlog\|loguru\|bunyan" package.json requirements.txt 2>/dev/null
# Check for health endpoints
grep -rn "health\|healthz\|readyz\|livez" --include="*.ts" --include="*.js" --include="*.py" . 2>/dev/null | head -5
# Check for error boundaries (React/Next.js)
grep -rn "ErrorBoundary\|error.tsx\|error.jsx\|componentDidCatch" --include="*.ts" --include="*.tsx" . 2>/dev/null | head -5
For Next.js (most common vibe-coded stack):
npx @sentry/wizard@latest -i nextjs
This auto-creates: sentry.client.config.ts, sentry.server.config.ts, sentry.edge.config.ts, updates next.config.js.
Add to .env.example:
SENTRY_DSN=
SENTRY_AUTH_TOKEN=
Verify Sentry works:
// Add to any page temporarily:
<button onClick={() => { throw new Error("Sentry test error"); }}>Test Sentry</button>
npm install posthog-js posthog-node
Create provider (providers/posthog.tsx):
'use client'
import posthog from 'posthog-js'
import { PostHogProvider } from 'posthog-js/react'
if (typeof window !== 'undefined') {
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY!, {
api_host: process.env.NEXT_PUBLIC_POSTHOG_HOST || 'https://us.i.posthog.com',
})
}
export function PHProvider({ children }: { children: React.ReactNode }) {
return <PostHogProvider client={posthog}>{children}</PostHogProvider>
}
// app/api/health/route.ts (Next.js App Router)
export function GET() {
return Response.json({
status: 'ok',
timestamp: new Date().toISOString(),
version: process.env.npm_package_version || 'unknown',
uptime: process.uptime(),
});
}
Verify: curl http://localhost:3000/api/health
npm install pino pino-pretty
// lib/logger.ts
import pino from 'pino'
export const logger = pino({ level: process.env.LOG_LEVEL || 'info' })
// Usage: logger.info({ userId }, 'User logged in')
## 📊 Monitoring Audit Report
### Error Tracking
| Check | Status | Details |
|-------|--------|---------|
| Sentry SDK installed | {✅/❌} | {version or "not found"} |
| Sentry DSN configured | {✅/❌} | {in .env.example or "missing"} |
| Error boundaries (frontend) | {✅/❌} | {count found or "none"} |
| Server-side error handling | {✅/❌} | {middleware or "none"} |
### Product Analytics
| Check | Status | Details |
|-------|--------|---------|
| PostHog/analytics SDK | {✅/❌} | {provider or "not found"} |
| Page view tracking | {✅/❌} | {auto or manual} |
| Event tracking | {✅/⚠️/❌} | {custom events found or "none"} |
### Health & Logging
| Check | Status | Details |
|-------|--------|---------|
| Health endpoint | {✅/❌} | {path or "not found"} |
| Structured logging | {✅/❌} | {library or "console.log only"} |
| Uptime monitoring | {✅/❌} | {service or "not configured"} |
### Recommendations
1. **{Most critical}** — {why it matters for your users}
2. **{Second priority}** — {why it matters}
3. **{Third priority}** — {why it matters}
### Setup Commands (Copy-Paste Ready)
{Provide exact commands to install and configure each missing component}
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub the-utopia-studio/skills --plugin utopia-product134 skills in this plugin
/ab-test-analysisAnalyzes A/B and split test results: conversion rates, lift, p-value, confidence interval, sample size, sample ratio mismatch and a ship / extend / stop call. Use when the user pastes control and variant numbers, asks if a test is significant, whether the lift is real, or whether to ship the variant. Not for designing what to test (use probe-matrix)./agent-concierge-probeRunbook for having an AI agent run a real, mapped task end to end on several cases, producing cost per outcome priced to the cent and a frontier map of steps it does unaided vs needs a human. Use when the user wants to know what one outcome costs, whether a service can be automated, or what the agent cannot do alone. Not for the founder delivering by hand to test willingness to pay (use concierge-probe)./agent-design