Skip to main content
skill CX Codex

prometheus-monitoring — Claude Code skill: metrics and scraping

A skill for setting up Prometheus: scrape configs, custom application metrics, alert rules and service discovery.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aj-geddes/useful-ai-prompts --skill prometheus-monitoring -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/prometheus-monitoring/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/prometheus-monitoring/

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

Similar skills

Everything for DevOps and infrastructure →

From the same set118

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor