Back to skills
SKILL.md
Error Monitor
ASecuritySets up error monitoring and tracking for the project. Detects the framework and generates integration code for Sentry, Bugsnag, or custom error tracking with proper error boundaries and middleware.
- 7 stars
- 0 votes
- 0 copies
- 1 view
- Added May 28, 2026
Works with
Security analysis
100/100npx -y skills add viknesh20-20/claude-code-tool-kit --skill error-monitor --agent claude-codeAre you the author of Error Monitor?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/viknesh20-20-error-monitor)---
name: error-monitor
description: "Sets up error monitoring and tracking for the project. Detects the framework and generates integration code for Sentry, Bugsnag, or custom error tracking with proper error boundaries and middleware."
argument-hint: "[sentry, bugsnag, or 'auto']"
allowed-tools: Read, Grep, Glob, Bash, Write
---
# Error Monitoring Setup
## Detect Framework
!`ls package.json requirements.txt go.mod Cargo.toml *.csproj 2>/dev/null`
!`cat package.json 2>/dev/null | grep -E "react|next|express|fastify|koa|nest|vue|angular|svelte" | head -5`
!`cat requirements.txt pyproject.toml 2>/dev/null | grep -iE "django|flask|fastapi|starlette" 2>/dev/null | head -5`
## Existing Error Tracking
!`grep -r "sentry\|bugsnag\|rollbar\|airbrake\|errortracking\|newrelic" --include="*.json" --include="*.ts" --include="*.js" --include="*.py" -l 2>/dev/null | head -5`
---
## Setup Process
### Step 1: Choose Provider
Based on the project stack:
- **Sentry**: Best overall, supports all major languages
- **Bugsnag**: Good for mobile and frontend
- **Custom**: For projects that can't use third-party services
### Step 2: Framework-Specific Integration
**React/Next.js:**
- Error Boundary component wrapping the app
- `Sentry.init()` in entry point
- Source map upload in build step
- Client-side error capturing
**Express/Fastify/Koa:**
- Error handling middleware (must be last middleware)
- Request context enrichment (user, request ID)
- Unhandled rejection handler
**FastAPI/Django/Flask:**
- Middleware for request error capture
- Custom exception handlers
- Background task error tracking
**Go:**
- Panic recovery middleware
- Error wrapping with context
- Goroutine error capture
### Step 3: Configuration
Generate configuration file with:
- DSN/API key reference (from environment variable, never hardcoded)
- Environment detection (development, staging, production)
- Release version tracking
- Sample rate configuration
- Sensitive data scrubbing rules (strip passwords, tokens, PII)
### Step 4: Custom Error Classes
Generate project-specific error types:
- `AppError` base class with code, message, context
- `ValidationError` for input validation failures
- `NotFoundError` for missing resources
- `AuthError` for authentication/authorization failures
- `ExternalServiceError` for third-party failures
### Step 5: Alert Configuration
Recommend alert rules:
- Critical: Unhandled exceptions, auth failures, data corruption
- Warning: High error rate, slow responses, degraded service
- Info: New error types, deployment markers
## Rules
- NEVER hardcode DSN/API keys — use environment variables
- Always scrub sensitive data before sending to error tracker
- Include contextual data (user ID, request ID, action) with every error
- Set up source maps for frontend (minified code is useless in stack traces)
- Don't track expected errors (404 for invalid URLs, validation errors)
Attribution
Comments
Loading comments…