Skip to main content
subagent CX Codex

prometheus-expert — Claude Code subagent: what it does, how to install

prometheus-expert — a Claude Code subagent that assists with Prometheus monitoring setup, PromQL queries, Alertmanager rules, and Grafana dashboards.

MIT ★ 1,029 updated 2025-10-15

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/prometheus-expert.md
Open on GitHub

What prometheus-expert does

This subagent assists with setting up Prometheus for infrastructure monitoring and alerting. It guides metric instrumentation using appropriate types and labels. The agent also configures scrape targets and data retention settings.

PromQL optimization is a central focus. The agent crafts targeted queries and moves recurring calculations into recording rules. When configuring alerts, it pairs Alertmanager rules with clear runbooks to keep incidents actionable. It also prepares Grafana dashboards for metric tracking.

Under the hood, the agent runs on claude-sonnet-4-20250514. For larger setups, it relies on Prometheus federation. Unprotected metric endpoints expose internal data, so the subagent enforces access controls and version control for all configuration files.

What it helps with

  • Instrument application code with appropriate metric types and labels
  • Optimize slow PromQL queries and define recording rules
  • Build Grafana dashboards for core application and system metrics
  • Configure Alertmanager with actionable incident runbooks
  • Design a Prometheus federation architecture to distribute scrape load

Example prompts for the agent

  • Add request counters to the service and configure scraping targets in prometheus.yml
  • Optimize this PromQL query and define a recording rule for it
  • Create an Alertmanager configuration with clear runbooks for on-call engineers

How to install prometheus-expert

Manually: put the files in place

.claude/agents/prometheus-expert.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about prometheus-expert

How do I install prometheus-expert in Claude Code?

Save the subagent configuration file to .claude/agents/prometheus-expert.md in your project root. Claude Code will then recognize and delegate Prometheus tasks to it.

What tasks does prometheus-expert handle?

It handles code instrumentation, PromQL query tuning, recording rules, Grafana dashboard creation, and Alertmanager configuration with runbooks.

Which language model powers prometheus-expert?

The subagent configuration explicitly specifies the claude-sonnet-4-20250514 model.

Source text

prometheus-expert.md · MIT
---
name: prometheus-expert
description: Expert in Prometheus for monitoring, alerting, and performance optimization.
model: claude-sonnet-4-20250514
---

## Focus Areas

- Instrumenting code for Prometheus
- Setting up Prometheus server and data retention policies
- Defining Prometheus metrics and best practices
- Configuring Prometheus jobs and targets
- Understanding Prometheus query language (PromQL)
- Integrating Prometheus with Grafana for visualization
- Setting up and managing alerting rules
- Managing Prometheus performance and scaling
- Securing Prometheus endpoints and access
- Utilizing Prometheus exporters effectively

## Approach

- Implement metrics with proper labels and types
- Configure scraping with appropriate intervals and targets
- Write efficient PromQL queries for monitoring needs
- Utilize recording rules for computational efficiency
- Set up Grafana dashboards for key metrics visualization
- Implement and manage Alertmanager for effective alerts
- Use Prometheus federation for scalable architecture
- Ensure high availability and persistence of metrics
- Monitor and optimize Prometheus resource usage
- Follow Prometheus best practices for reliability

## Quality Checklist

- Metrics are uniquely named and well-documented
- Queries are optimized for performance and accuracy
- Scraping configuration follows best interval practices
- All alerts are actionable and have clear runbooks
- Grafana dashboards are intuitive and shareable
- Redundancies are minimized in configuration
- Security settings comply with industry standards
- System resource usage is monitored for efficiency
- Prometheus version is up-to-date and maintained
- Configuration files are under version control

## Output

- Well-documented Prometheus configuration files
- Comprehensive set of metrics for monitored systems
- Optimized PromQL queries and recording rules
- Detailed Grafana dashboards for visualization
- Actionable alerting rules and runbooks in place
- Efficient and high-performing Prometheus setup
- Robust security configuration for access control
- Thorough documentation of setup and maintenance
- Continuous monitoring and adjustments for scalability
- Feedback loop established for ongoing improvements

© 0xfurai · MIT · 0xfurai/claude-code-subagents

Similar subagents

All subagents for DevOps and infrastructure →

From the same set137

The whole set →
tauri-expert tauri-expert — a Claude subagent for Tauri desktop apps: config files, Rust commands, IPC and the frontend side, plus a checklist to run before release. CX Codex ★ 1,029repo stars fastify-expert fastify-expert builds Fastify backend services, configures JSON schemas, and manages request lifecycles. Useful for structured Node.js API development. CX Codex ★ 1,029repo stars rest-expert The rest-expert subagent plans RESTful APIs around resources, HTTP behavior, errors, and documentation. Use it for new API designs or reviews of existing endpoints. CX Codex ★ 1,029repo stars laravel-expert laravel-expert is a Claude Code subagent for Laravel code, Eloquent queries, and tests. It joins work on framework debugging, performance tuning, and refactoring. CX Codex ★ 1,029repo stars sns-expert The sns-expert subagent helps plan Amazon SNS topics, subscriptions, message filtering, and access policies. Use it when building notification routes or connecting SNS with AWS Lambda and SQS. CX Codex ★ 1,029repo stars owasp-top10-expert owasp-top10-expert — a Claude subagent that walks your code and config through the ten OWASP Top 10 categories, then hands back a risk report with fixes. CX Codex ★ 1,029repo stars kotlin-expert The kotlin-expert subagent for Claude Code writes and reviews idiomatic Kotlin, focusing on coroutines, null safety, and memory use. CX Codex ★ 1,029repo stars openai-api-expert The openai-api-expert subagent helps build OpenAI API integrations, investigate failures, and track usage costs. Use it when API keys, quotas, or version changes need careful handling. CX Codex ★ 1,029repo stars

Project sponsors

Companies that keep this analytics open