commit 075870bc7473435d53ae0f215132adf9a782a8b2 Author: Zhongwei Li Date: Sun Nov 30 08:20:58 2025 +0800 Initial commit diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..74c4f80 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,15 @@ +{ + "name": "error-rate-monitor", + "description": "Monitor and analyze application error rates", + "version": "1.0.0", + "author": { + "name": "Claude Code Plugins", + "email": "[email protected]" + }, + "skills": [ + "./skills" + ], + "commands": [ + "./commands" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..c02a8ac --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# error-rate-monitor + +Monitor and analyze application error rates diff --git a/commands/monitor-errors.md b/commands/monitor-errors.md new file mode 100644 index 0000000..1421716 --- /dev/null +++ b/commands/monitor-errors.md @@ -0,0 +1,35 @@ +--- +description: Monitor and analyze error rates +--- + +# Error Rate Monitor + +Set up comprehensive error rate monitoring and alerting. + +## Monitoring Areas + +1. **HTTP Errors**: 4xx and 5xx response tracking +2. **Application Exceptions**: Unhandled exception monitoring +3. **Database Errors**: Query failures and timeouts +4. **External API Errors**: Third-party service failures +5. **Background Job Errors**: Async task failures +6. **Client-Side Errors**: Frontend error tracking + +## Process + +1. Analyze application architecture and error sources +2. Identify critical error scenarios +3. Design error tracking strategy +4. Create monitoring configuration +5. Define alert thresholds and escalation +6. Generate implementation guide + +## Output + +Provide: +- Error monitoring setup (Sentry, Rollbar, CloudWatch, etc.) +- Error categorization and tagging strategy +- Alert rule definitions with thresholds +- Dashboard configuration for error tracking +- Error budget calculations +- Incident response guidelines diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..e695d99 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,61 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:jeremylongshore/claude-code-plugins-plus:plugins/performance/error-rate-monitor", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "87c77d8d3e2c7a2ffce0512c05b588db12b1d445", + "treeHash": "9b107cc99d183c0d7400fd67a10d56895fbc416dc540fc7c1728bf3b2ed24705", + "generatedAt": "2025-11-28T10:18:26.086029Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "error-rate-monitor", + "description": "Monitor and analyze application error rates", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "5e18f7d3464edd61bfbd40a47fb1d2dfba789e9129adeb53bf53a7dfc5ba595d" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "e7330716a5006d78ea3f8f050c47fa05106b98be2f5cb205937e3995c13c4601" + }, + { + "path": "commands/monitor-errors.md", + "sha256": "2011e7a205edf17c9b8ca59d918ab597006a700c99a2f84db53c1beaddd4647a" + }, + { + "path": "skills/error-rate-monitor/SKILL.md", + "sha256": "df93fbeffa3c0a8af05fb12b86e85cf16c490b718bdac953938e3fe8b03682cb" + }, + { + "path": "skills/error-rate-monitor/references/README.md", + "sha256": "83540d775cc7f4b4e0ac6157cdcee39282bcb2598beedea2e3181216b0b75c37" + }, + { + "path": "skills/error-rate-monitor/scripts/README.md", + "sha256": "9695582a9490bf8d9d7811012b7cfa8620920c7ebfe3d8b9235dd65725a70d1a" + }, + { + "path": "skills/error-rate-monitor/assets/README.md", + "sha256": "cca3653ada71a1a0742f3b356c41059b260b343d10c5939187e7667d28976ae5" + } + ], + "dirSha256": "9b107cc99d183c0d7400fd67a10d56895fbc416dc540fc7c1728bf3b2ed24705" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file diff --git a/skills/error-rate-monitor/SKILL.md b/skills/error-rate-monitor/SKILL.md new file mode 100644 index 0000000..04d6a0e --- /dev/null +++ b/skills/error-rate-monitor/SKILL.md @@ -0,0 +1,53 @@ +--- +name: monitoring-error-rates +description: | + This skill enables Claude to monitor and analyze application error rates to improve reliability. It is used when the user needs to track and understand errors occurring in their application, including HTTP errors, application exceptions, database errors, external API errors, background job errors, and client-side errors. Use this skill when the user asks to "monitor errors", "analyze error rates", "track application errors", or requests help with "error monitoring". It sets up comprehensive error tracking and alerting based on defined thresholds. +allowed-tools: Read, Bash, Grep, Glob +version: 1.0.0 +--- + +## Overview + +This skill automates the process of setting up comprehensive error monitoring and alerting for various components of an application. It helps identify, track, and analyze different types of errors, enabling proactive identification and resolution of issues before they impact users. + +## How It Works + +1. **Analyze Error Sources**: Identifies potential error sources within the application architecture, including HTTP endpoints, database queries, external APIs, background jobs, and client-side code. +2. **Define Monitoring Criteria**: Establishes specific error types and thresholds for each source, such as HTTP status codes (4xx, 5xx), exception types, query timeouts, and API response failures. +3. **Configure Alerting**: Sets up alerts to trigger when error rates exceed defined thresholds, notifying relevant teams or individuals for investigation and remediation. + +## When to Use This Skill + +This skill activates when you need to: +- Set up error monitoring for a new application. +- Analyze existing error rates and identify areas for improvement. +- Configure alerts to be notified of critical errors in real-time. +- Establish error budgets and track progress towards reliability goals. + +## Examples + +### Example 1: Setting up Error Monitoring for a Web Application + +User request: "Monitor errors in my web application, especially 500 errors and database connection issues." + +The skill will: +1. Analyze the web application's architecture to identify potential error sources (e.g., HTTP endpoints, database connections). +2. Configure monitoring for 500 errors and database connection failures, setting appropriate thresholds and alerts. + +### Example 2: Analyzing Error Rates in a Background Job Processor + +User request: "Analyze error rates for my background job processor. I'm seeing a lot of failed jobs." + +The skill will: +1. Focus on the background job processor and identify the types of errors occurring (e.g., task failures, timeouts, resource exhaustion). +2. Analyze the frequency and patterns of these errors to identify potential root causes. + +## Best Practices + +- **Granularity**: Monitor errors at a granular level to identify specific problem areas. +- **Thresholding**: Set appropriate alert thresholds to avoid alert fatigue and focus on critical issues. +- **Context**: Include relevant context in error messages and alerts to facilitate troubleshooting. + +## Integration + +This skill can be integrated with other monitoring and alerting tools, such as Prometheus, Grafana, and PagerDuty, to provide a comprehensive view of application health and performance. It can also be used in conjunction with incident management tools to streamline incident response workflows. \ No newline at end of file diff --git a/skills/error-rate-monitor/assets/README.md b/skills/error-rate-monitor/assets/README.md new file mode 100644 index 0000000..b2b1d5c --- /dev/null +++ b/skills/error-rate-monitor/assets/README.md @@ -0,0 +1,7 @@ +# Assets + +Bundled resources for error-rate-monitor skill + +- [ ] error_dashboard_template.json: Template for creating an error rate dashboard in a popular monitoring tool (e.g., Grafana). +- [ ] incident_response_template.md: Template for creating an incident response document when error rates exceed thresholds. +- [ ] example_error_report.md: Example of a generated error report. diff --git a/skills/error-rate-monitor/references/README.md b/skills/error-rate-monitor/references/README.md new file mode 100644 index 0000000..2c7f44d --- /dev/null +++ b/skills/error-rate-monitor/references/README.md @@ -0,0 +1,7 @@ +# References + +Bundled resources for error-rate-monitor skill + +- [ ] error_source_api_docs.md: API documentation for various error sources (e.g., Sentry, New Relic, custom logging APIs). +- [ ] alert_threshold_guidelines.md: Guidelines for setting appropriate alert thresholds based on application criticality and historical data. +- [ ] error_budget_calculation.md: Explanation and examples of how to calculate error budgets. diff --git a/skills/error-rate-monitor/scripts/README.md b/skills/error-rate-monitor/scripts/README.md new file mode 100644 index 0000000..865446d --- /dev/null +++ b/skills/error-rate-monitor/scripts/README.md @@ -0,0 +1,7 @@ +# Scripts + +Bundled resources for error-rate-monitor skill + +- [ ] analyze_errors.py: Script to fetch error data from various sources (logs, APIs) and calculate error rates. +- [ ] set_alert_threshold.py: Script to set alert thresholds for error rates based on user input. +- [ ] generate_error_report.py: Script to generate a detailed error report in a user-friendly format (e.g., Markdown, HTML).