Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:20:39 +08:00
commit c2b2641f76
8 changed files with 195 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
{
"name": "alerting-rule-creator",
"description": "Create intelligent alerting rules for performance monitoring",
"version": "1.0.0",
"author": {
"name": "Claude Code Plugins",
"email": "[email protected]"
},
"skills": [
"./skills"
],
"commands": [
"./commands"
]
}

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# alerting-rule-creator
Create intelligent alerting rules for performance monitoring

42
commands/create-alerts.md Normal file
View File

@@ -0,0 +1,42 @@
---
description: Create intelligent alerting rules
---
# Alerting Rule Creator
Create comprehensive alerting rules to detect performance issues proactively.
## Alert Categories
1. **Latency Alerts**: Response time degradation
2. **Error Rate Alerts**: Elevated error percentages
3. **Throughput Alerts**: Traffic anomalies
4. **Resource Alerts**: CPU, memory, disk saturation
5. **Availability Alerts**: Service downtime
6. **SLO Violation Alerts**: Service level breach warnings
## Alert Design Principles
- Avoid alert fatigue with proper thresholds
- Use multi-window alerts to reduce false positives
- Implement severity levels (critical, warning, info)
- Include actionable information in alert messages
- Set appropriate escalation policies
## Process
1. Identify critical metrics and failure modes
2. Define alert conditions and thresholds
3. Design alert routing and escalation
4. Create alert rule configurations
5. Implement runbooks for alert responses
## Output
Provide:
- Alert rule definitions (Prometheus, Datadog, etc.)
- Threshold calculations with rationale
- Alert routing configuration
- Escalation policies
- Runbooks for common alerts
- Alert testing procedures

61
plugin.lock.json Normal file
View File

@@ -0,0 +1,61 @@
{
"$schema": "internal://schemas/plugin.lock.v1.json",
"pluginId": "gh:jeremylongshore/claude-code-plugins-plus:plugins/performance/alerting-rule-creator",
"normalized": {
"repo": null,
"ref": "refs/tags/v20251128.0",
"commit": "7afab7a7db576a1da4069c6f060c35646f250930",
"treeHash": "70fe09b37a7be52f36c48978202d1264899a144ac14227de8c4a8658f06ac03a",
"generatedAt": "2025-11-28T10:18:04.267670Z",
"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": "alerting-rule-creator",
"description": "Create intelligent alerting rules for performance monitoring",
"version": "1.0.0"
},
"content": {
"files": [
{
"path": "README.md",
"sha256": "e95bbdd69b399797e0f6db6362a1601bdd3417e16206cce43f218dc1c8d5149f"
},
{
"path": ".claude-plugin/plugin.json",
"sha256": "dc6660a09c759f995d05b148bcd6b923909e922b6fb281888ac79c83e96a0231"
},
{
"path": "commands/create-alerts.md",
"sha256": "13d9606da804ddba2eaf7b463fd1662b3ffe5ebe59c81233e4d2107d5c7a28f7"
},
{
"path": "skills/alerting-rule-creator/SKILL.md",
"sha256": "ab3924e0be7f22a3f85f4562aac47891d787ac7925270edf48284ffd5018d60a"
},
{
"path": "skills/alerting-rule-creator/references/README.md",
"sha256": "222f533fea589eda0a0c99226b6d0fe36a48d46f584924ed696c5de50540a9fe"
},
{
"path": "skills/alerting-rule-creator/scripts/README.md",
"sha256": "7058a621ffdcc4297044280859856984165ed2a7c8f4d936230e538b9bb2b21e"
},
{
"path": "skills/alerting-rule-creator/assets/README.md",
"sha256": "18fdcf517112c02338cf4295c5906ff12153b545f98f34e9e78fa25417bd783e"
}
],
"dirSha256": "70fe09b37a7be52f36c48978202d1264899a144ac14227de8c4a8658f06ac03a"
},
"security": {
"scannedAt": null,
"scannerVersion": null,
"flags": []
}
}

