prometheus-monitoring — Claude Code skill: metrics and scraping
A skill for setting up Prometheus: scrape configs, custom application metrics, alert rules and service discovery.
npx skills add aj-geddes/useful-ai-prompts --skill prometheus-monitoring -a claude-codeWhat prometheus-monitoring does
The skill walks through standing up Prometheus metrics collection for apps and infrastructure. It ships a starter prometheus.yml with scrape intervals, external labels and jobs for Prometheus itself plus node exporter, and a set of guides under references/: configuration, Node.js metrics, Python integration, alert rules and a Docker Compose setup.
There is a section on naming conventions and labels. The skill advises keeping scrape intervals in the 10–60s range and warns against labels with unbounded cardinality — that is where storage tends to break once values pile up. Alerts without runbooks land in the same don't column.
Test alert rules before they reach production. The skill also tells you to monitor Prometheus itself, otherwise you find out the collector died long after it did.
What it helps with
- write a scrape config for apps and infrastructure
- define custom application metrics
- set up service discovery for targets
- author and test alert rules
- run Prometheus locally with Docker Compose
Example prompts for the agent
- Set up Prometheus for my API service: scrape config and custom metrics
- Add an alert rule for error rate growth and test it before deploy
- Build a docker-compose with Prometheus and node exporter for local dev
How to install prometheus-monitoring
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill prometheus-monitoring -a claude-code2Manually: put the files in place
~/.claude/skills/prometheus-monitoring/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/prometheus-monitoring/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill prometheus-monitoring -a codex2Manually: put the files in place
.agents/skills/prometheus-monitoring/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill prometheus-monitoring -a cursor2Manually: put the files in place
.cursor/skills/prometheus-monitoring/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aj-geddes/useful-ai-prompts prometheus-monitoring2Manually: put the files in place
.github/skills/prometheus-monitoring/SKILL.md1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill prometheus-monitoring -a gemini-cli2Platform CLI
gemini skills install https://github.com/aj-geddes/useful-ai-prompts --path skills/prometheus-monitoringManually: put the files in place
.devin/skills/prometheus-monitoring/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill prometheus-monitoring -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about prometheus-monitoring
How do I install prometheus-monitoring in Claude?
Run npx skills add aj-geddes/useful-ai-prompts --skill prometheus-monitoring -a claude-code. The skill lands at ~/.claude/skills/prometheus-monitoring/SKILL.md.
What does prometheus-monitoring do?
It helps you set up time-series metrics collection: scrape configs, custom application metrics, service discovery and alert rules.
Which stacks do the reference guides cover?
references/ includes separate guides for Node.js metrics and Python integration, alongside Prometheus configuration, alert rules and Docker Compose.
Source text
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