error-monitor
Skill7 starsChanged 7 months agoMITView on GitHub
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.
In this repository45 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- a11y-auditSkill
- api-designSkill
- architecture-reviewSkill
- business-blueprintSkill
- business-logic-auditSkill
- changelogSkill
- ci-pipelineSkill
- code-coverageSkill
- competitive-analysisSkill
- convert-codeSkill
- create-componentSkill
- db-migrationSkill
- debugSkill
- dependency-auditSkill
- deploy-checklistSkill
- design-flowSkill
- docker-setupSkill
- env-setupSkill
- estimateSkill
- explain-codeSkill
- fix-issueSkill
- generate-docsSkill
- git-cleanupSkill
- grill-meSkill
- handoffSkill
- legal-pagesSkill
- memory-importSkill
- memorySkill
- microcopySkill
- migrate-frameworkSkill
- onboardSkill
- optimizeSkill
- pr-summarySkill
- refactorSkill
- reference-appSkill
- review-prSkill
- security-scanSkill
- seo-scaffoldSkill
- tddSkill
- web-launch-checkSkill
- wireframeSkill
- write-skillSkill
- write-testsSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
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
- Distinctive: line 74
NEVER hardcode DSN/API keys — use environment variables
- Distinctive: line 75
Always scrub sensitive data before sending to error tracker
- Distinctive: line 78
Don't track expected errors (404 for invalid URLs, validation errors)
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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.
Files
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:
AppErrorbase class with code, message, contextValidationErrorfor input validation failuresNotFoundErrorfor missing resourcesAuthErrorfor authentication/authorization failuresExternalServiceErrorfor 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)
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
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.

