Skip to main content
skill CX Codex

grafana-expert — Claude Code skill: Grafana dashboards and alerting

grafana-expert turns your coding agent into a Grafana hand: dashboard JSON, template variables, alerting and provisioning on Kubernetes.

Apache-2.0 266 installs ★ 45 updated 2026-10-12

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add personamanagmentlayer/pcl --skill grafana-expert -a claude-code
Open on GitHub

What grafana-expert does

The skill gives your agent a Grafana operator's hat. It writes dashboard JSON, picks panel types, wires data sources, sets template variables and alert rules. SKILL.md holds the rules; references/CORE_CONCEPTS.md is pulled in when needed and covers Grafana architecture, Kubernetes installation, dashboard JSON and provisioning.

A chunk of the file is anti-patterns. The agent will split a dashboard that has grown past 10–15 panels, pull a hardcoded namespace into $namespace, swap a fixed range for $__rate_interval and set refresh to 30s rather than 5s. Units and colour thresholds get the same treatment.

It expects Grafana 10.0 or newer and Kubernetes 1.28 or newer. Bash is limited to kubectl and grafana-cli, which is enough to install Grafana and provision dashboards from a ConfigMap. On an older cluster you will be editing the sample manifests yourself.

What it helps with

  • build a dashboard from JSON with variables and thresholds
  • attach annotations to firing alerts
  • provision dashboards through a ConfigMap on Kubernetes
  • split an overloaded dashboard into focused panels
  • replace a hardcoded namespace with a template variable

Example prompts for the agent

  • Build a pod dashboard with $namespace and $pod variables and a 30s refresh.
  • Clean up this dashboard JSON: drop the hardcoded namespace and add units.
  • Install Grafana on the cluster with kubectl and provision dashboards from a ConfigMap.

How to install grafana-expert

1Skills CLI (Vercel)

npx skills add personamanagmentlayer/pcl --skill grafana-expert -a claude-code

2Manually: put the files in place

~/.claude/skills/grafana-expert/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/grafana-expert/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about grafana-expert

How do I install grafana-expert in Claude Code?

Run npx skills add personamanagmentlayer/pcl --skill grafana-expert -a claude-code. The skill lands in ~/.claude/skills/grafana-expert/SKILL.md.

What does grafana-expert do?

It steers your agent through Grafana dashboard work: panel choice, data sources, template variables, alerts and provisioning. Common mistakes such as panel overload or a too-frequent refresh are called out by name.

Which Grafana and Kubernetes versions does it target?

Grafana 10.0 and up, Kubernetes 1.28 and up. The skill runs kubectl and grafana-cli through Bash.

Source text

SKILL.md · Apache-2.0
---
name: grafana-expert
version: 1.1.0
description: >-
  Expert-level Grafana dashboards, visualization, data sources, alerting, and production
  operations. Use when the user mentions dashboards, visualization, monitoring,
  observability, or alerting, or when the task involves Grafana Architecture, Installation
  on Kubernetes, Data Sources, or Dashboard JSON.
category: devops
author: PCL Team
license: Apache-2.0
tags:
  - grafana
  - dashboards
  - visualization
  - monitoring
  - observability
  - alerting
allowed-tools:
  - Read
  - Write
  - Edit
  - Bash(kubectl:*, grafana-cli:*)
  - Glob
  - Grep
requirements:
  grafana: '>=10.0'
  kubernetes: '>=1.28'
---

# Grafana Expert

You are an expert in Grafana with deep knowledge of dashboard creation, panel types, data sources, templating, alerting, and production operations. You design and manage comprehensive visualization and observability systems following Grafana best practices.

## Best Practices

### 1. Use Template Variables

```json
// Query with variables
{
  "expr": "sum(rate(http_requests_total{namespace=\"$namespace\", pod=~\"$pod\"}[$__rate_interval])) by (pod)"
}
```

### 2. Set Appropriate Refresh Rates

```json
// Dashboard refresh
{
  "refresh": "30s" // Production
  // "refresh": "1m"  // Development
}
```

### 3. Use $\_\_rate_interval

```promql
# Better than fixed interval
rate(http_requests_total[$__rate_interval])
```

### 4. Organize with Folders

```
Dashboards/
├── Kubernetes/
│   ├── Cluster Overview
│   └── Pod Monitoring
├── Applications/
│   ├── API Performance
│   └── Database Metrics
└── Infrastructure/
    ├── Node Metrics
    └── Network Traffic
```

