prometheus-monitoring — скилл для Claude Code: метрики и скрейпинг
Скилл для настройки Prometheus: конфиг скрейпинга, кастомные метрики приложений, правила алертов и service discovery.
npx skills add aj-geddes/useful-ai-prompts --skill prometheus-monitoring -a claude-codeЧто делает prometheus-monitoring
Скилл помогает развернуть сбор метрик Prometheus для приложений и инфраструктуры. Внутри — стартовый prometheus.yml с интервалами скрейпинга, external labels и заданиями для самого Prometheus и node exporter, а также справочники в каталоге references/: конфигурация, метрики на Node.js, интеграция с Python, правила алертов и запуск через Docker Compose.
Отдельный блок — практики именования метрик и работы с лейблами. Скилл советует держать интервал скрейпинга в диапазоне 10–60s и предупреждает про лейблы с неограниченной кардинальностью: именно на них чаще всего ломается хранилище, когда значений становится слишком много. Алерты без runbook он тоже относит к ошибкам.
Правила алертов стоит прогнать до выката в прод. Скилл прямо говорит про тестирование и про мониторинг самого Prometheus — иначе о падении сборщика вы узнаете последним.
Какие задачи решает
- собрать конфиг скрейпинга для приложений и инфраструктуры
- описать кастомные метрики приложения
- настроить service discovery для целей
- написать и проверить правила алертов
- поднять Prometheus локально через Docker Compose
Примеры запросов агенту
- Настрой Prometheus для моего API-сервиса: конфиг скрейпинга и кастомные метрики
- Добавь правило алерта на рост ошибок и проверь его перед деплоем
- Собери docker-compose с Prometheus и node exporter для локальной разработки
Как установить prometheus-monitoring
1Через Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill prometheus-monitoring -a claude-code2Вручную: положить файлы
~/.claude/skills/prometheus-monitoring/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/prometheus-monitoring/
1Через Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill prometheus-monitoring -a codex2Вручную: положить файлы
.agents/skills/prometheus-monitoring/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill prometheus-monitoring -a cursor2Вручную: положить файлы
.cursor/skills/prometheus-monitoring/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install aj-geddes/useful-ai-prompts prometheus-monitoring2Вручную: положить файлы
.github/skills/prometheus-monitoring/SKILL.md1Через Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill prometheus-monitoring -a gemini-cli2Командой платформы
gemini skills install https://github.com/aj-geddes/useful-ai-prompts --path skills/prometheus-monitoringВручную: положить файлы
.devin/skills/prometheus-monitoring/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill prometheus-monitoring -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о prometheus-monitoring
Как установить prometheus-monitoring в Claude?
Выполните npx skills add aj-geddes/useful-ai-prompts --skill prometheus-monitoring -a claude-code. Скилл появится в ~/.claude/skills/prometheus-monitoring/SKILL.md.
Что делает prometheus-monitoring?
Помогает настроить сбор time-series метрик: конфиг скрейпинга, кастомные метрики приложений, service discovery и правила алертов.
Какие языки и стеки разобраны в справочниках?
В references/ есть отдельные руководства по метрикам на Node.js и по интеграции с Python, плюс конфигурация Prometheus, правила алертов и Docker Compose.
Исходный текст
SKILL.md · MIT
---
name: prometheus-monitoring
description: >
Set up Prometheus monitoring for applications with custom metrics, scraping
configurations, and service discovery. Use when implementing time-series
metrics collection, monitoring applications, or building observability
infrastructure.
---
# Prometheus Monitoring
## Table of Contents
- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)
## Overview
Implement comprehensive Prometheus monitoring infrastructure for collecting, storing, and querying time-series metrics from applications and infrastructure.
## When to Use
- Setting up metrics collection
- Creating custom application metrics
- Configuring scraping targets
- Implementing service discovery
- Building monitoring infrastructure
## Quick Start
Minimal working example:
```yaml
# /etc/prometheus/prometheus.yml
global:
scrape_interval: 15s
evaluation_interval: 15s
external_labels:
cluster: production
alerting:
alertmanagers:
- static_configs:
- targets: ["localhost:9093"]
rule_files:
- "/etc/prometheus/alert_rules.yml"
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]
- job_name: "node"
static_configs:
- targets: ["localhost:9100"]
- job_name: "api-service"
// ... (see reference guides for full implementation)
```
## Reference Guides
Detailed implementations in the `references/` directory:
| Guide | Contents |
|---|---|
| [Prometheus Configuration](references/prometheus-configuration.md) | Prometheus Configuration |
| [Node.js Metrics Implementation](references/nodejs-metrics-implementation.md) | Node.js Metrics Implementation |
| [Python Prometheus Integration](references/python-prometheus-integration.md) | Python Prometheus Integration |
| [Alert Rules](references/alert-rules.md) | Alert Rules |
| [Docker Compose Setup](references/docker-compose-setup.md) | Docker Compose Setup |
## Best Practices
### ✅ DO
- Use consistent metric naming conventions
- Add comprehensive labels for filtering
- Set appropriate scrape intervals (10-60s)
- Implement retention policies
- Monitor Prometheus itself
- Test alert rules before deployment
- Document metric meanings
### ❌ DON'T
- Add unbounded cardinality labels
- Scrape too frequently (< 10s)
- Ignore metric naming conventions
- Create alerts without runbooks
- Store raw event data in Prometheus
- Use counters for gauge-like values
© aj-geddes · MIT · aj-geddes/useful-ai-prompts