View File

@@ -0,0 +1,53 @@
---
name: creating-alerting-rules
description: |
This skill enables Claude to create intelligent alerting rules for proactive performance monitoring. It is triggered when the user requests to "create alerts", "define monitoring rules", or "set up alerting". The skill helps define thresholds, routing, and escalation policies, and offers options for multi-category alert creation, including latency, error rate, throughput, resource utilization, availability, and SLO violation alerts. It is useful for Site Reliability Engineers (SREs) and DevOps teams looking to improve system observability.
allowed-tools: Read, Write, Edit, Grep, Glob, Bash
version: 1.0.0
---
## Overview
This skill automates the creation of comprehensive alerting rules, reducing the manual effort required for performance monitoring. It guides you through defining alert categories, setting intelligent thresholds, and configuring routing and escalation policies. The skill also helps generate runbooks and establish alert testing procedures.
## How It Works
1. **Identify Alert Category**: Determines the type of alert to create (e.g., latency, error rate, resource utilization).
2. **Define Thresholds**: Sets appropriate thresholds to avoid alert fatigue and ensure timely notification of performance issues.
3. **Configure Routing and Escalation**: Establishes routing policies to direct alerts to the appropriate teams and escalation policies for timely response.
4. **Generate Runbook**: Creates a basic runbook with steps to diagnose and resolve the alerted issue.
## When to Use This Skill
This skill activates when you need to:
- Implement performance monitoring for a new service.
- Refine existing alerting rules to reduce false positives.
- Create alerts for specific performance metrics, such as latency or error rate.
## Examples
### Example 1: Setting up Latency Alerts
User request: "create latency alerts for the payment service"
The skill will:
1. Prompt for latency thresholds (e.g., warning and critical).
2. Configure alerts to trigger when latency exceeds defined thresholds.
### Example 2: Creating Error Rate Alerts
User request: "set up alerting for error rate increases in the API gateway"
The skill will:
1. Request the baseline error rate and acceptable deviation.
2. Configure alerts to trigger when the error rate exceeds the defined deviation from the baseline.
## Best Practices
- **Threshold Selection**: Use historical data and statistical analysis to determine appropriate thresholds that minimize false positives and negatives.
- **Alert Routing**: Route alerts to the appropriate teams or individuals based on the alert category and severity.
- **Runbook Creation**: Generate or link to detailed runbooks that provide clear instructions for diagnosing and resolving the alerted issue.
## Integration
This skill can be integrated with other Claude Code plugins to automate incident response workflows. For example, it can trigger automated remediation actions or create tickets in an issue tracking system.

View File

@@ -0,0 +1,7 @@
# Assets
Bundled resources for alerting-rule-creator skill
- [ ] alert_template.json: JSON template for creating alerts in a specific monitoring system (e.g., Prometheus).
- [ ] runbook_template.md: Markdown template for generating runbooks.
- [ ] example_alerts.json: Examples of alerting rules for different categories (latency, error rate, etc.).

View File

@@ -0,0 +1,7 @@
# References
Bundled resources for alerting-rule-creator skill
- [ ] alerting_best_practices.md: Provides best practices for creating effective alerting rules, including threshold setting and escalation policies.
- [ ] supported_metrics.md: Lists all supported metrics for alerting, including descriptions, units, and example values.
- [ ] escalation_policy.md: Detailed documentation of the escalation policy, including on-call schedules and contact information.

View File

@@ -0,0 +1,7 @@
# Scripts
Bundled resources for alerting-rule-creator skill
- [ ] validate_thresholds.py: Validates alerting thresholds against historical data to prevent false positives.
- [ ] route_alert.py: Routes alerts based on severity and category to appropriate channels (e.g., Slack, PagerDuty).
- [ ] generate_runbook.py: Generates a basic runbook based on the alert type and potential causes.