### 5. Use Annotations

```json
{
  "annotations": {
    "list": [
      {
        "datasource": "Prometheus",
        "enable": true,
        "expr": "ALERTS{alertstate=\"firing\"}",
        "iconColor": "red",
        "name": "Alerts",
        "tagKeys": "alertname,severity"
      }
    ]
  }
}
```

### 6. Color Thresholds

```json
{
  "thresholds": {
    "mode": "absolute",
    "steps": [
      { "value": null, "color": "green" },
      { "value": 70, "color": "yellow" },
      { "value": 90, "color": "red" }
    ]
  }
}
```

### 7. Dashboard Links

```json
{
  "links": [
    {
      "title": "Related Dashboard",
      "url": "/d/xyz/other-dashboard?var-namespace=$namespace",
      "type": "link",
      "icon": "dashboard"
    }
  ]
}
```

## Anti-Patterns

**1. Too Many Panels:**

```
# BAD: 50+ panels
# GOOD: 10-15 focused panels per dashboard
```

**2. No Variables:**

```json
// BAD: Hardcoded namespace
{
  "expr": "sum(rate(http_requests_total{namespace=\"production\"}[5m]))"
}

// GOOD: Use variables
{
  "expr": "sum(rate(http_requests_total{namespace=\"$namespace\"}[5m]))"
}
```

**3. Short Refresh Intervals:**

```json
// BAD: Too frequent
"refresh": "5s"

// GOOD: Reasonable rate
"refresh": "30s"
```

**4. No Units:**

```json
// GOOD: Always specify units
{
  "unit": "bytes",
  "decimals": 2
}
```

## Approach

When creating Grafana dashboards:

1. **Start with Goals**: Define what you want to monitor
2. **Use Variables**: Make dashboards reusable
3. **Golden Signals**: Latency, Traffic, Errors, Saturation
4. **Organize**: Use folders and consistent naming
5. **Test**: Verify queries and thresholds
6. **Document**: Add descriptions and links
7. **Version Control**: Store JSON in Git
8. **Provision**: Use ConfigMaps for automation

Always design dashboards that are clear, actionable, and maintainable.

## Reference Documentation

Detailed material lives alongside this skill and is read on demand:

- [Core Expertise](references/CORE_CONCEPTS.md) — Grafana Architecture, Installation on Kubernetes, Data Sources, Dashboard JSON, Panel Types, Variables (Templating), Alerting, Dashboard Provisioning

## Resources

- Grafana Documentation: https://grafana.com/docs/
- Dashboard Best Practices: https://grafana.com/docs/grafana/latest/best-practices/
- Community Dashboards: https://grafana.com/grafana/dashboards/
- Grafana Plugins: https://grafana.com/grafana/plugins/

© PCL Team · Apache-2.0 · personamanagmentlayer/pcl

Similar skills

All skills for DevOps and infrastructure →

From the same set104

The whole set →
git-expert git-expert — a skill that hands the agent ready git recipes: undo a commit, rescue work from main, clean up history. Useful once something has already gone wrong. CX Codex +1 279installs python-expert python-expert configures AI coding agents for modern Python development with type hints, PEP 8 standards, async patterns, and tools like uv, poetry, or ruff. CX Codex +1 277installs redis-expert redis-expert is a Claude Code skill for designing Redis-backed features and reviewing existing setups. It covers caching, pub/sub, data structures, and streams. CX Codex +1 272installs php-expert The php-expert skill guides PHP 8+, Laravel, Composer, and PHPUnit work. Use it for modern PHP implementation, testing, and code review. CX Codex +1 269installs research-expert research-expert — a skill that hands the agent working Python for study design and statistics, plus guidance on writing the paper afterwards. CX Codex +1 256installs helm-expert helm-expert is a Claude Code skill for building Helm charts and managing Kubernetes releases. It activates for requests involving charts, templates, or deployments. CX Codex +1 251installs cpp-expert cpp-expert — an agent skill for C++20/23 work: STL, ownership, concurrency and CMake. Handy when the agent has to write or repair modern C++. CX Codex +1 250installs ai-engineer-expert The ai-engineer-expert skill covers LLM integration, RAG, and production AI systems. Use it when an agent needs to design or deploy AI features. CX Codex +1 242installs

More in the catalog

Project sponsors

Companies that keep this analytics open