prometheus-go-code-review

Review Go code for Prometheus instrumentation best practices.

Updated Feb 17, 2026
One-click install
npx skills add https://github.com/javierhbr/random-poc --skill prometheus-go-code-review-javierhbr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prometheus-go-code-review
Source: https://github.com/javierhbr/random-poc/tree/main/custom-skills/beagle-main/plugins/beagle-go/skills/prometheus-go-code-review
Command: npx skills add https://github.com/javierhbr/random-poc --skill prometheus-go-code-review-javierhbr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps ensure that Prometheus metrics in Go code are implemented correctly, following best practices for performance and reliability.

Core Features & Use Cases

  • Metric Type Validation: Checks if Counter, Gauge, and Histogram types are used appropriately.
  • Label Cardinality Check: Identifies and flags high-cardinality labels that can degrade performance.
  • Naming Conventions: Verifies metric names adhere to standard conventions.
  • Registration Best Practices: Ensures metrics are registered once and not per-request.
  • Use Case: Reviewing a new Go service's code to ensure its Prometheus metrics are efficient and maintainable before merging.

Quick Start

Use the prometheus-go-code-review skill to analyze the provided Go code for Prometheus instrumentation issues.

Frequently Asked Questions about prometheus-go-code-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review Prometheus instrumentation in Go code for best practices?

To review Prometheus instrumentation in Go code, analyze metric types, label cardinality, naming conventions, and registration patterns. This ensures metrics collected via the client_golang library are efficient and reliable before code is merged.

What are common Prometheus metric issues in Go applications?

Common Prometheus metric issues in Go applications include using inappropriate metric types, high-cardinality labels that degrade performance, non-standard naming conventions, and registering metrics per-request instead of once globally.

Does this code review process check for high-cardinality label issues in Prometheus metrics?

Yes, the code review process checks for high-cardinality label issues in Prometheus metrics. It identifies and flags labels that can degrade performance, ensuring efficient metric exposition for Go applications using the client_golang library.

How do I validate metric types and naming conventions in Go Prometheus instrumentation?

To validate metric types and naming conventions in Go Prometheus instrumentation, review the code to verify that Counter, Gauge, and Histogram types are used appropriately and that metric names adhere to standard conventions.

Can I use this to check metric registration patterns in client_golang?

Yes, you can use this to check metric registration patterns in client_golang. It ensures that Prometheus metrics are registered exactly once and not per-request, preventing runtime errors and ensuring reliable metric exposition.