Initial commit
This commit is contained in:
15
.claude-plugin/plugin.json
Normal file
15
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "api-monitoring-dashboard",
|
||||
"description": "Create monitoring dashboards for API health, metrics, and alerts",
|
||||
"version": "1.0.0",
|
||||
"author": {
|
||||
"name": "Jeremy Longshore",
|
||||
"email": "[email protected]"
|
||||
},
|
||||
"skills": [
|
||||
"./skills"
|
||||
],
|
||||
"commands": [
|
||||
"./commands"
|
||||
]
|
||||
}
|
||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# api-monitoring-dashboard
|
||||
|
||||
Create monitoring dashboards for API health, metrics, and alerts
|
||||
2181
commands/create-monitoring.md
Normal file
2181
commands/create-monitoring.md
Normal file
File diff suppressed because it is too large
Load Diff
97
plugin.lock.json
Normal file
97
plugin.lock.json
Normal file
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||
"pluginId": "gh:jeremylongshore/claude-code-plugins-plus:plugins/api-development/api-monitoring-dashboard",
|
||||
"normalized": {
|
||||
"repo": null,
|
||||
"ref": "refs/tags/v20251128.0",
|
||||
"commit": "7a5e6f37ed72f980f5d05ad2a1cc943611588fa0",
|
||||
"treeHash": "44aa3050002c5dd367a146cbb791c252fd7e11bbf902b9d96b3c84b894627c0e",
|
||||
"generatedAt": "2025-11-28T10:18:07.535834Z",
|
||||
"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": "api-monitoring-dashboard",
|
||||
"description": "Create monitoring dashboards for API health, metrics, and alerts",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"content": {
|
||||
"files": [
|
||||
{
|
||||
"path": "README.md",
|
||||
"sha256": "c4a515bfab31dcc060b77a78a6714e6ba1c3bd0d7d8cb7ec56c0ccd2905594e8"
|
||||
},
|
||||
{
|
||||
"path": ".claude-plugin/plugin.json",
|
||||
"sha256": "9955e8e9340d27f0269091ed561c38b8fbb4efef89f93fe3e3511e9e3db1a1ce"
|
||||
},
|
||||
{
|
||||
"path": "commands/create-monitoring.md",
|
||||
"sha256": "fe559bd3ab97abb5fc72361e2a69729e2b4043a2ce5a4c3d02ee1e040ec722b0"
|
||||
},
|
||||
{
|
||||
"path": "skills/skill-adapter/references/examples.md",
|
||||
"sha256": "922bbc3c4ebf38b76f515b5c1998ebde6bf902233e00e2c5a0e9176f975a7572"
|
||||
},
|
||||
{
|
||||
"path": "skills/skill-adapter/references/best-practices.md",
|
||||
"sha256": "c8f32b3566252f50daacd346d7045a1060c718ef5cfb07c55a0f2dec5f1fb39e"
|
||||
},
|
||||
{
|
||||
"path": "skills/skill-adapter/references/README.md",
|
||||
"sha256": "aa6f26af1ed7acd182c9c7d49628e3d42094c9df8894341099096374310f62fb"
|
||||
},
|
||||
{
|
||||
"path": "skills/skill-adapter/scripts/helper-template.sh",
|
||||
"sha256": "0881d5660a8a7045550d09ae0acc15642c24b70de6f08808120f47f86ccdf077"
|
||||
},
|
||||
{
|
||||
"path": "skills/skill-adapter/scripts/validation.sh",
|
||||
"sha256": "92551a29a7f512d2036e4f1fb46c2a3dc6bff0f7dde4a9f699533e446db48502"
|
||||
},
|
||||
{
|
||||
"path": "skills/skill-adapter/scripts/README.md",
|
||||
"sha256": "aac6edc951b6524a56cd2a0b69cf145106117f776e1935c8ab90b828e16cd83f"
|
||||
},
|
||||
{
|
||||
"path": "skills/skill-adapter/assets/dashboard_template.json",
|
||||
"sha256": "a3597b47f572a501ab3639a9b798217b0a5fd5c2cdba07691e9664851fcbe09f"
|
||||
},
|
||||
{
|
||||
"path": "skills/skill-adapter/assets/test-data.json",
|
||||
"sha256": "ac17dca3d6e253a5f39f2a2f1b388e5146043756b05d9ce7ac53a0042eee139d"
|
||||
},
|
||||
{
|
||||
"path": "skills/skill-adapter/assets/example_dashboard_config.yaml",
|
||||
"sha256": "c9a5f99da14bc7e2e1a9e8fdd2c21255533e80629a8894a4831fc7f89ea18244"
|
||||
},
|
||||
{
|
||||
"path": "skills/skill-adapter/assets/visualization_examples.md",
|
||||
"sha256": "84e9b3318d54f99e0be8e8fba2a680e3d47bde29e8de15e3cc26800231b5c7ea"
|
||||
},
|
||||
{
|
||||
"path": "skills/skill-adapter/assets/README.md",
|
||||
"sha256": "a3934d5e3b4e7fcf187e20809e0e39b5a9aa9b6d78489897b8e88c676dca66ba"
|
||||
},
|
||||
{
|
||||
"path": "skills/skill-adapter/assets/skill-schema.json",
|
||||
"sha256": "f5639ba823a24c9ac4fb21444c0717b7aefde1a4993682897f5bf544f863c2cd"
|
||||
},
|
||||
{
|
||||
"path": "skills/skill-adapter/assets/config-template.json",
|
||||
"sha256": "0c2ba33d2d3c5ccb266c0848fc43caa68a2aa6a80ff315d4b378352711f83e1c"
|
||||
}
|
||||
],
|
||||
"dirSha256": "44aa3050002c5dd367a146cbb791c252fd7e11bbf902b9d96b3c84b894627c0e"
|
||||
},
|
||||
"security": {
|
||||
"scannedAt": null,
|
||||
"scannerVersion": null,
|
||||
"flags": []
|
||||
}
|
||||
}
|
||||
7
skills/skill-adapter/assets/README.md
Normal file
7
skills/skill-adapter/assets/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Assets
|
||||
|
||||
Bundled resources for api-monitoring-dashboard skill
|
||||
|
||||
- [ ] dashboard_template.json: JSON template for creating a basic API monitoring dashboard.
|
||||
- [ ] example_dashboard_config.yaml: Example configuration file for defining API endpoints, metrics, and alerting rules.
|
||||
- [ ] visualization_examples.md: Examples of different visualizations (e.g., line charts, bar graphs) for displaying API metrics.
|
||||
32
skills/skill-adapter/assets/config-template.json
Normal file
32
skills/skill-adapter/assets/config-template.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"skill": {
|
||||
"name": "skill-name",
|
||||
"version": "1.0.0",
|
||||
"enabled": true,
|
||||
"settings": {
|
||||
"verbose": false,
|
||||
"autoActivate": true,
|
||||
"toolRestrictions": true
|
||||
}
|
||||
},
|
||||
"triggers": {
|
||||
"keywords": [
|
||||
"example-trigger-1",
|
||||
"example-trigger-2"
|
||||
],
|
||||
"patterns": []
|
||||
},
|
||||
"tools": {
|
||||
"allowed": [
|
||||
"Read",
|
||||
"Grep",
|
||||
"Bash"
|
||||
],
|
||||
"restricted": []
|
||||
},
|
||||
"metadata": {
|
||||
"author": "Plugin Author",
|
||||
"category": "general",
|
||||
"tags": []
|
||||
}
|
||||
}
|
||||
90
skills/skill-adapter/assets/dashboard_template.json
Normal file
90
skills/skill-adapter/assets/dashboard_template.json
Normal file
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"_comment": "Template for creating an API monitoring dashboard. This JSON defines the basic structure and sample data for visualizing API health, metrics, and alerts.",
|
||||
"dashboard_name": "API Performance Dashboard",
|
||||
"description": "A comprehensive dashboard for monitoring the health and performance of your APIs.",
|
||||
"data_source": "Prometheus",
|
||||
"refresh_interval": "5m",
|
||||
"panels": [
|
||||
{
|
||||
"panel_id": 1,
|
||||
"title": "API Request Rate",
|
||||
"type": "timeseries",
|
||||
"_comment": "Visualizes the number of API requests over time.",
|
||||
"query": "rate(http_requests_total[5m])",
|
||||
"legend": "{{method}} {{path}}",
|
||||
"unit": "req/s",
|
||||
"axis_format": "short"
|
||||
},
|
||||
{
|
||||
"panel_id": 2,
|
||||
"title": "API Error Rate (5xx)",
|
||||
"type": "timeseries",
|
||||
"_comment": "Displays the error rate of API requests resulting in 5xx errors.",
|
||||
"query": "rate(http_requests_total{status=~'5.*'}[5m])",
|
||||
"legend": "{{method}} {{path}}",
|
||||
"unit": "%",
|
||||
"axis_format": "percent",
|
||||
"transform": "multiply_by_100"
|
||||
},
|
||||
{
|
||||
"panel_id": 3,
|
||||
"title": "Average API Response Time",
|
||||
"type": "timeseries",
|
||||
"_comment": "Tracks the average response time of API requests.",
|
||||
"query": "avg(http_request_duration_seconds_sum) / avg(http_request_duration_seconds_count)",
|
||||
"legend": "{{method}} {{path}}",
|
||||
"unit": "ms",
|
||||
"axis_format": "short",
|
||||
"transform": "multiply_by_1000"
|
||||
},
|
||||
{
|
||||
"panel_id": 4,
|
||||
"title": "API Latency (P95)",
|
||||
"type": "timeseries",
|
||||
"_comment": "Shows the 95th percentile latency of API requests.",
|
||||
"query": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket[5m])) by (le))",
|
||||
"legend": "{{method}} {{path}}",
|
||||
"unit": "ms",
|
||||
"axis_format": "short",
|
||||
"transform": "multiply_by_1000"
|
||||
},
|
||||
{
|
||||
"panel_id": 5,
|
||||
"title": "API Status Codes",
|
||||
"type": "stat",
|
||||
"_comment": "Displays the distribution of API status codes.",
|
||||
"query": "sum(http_requests_total) by (status)",
|
||||
"unit": "total",
|
||||
"color_thresholds": [
|
||||
{ "value": 0, "color": "green" },
|
||||
{ "value": 1000, "color": "yellow" },
|
||||
{ "value": 5000, "color": "red" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"panel_id": 6,
|
||||
"title": "Alerts",
|
||||
"type": "table",
|
||||
"_comment": "Displays active alerts related to API performance.",
|
||||
"query": "ALERTS{}",
|
||||
"columns": ["alertname", "severity", "description", "value"]
|
||||
}
|
||||
],
|
||||
"variables": [
|
||||
{
|
||||
"name": "namespace",
|
||||
"label": "Namespace",
|
||||
"query": "label_values(namespace)",
|
||||
"multi": true,
|
||||
"includeAll": true
|
||||
},
|
||||
{
|
||||
"name": "service",
|
||||
"label": "Service",
|
||||
"query": "label_values(service, namespace='$namespace')",
|
||||
"multi": true,
|
||||
"includeAll": true
|
||||
}
|
||||
],
|
||||
"tags": ["api", "monitoring", "performance", "health"]
|
||||
}
|
||||
113
skills/skill-adapter/assets/example_dashboard_config.yaml
Normal file
113
skills/skill-adapter/assets/example_dashboard_config.yaml
Normal file
@@ -0,0 +1,113 @@
|
||||
# Configuration file for API Monitoring Dashboard Plugin
|
||||
|
||||
# API Endpoints to Monitor
|
||||
api_endpoints:
|
||||
# Each entry defines an API endpoint to be monitored.
|
||||
- name: "User Service API" # Descriptive name for the API
|
||||
url: "https://api.example.com/users" # The actual API endpoint URL
|
||||
method: "GET" # HTTP method (GET, POST, PUT, DELETE, etc.)
|
||||
expected_status_code: 200 # Expected HTTP status code for a successful response
|
||||
timeout: 5 # Timeout in seconds for the API request
|
||||
headers: # Optional headers to include in the API request
|
||||
Content-Type: "application/json"
|
||||
Authorization: "Bearer REPLACE_ME"
|
||||
- name: "Product Service API"
|
||||
url: "https://api.example.com/products"
|
||||
method: "GET"
|
||||
expected_status_code: 200
|
||||
timeout: 5
|
||||
- name: "Order Service API (POST)"
|
||||
url: "https://api.example.com/orders"
|
||||
method: "POST"
|
||||
expected_status_code: 201
|
||||
timeout: 10
|
||||
data: # Example data for POST requests (can be a placeholder)
|
||||
item_id: 123
|
||||
quantity: 2
|
||||
- name: "Authentication API"
|
||||
url: "https://auth.example.com/login"
|
||||
method: "POST"
|
||||
expected_status_code: 200
|
||||
timeout: 5
|
||||
data:
|
||||
username: "YOUR_USERNAME"
|
||||
password: "YOUR_PASSWORD"
|
||||
|
||||
# Metrics to Collect and Display
|
||||
metrics:
|
||||
# Each entry defines a metric to be collected from the API response.
|
||||
- name: "Response Time (ms)" # Descriptive name for the metric
|
||||
endpoint: "User Service API" # The API endpoint to collect the metric from (must match an entry in api_endpoints)
|
||||
json_path: "response_time" # JSON path to extract the metric value from the response (if applicable)
|
||||
unit: "ms" # Unit of measurement for the metric
|
||||
type: "number" # Data type of the metric (number, string, boolean)
|
||||
- name: "Data Size (KB)"
|
||||
endpoint: "Product Service API"
|
||||
json_path: "data_size"
|
||||
unit: "KB"
|
||||
type: "number"
|
||||
- name: "Error Count"
|
||||
endpoint: "Order Service API (POST)"
|
||||
json_path: "error_count"
|
||||
unit: "count"
|
||||
type: "number"
|
||||
- name: "Login Success Rate"
|
||||
endpoint: "Authentication API"
|
||||
json_path: "success_rate"
|
||||
unit: "%"
|
||||
type: "number"
|
||||
|
||||
# Alerting Rules
|
||||
alerts:
|
||||
# Each entry defines an alerting rule.
|
||||
- name: "High Response Time" # Descriptive name for the alert
|
||||
metric: "Response Time (ms)" # The metric to monitor (must match an entry in metrics)
|
||||
threshold: 200 # Threshold value for the alert
|
||||
operator: ">" # Operator to compare the metric value with the threshold (>, <, >=, <=, ==, !=)
|
||||
severity: "critical" # Severity of the alert (critical, warning, info)
|
||||
notification_channels: # List of notification channels to send the alert to
|
||||
- "email"
|
||||
- "slack"
|
||||
- name: "Low Data Size"
|
||||
metric: "Data Size (KB)"
|
||||
threshold: 10
|
||||
operator: "<"
|
||||
severity: "warning"
|
||||
notification_channels:
|
||||
- "email"
|
||||
- name: "High Error Count"
|
||||
metric: "Error Count"
|
||||
threshold: 5
|
||||
operator: ">="
|
||||
severity: "critical"
|
||||
notification_channels:
|
||||
- "slack"
|
||||
- name: "Low Login Success Rate"
|
||||
metric: "Login Success Rate"
|
||||
threshold: 90
|
||||
operator: "<"
|
||||
severity: "warning"
|
||||
notification_channels:
|
||||
- "email"
|
||||
|
||||
# Notification Channel Configurations (REPLACE_ME)
|
||||
notification_channels_config:
|
||||
email:
|
||||
smtp_server: "smtp.example.com"
|
||||
smtp_port: 587
|
||||
sender_email: "monitoring@example.com"
|
||||
recipient_email: "alerts@example.com"
|
||||
smtp_username: "YOUR_SMTP_USERNAME"
|
||||
smtp_password: "YOUR_SMTP_PASSWORD"
|
||||
slack:
|
||||
slack_webhook_url: "YOUR_SLACK_WEBHOOK_URL"
|
||||
|
||||
# Dashboard Configuration
|
||||
dashboard:
|
||||
title: "API Monitoring Dashboard"
|
||||
refresh_interval: 60 # Refresh interval in seconds
|
||||
layout: # Define the layout of the dashboard (example only)
|
||||
- "User Service API": ["Response Time (ms)"]
|
||||
- "Product Service API": ["Data Size (KB)"]
|
||||
- "Order Service API (POST)": ["Error Count"]
|
||||
- "Authentication API": ["Login Success Rate"]
|
||||
28
skills/skill-adapter/assets/skill-schema.json
Normal file
28
skills/skill-adapter/assets/skill-schema.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "Claude Skill Configuration",
|
||||
"type": "object",
|
||||
"required": ["name", "description"],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9-]+$",
|
||||
"maxLength": 64,
|
||||
"description": "Skill identifier (lowercase, hyphens only)"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"maxLength": 1024,
|
||||
"description": "What the skill does and when to use it"
|
||||
},
|
||||
"allowed-tools": {
|
||||
"type": "string",
|
||||
"description": "Comma-separated list of allowed tools"
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
||||
"description": "Semantic version (x.y.z)"
|
||||
}
|
||||
}
|
||||
}
|
||||
27
skills/skill-adapter/assets/test-data.json
Normal file
27
skills/skill-adapter/assets/test-data.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"testCases": [
|
||||
{
|
||||
"name": "Basic activation test",
|
||||
"input": "trigger phrase example",
|
||||
"expected": {
|
||||
"activated": true,
|
||||
"toolsUsed": ["Read", "Grep"],
|
||||
"success": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Complex workflow test",
|
||||
"input": "multi-step trigger example",
|
||||
"expected": {
|
||||
"activated": true,
|
||||
"steps": 3,
|
||||
"toolsUsed": ["Read", "Write", "Bash"],
|
||||
"success": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"fixtures": {
|
||||
"sampleInput": "example data",
|
||||
"expectedOutput": "processed result"
|
||||
}
|
||||
}
|
||||
122
skills/skill-adapter/assets/visualization_examples.md
Normal file
122
skills/skill-adapter/assets/visualization_examples.md
Normal file
@@ -0,0 +1,122 @@
|
||||
# API Monitoring Dashboard: Visualization Examples
|
||||
|
||||
This document provides examples of different visualizations you can use in your API monitoring dashboards, created with the `api-monitoring-dashboard` plugin. Use these examples as inspiration and adapt them to your specific API and monitoring needs.
|
||||
|
||||
## 1. Line Charts: Time-Series Data
|
||||
|
||||
Line charts are excellent for visualizing trends over time. They are particularly useful for showing API response times, request rates, and error rates.
|
||||
|
||||
**Example:** API Response Time over the Past 24 Hours
|
||||
|
||||
* **Metric:** Average API Response Time (milliseconds)
|
||||
* **Time Range:** Past 24 hours
|
||||
* **Granularity:** 1 hour
|
||||
* **Visualization:** Line Chart
|
||||
* **Data Source:** [Placeholder: Your API Monitoring Data Source (e.g., Prometheus, Datadog, New Relic)]
|
||||
|
||||
**Instructions:**
|
||||
|
||||
1. Configure your data source to collect API response time data.
|
||||
2. Specify the time range and granularity for the chart. Shorter granularities (e.g., 5 minutes) are useful for identifying short-term spikes, while longer granularities (e.g., 1 hour) are better for identifying long-term trends.
|
||||
3. Ensure your data source returns data in a format compatible with the charting library used by the `api-monitoring-dashboard` plugin.
|
||||
|
||||
**Placeholder for Chart Image (Optional):**
|
||||
|
||||
[Insert Image of API Response Time Line Chart Here]
|
||||
|
||||
## 2. Bar Graphs: Categorical Data
|
||||
|
||||
Bar graphs are useful for comparing different categories of data, such as API endpoints, HTTP status codes, or geographic regions.
|
||||
|
||||
**Example:** API Request Count by Endpoint
|
||||
|
||||
* **Metric:** Number of API Requests
|
||||
* **Category:** API Endpoint (e.g., `/users`, `/products`, `/orders`)
|
||||
* **Time Range:** Past 7 days
|
||||
* **Visualization:** Bar Graph
|
||||
* **Data Source:** [Placeholder: Your API Monitoring Data Source]
|
||||
|
||||
**Instructions:**
|
||||
|
||||
1. Configure your data source to track API requests by endpoint.
|
||||
2. Specify the time range for the chart.
|
||||
3. Consider using different colors to represent different API endpoints.
|
||||
|
||||
**Placeholder for Chart Image (Optional):**
|
||||
|
||||
[Insert Image of API Request Count Bar Graph Here]
|
||||
|
||||
## 3. Gauge Charts: Single Value Performance
|
||||
|
||||
Gauge charts are effective for displaying a single, critical performance metric and its current status relative to a threshold.
|
||||
|
||||
**Example:** CPU Utilization of API Server
|
||||
|
||||
* **Metric:** CPU Utilization (%)
|
||||
* **Threshold:** 80% (Warning), 95% (Critical)
|
||||
* **Visualization:** Gauge Chart
|
||||
* **Data Source:** [Placeholder: Your Server Monitoring Data Source]
|
||||
|
||||
**Instructions:**
|
||||
|
||||
1. Configure your server monitoring data source to collect CPU utilization data.
|
||||
2. Define appropriate thresholds for warning and critical levels. These thresholds should be based on your API's performance requirements and resource constraints.
|
||||
3. The gauge chart should visually indicate when the metric exceeds the warning or critical thresholds.
|
||||
|
||||
**Placeholder for Chart Image (Optional):**
|
||||
|
||||
[Insert Image of CPU Utilization Gauge Chart Here]
|
||||
|
||||
## 4. Heatmaps: Correlation and Density
|
||||
|
||||
Heatmaps are useful for visualizing correlations between different metrics or the density of events over time.
|
||||
|
||||
**Example:** Latency Distribution by API Endpoint and Time of Day
|
||||
|
||||
* **Metric:** API Latency (milliseconds)
|
||||
* **X-Axis:** API Endpoint
|
||||
* **Y-Axis:** Time of Day
|
||||
* **Visualization:** Heatmap
|
||||
* **Data Source:** [Placeholder: Your API Monitoring Data Source]
|
||||
|
||||
**Instructions:**
|
||||
|
||||
1. Configure your data source to track API latency by endpoint and time of day.
|
||||
2. Choose a color palette that effectively represents the range of latency values.
|
||||
3. Consider using a logarithmic scale for the latency values to better visualize variations in the data.
|
||||
|
||||
**Placeholder for Chart Image (Optional):**
|
||||
|
||||
[Insert Image of Latency Distribution Heatmap Here]
|
||||
|
||||
## 5. Tables: Detailed Data
|
||||
|
||||
Tables are useful for displaying detailed data and allowing users to sort and filter the data.
|
||||
|
||||
**Example:** Recent API Errors
|
||||
|
||||
* **Columns:** Timestamp, API Endpoint, HTTP Status Code, Error Message, Client IP Address
|
||||
* **Data Source:** [Placeholder: Your API Error Logs]
|
||||
* **Visualization:** Table
|
||||
|
||||
**Instructions:**
|
||||
|
||||
1. Configure your data source to collect detailed API error logs.
|
||||
2. Include relevant columns in the table, such as timestamp, API endpoint, HTTP status code, error message, and client IP address.
|
||||
3. Allow users to sort and filter the data by different columns.
|
||||
|
||||
**Placeholder for Table Data (Example):**
|
||||
|
||||
| Timestamp | API Endpoint | HTTP Status Code | Error Message | Client IP Address |
|
||||
|---|---|---|---|---|
|
||||
| 2023-10-27 10:00:00 | /users | 500 | Internal Server Error | 192.168.1.100 |
|
||||
| 2023-10-27 10:01:00 | /products | 404 | Not Found | 192.168.1.101 |
|
||||
| 2023-10-27 10:02:00 | /orders | 503 | Service Unavailable | 192.168.1.102 |
|
||||
|
||||
## Important Considerations
|
||||
|
||||
* **Data Source Integration:** Ensure the `api-monitoring-dashboard` plugin can seamlessly integrate with your existing monitoring data sources. Provide clear instructions on how to configure these integrations.
|
||||
* **Customization:** Allow users to customize the appearance and behavior of the visualizations, such as color palettes, axis labels, and threshold values.
|
||||
* **Alerting:** Integrate alerts with the visualizations to notify users when critical performance metrics exceed predefined thresholds.
|
||||
* **Accessibility:** Ensure the visualizations are accessible to users with disabilities, following WCAG guidelines.
|
||||
* **Performance:** Optimize the visualizations for performance, especially when dealing with large datasets.
|
||||
7
skills/skill-adapter/references/README.md
Normal file
7
skills/skill-adapter/references/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# References
|
||||
|
||||
Bundled resources for api-monitoring-dashboard skill
|
||||
|
||||
- [ ] api_metrics_reference.md: Documentation on available API metrics, their definitions, and how to interpret them.
|
||||
- [ ] dashboard_templates.md: Pre-defined dashboard templates for different API types (e.g., REST, GraphQL) and use cases (e.g., performance monitoring, error tracking).
|
||||
- [ ] alerting_strategies.md: Best practices for setting up alerts and notifications based on API metrics and thresholds.
|
||||
69
skills/skill-adapter/references/best-practices.md
Normal file
69
skills/skill-adapter/references/best-practices.md
Normal file
@@ -0,0 +1,69 @@
|
||||
# Skill Best Practices
|
||||
|
||||
Guidelines for optimal skill usage and development.
|
||||
|
||||
## For Users
|
||||
|
||||
### Activation Best Practices
|
||||
|
||||
1. **Use Clear Trigger Phrases**
|
||||
- Match phrases from skill description
|
||||
- Be specific about intent
|
||||
- Provide necessary context
|
||||
|
||||
2. **Provide Sufficient Context**
|
||||
- Include relevant file paths
|
||||
- Specify scope of analysis
|
||||
- Mention any constraints
|
||||
|
||||
3. **Understand Tool Permissions**
|
||||
- Check allowed-tools in frontmatter
|
||||
- Know what the skill can/cannot do
|
||||
- Request appropriate actions
|
||||
|
||||
### Workflow Optimization
|
||||
|
||||
- Start with simple requests
|
||||
- Build up to complex workflows
|
||||
- Verify each step before proceeding
|
||||
- Use skill consistently for related tasks
|
||||
|
||||
## For Developers
|
||||
|
||||
### Skill Development Guidelines
|
||||
|
||||
1. **Clear Descriptions**
|
||||
- Include explicit trigger phrases
|
||||
- Document all capabilities
|
||||
- Specify limitations
|
||||
|
||||
2. **Proper Tool Permissions**
|
||||
- Use minimal necessary tools
|
||||
- Document security implications
|
||||
- Test with restricted tools
|
||||
|
||||
3. **Comprehensive Documentation**
|
||||
- Provide usage examples
|
||||
- Document common pitfalls
|
||||
- Include troubleshooting guide
|
||||
|
||||
### Maintenance
|
||||
|
||||
- Keep version updated
|
||||
- Test after tool updates
|
||||
- Monitor user feedback
|
||||
- Iterate on descriptions
|
||||
|
||||
## Performance Tips
|
||||
|
||||
- Scope skills to specific domains
|
||||
- Avoid overlapping trigger phrases
|
||||
- Keep descriptions under 1024 chars
|
||||
- Test activation reliability
|
||||
|
||||
## Security Considerations
|
||||
|
||||
- Never include secrets in skill files
|
||||
- Validate all inputs
|
||||
- Use read-only tools when possible
|
||||
- Document security requirements
|
||||
70
skills/skill-adapter/references/examples.md
Normal file
70
skills/skill-adapter/references/examples.md
Normal file
@@ -0,0 +1,70 @@
|
||||
# Skill Usage Examples
|
||||
|
||||
This document provides practical examples of how to use this skill effectively.
|
||||
|
||||
## Basic Usage
|
||||
|
||||
### Example 1: Simple Activation
|
||||
|
||||
**User Request:**
|
||||
```
|
||||
[Describe trigger phrase here]
|
||||
```
|
||||
|
||||
**Skill Response:**
|
||||
1. Analyzes the request
|
||||
2. Performs the required action
|
||||
3. Returns results
|
||||
|
||||
### Example 2: Complex Workflow
|
||||
|
||||
**User Request:**
|
||||
```
|
||||
[Describe complex scenario]
|
||||
```
|
||||
|
||||
**Workflow:**
|
||||
1. Step 1: Initial analysis
|
||||
2. Step 2: Data processing
|
||||
3. Step 3: Result generation
|
||||
4. Step 4: Validation
|
||||
|
||||
## Advanced Patterns
|
||||
|
||||
### Pattern 1: Chaining Operations
|
||||
|
||||
Combine this skill with other tools:
|
||||
```
|
||||
Step 1: Use this skill for [purpose]
|
||||
Step 2: Chain with [other tool]
|
||||
Step 3: Finalize with [action]
|
||||
```
|
||||
|
||||
### Pattern 2: Error Handling
|
||||
|
||||
If issues occur:
|
||||
- Check trigger phrase matches
|
||||
- Verify context is available
|
||||
- Review allowed-tools permissions
|
||||
|
||||
## Tips & Best Practices
|
||||
|
||||
- ✅ Be specific with trigger phrases
|
||||
- ✅ Provide necessary context
|
||||
- ✅ Check tool permissions match needs
|
||||
- ❌ Avoid vague requests
|
||||
- ❌ Don't mix unrelated tasks
|
||||
|
||||
## Common Issues
|
||||
|
||||
**Issue:** Skill doesn't activate
|
||||
**Solution:** Use exact trigger phrases from description
|
||||
|
||||
**Issue:** Unexpected results
|
||||
**Solution:** Check input format and context
|
||||
|
||||
## See Also
|
||||
|
||||
- Main SKILL.md for full documentation
|
||||
- scripts/ for automation helpers
|
||||
- assets/ for configuration examples
|
||||
7
skills/skill-adapter/scripts/README.md
Normal file
7
skills/skill-adapter/scripts/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Scripts
|
||||
|
||||
Bundled resources for api-monitoring-dashboard skill
|
||||
|
||||
- [ ] create_dashboard.py: Automates the creation of API monitoring dashboards based on user-defined metrics and thresholds.
|
||||
- [ ] update_dashboard.py: Updates existing API monitoring dashboards with new metrics, alerts, or visualizations.
|
||||
- [ ] get_api_metrics.py: Fetches API metrics from various sources (e.g., Prometheus, Datadog) based on API endpoints and time ranges.
|
||||
42
skills/skill-adapter/scripts/helper-template.sh
Executable file
42
skills/skill-adapter/scripts/helper-template.sh
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
# Helper script template for skill automation
|
||||
# Customize this for your skill's specific needs
|
||||
|
||||
set -e
|
||||
|
||||
function show_usage() {
|
||||
echo "Usage: $0 [options]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " -h, --help Show this help message"
|
||||
echo " -v, --verbose Enable verbose output"
|
||||
echo ""
|
||||
}
|
||||
|
||||
# Parse arguments
|
||||
VERBOSE=false
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
-h|--help)
|
||||
show_usage
|
||||
exit 0
|
||||
;;
|
||||
-v|--verbose)
|
||||
VERBOSE=true
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $1"
|
||||
show_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Your skill logic here
|
||||
if [ "$VERBOSE" = true ]; then
|
||||
echo "Running skill automation..."
|
||||
fi
|
||||
|
||||
echo "✅ Complete"
|
||||
32
skills/skill-adapter/scripts/validation.sh
Executable file
32
skills/skill-adapter/scripts/validation.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
# Skill validation helper
|
||||
# Validates skill activation and functionality
|
||||
|
||||
set -e
|
||||
|
||||
echo "🔍 Validating skill..."
|
||||
|
||||
# Check if SKILL.md exists
|
||||
if [ ! -f "../SKILL.md" ]; then
|
||||
echo "❌ Error: SKILL.md not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Validate frontmatter
|
||||
if ! grep -q "^---$" "../SKILL.md"; then
|
||||
echo "❌ Error: No frontmatter found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check required fields
|
||||
if ! grep -q "^name:" "../SKILL.md"; then
|
||||
echo "❌ Error: Missing 'name' field"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -q "^description:" "../SKILL.md"; then
|
||||
echo "❌ Error: Missing 'description' field"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✅ Skill validation passed"
|
||||
Reference in New Issue
Block a user