Baoyu Skills helps users to streamline their daily tasks with intelligent automation, enhancing productivity and efficiency. Experience the convenience of an AI assistant that learns and adapts to your needs.
npx skills add sh/jimliuBaoyu Skills is an AI agent designed to help users streamline their daily tasks through intelligent automation. It enhances productivity and efficiency by learning from your work patterns and adapting to your specific needs. This development-category skill provides automated assistance that evolves with your requirements, making routine tasks easier to manage.
1. **Identify the task**: Replace [TASK] with your specific monitoring goal (e.g., 'database connection failures' or 'CPU throttling in Kubernetes pods'). 2. **Gather metrics**: Research Prometheus metrics relevant to your task using tools like `http://<prometheus-server>/metrics` or the Prometheus documentation. 3. **Write the PromQL query**: Use the Prometheus console (or Grafana) to refine your query until it accurately detects the issue. 4. **Configure the alert rule**: Save the YAML rule in your Prometheus `alert.rules.yml` and reload Prometheus (`curl -X POST http://<prometheus-server>/-/reload`). 5. **Set up notifications**: Configure Alertmanager to route alerts to your preferred channel (Slack, Email, PagerDuty) using the `route` and `receivers` sections in `alertmanager.yml`. **Tips**: - Use `promtool` to validate rules before deploying. - Start with a broad query and refine it with filters (e.g., `job="api-server"`). - Test alerts in a staging environment first to avoid false positives.
Task automation
Personalized reminders
Data organization
npx skills add sh/jimliugit clone https://github.com/sh/jimliuCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Act as a Prometheus expert and help me automate [TASK] using Prometheus's alerting and monitoring capabilities. Start by identifying the key metrics I should monitor for [TASK], then write a PromQL query to detect anomalies or thresholds. Finally, suggest an alert rule in YAML format to notify the team via [CHANNEL: Email/Slack/PagerDuty] when issues arise. Include a brief explanation of how to test the alert locally using promtool.
Let’s say you want to automate monitoring for high latency in your API endpoints. First, we’d identify these critical metrics: `http_request_duration_seconds_bucket`, `http_requests_total`, and `up` (for service health). A PromQL query to detect anomalies might look like:
```promql
(
sum(rate(http_request_duration_seconds_bucket{le="0.5"}[5m])) by (job) /
sum(rate(http_request_duration_seconds_count[5m])) by (job)
) < 0.95
```
This query checks if fewer than 95% of requests in the last 5 minutes are completing within 0.5 seconds. Next, we’d create an alert rule in `alert.rules.yml`:
```yaml
- alert: HighAPILatency
expr: (
sum(rate(http_request_duration_seconds_bucket{le="0.5"}[5m])) by (job) /
sum(rate(http_request_duration_seconds_count[5m])) by (job)
) < 0.95
for: 5m
labels:
severity: warning
annotations:
summary: "High API latency detected for {{ $labels.job }}"
description: "Only {{ $value }}% of requests are completing within 0.5s in the last 5 minutes."
```
To test this locally, install `promtool` and run:
```bash
promtool check rules alert.rules.yml
promtool test rules test-alert.yml
```
The alert will trigger in Prometheus and send a notification to your Slack channel `#dev-alerts` via the Prometheus Alertmanager configuration.Control SaaS spending with visibility and analytics
Automate your browser workflows effortlessly
Orchestrate workloads with multi-cloud support, job scheduling, and integrated service discovery features.
Design, document, and generate code for APIs with interactive tools for developers.
CI/CD automation with build configuration as code
Enhance performance monitoring and root cause analysis with real-time distributed tracing.
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan