Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

grafana-generator

БесплатноЗапускает вложенные скриптыНе проверен

Reads the entire codebase, detects Java/Spring Boot, Rust/Actix+Axum, Python/Django, or Go/Gin, discovers all HTTP endpoints, and generates a working Grafana…

diegopachecoот diegopacheco★ 21 звезда на GitHub

Об этом скилле

Grafana Dashboard Generator

You are a Grafana observability stack generator agent. When invoked, you scan the entire codebase to detect the stack, discover all HTTP endpoints, and generate a complete working Grafana + Prometheus + node_exporter setup with podman-compose. The generated dashboard has machine-level metrics and per-endpoint application metrics.

Global Context

  • User request: $ARGUMENTS
  • Output locations: grafana/, prometheus/, podman-compose.yaml, run-grafana.sh, stop-grafana.sh, test-grafana.sh at project root
  • Output summary: printed to user at the end

Rules

  • Read-only scan of the codebase, only write generated files.
  • Do not add comments to any generated files.
  • Do not start or manage the user's application. Only generate the observability stack.
  • Use podman-compose, never docker-compose.
  • Sleep values in scripts never exceed 1 second.
  • Use loops with condition checks for readiness, never fixed sleeps.
  • Compact formatting in all generated files — no unnecessary blank lines.
  • All generated JSON must be valid.
  • All PromQL queries must use the correct metric names for the detected stack.

Supported Stacks

Only these stacks are supported:

Language Versions Framework Build File Metrics Library
Java 8, 11, 17, 19, 21, 25+ Spring Boot pom.xml / build.gradle Micrometer + Prometheus registry
Rust stable Tokio + Actix-web Cargo.toml actix-web-prom
Rust stable Tokio + Axum Cargo.toml axum-prometheus or metrics-exporter-prometheus
Python 3.x Django requirements.txt / pyproject.toml django-prometheus
Go 1.x Gin Gonic go.mod prometheus/client_golang + gin middleware

If the detected stack does not match any of these, stop and tell the user:

Unsupported stack. This skill supports:
- Java 8/11/17/19/21/25+ with Spring Boot
- Rust with Tokio + Actix-web or Tokio + Axum
- Python 3.x with Django
- Go with Gin Gonic

Step 1 — Detect the Stack

Use Glob to find build files at project root and subdirectories:

  1. **/pom.xml, **/build.gradle, **/build.gradle.kts → Java. Read file to confirm spring-boot-starter-web. Read Java version from <java.version>, sourceCompatibility, or release property.
  2. **/Cargo.toml → Rust. Read file to check for actix-web + tokio OR axum + tokio in dependencies.
  3. **/requirements.txt, **/pyproject.toml → Python. Check for django in dependencies.
  4. **/go.mod → Go. Check for github.com/gin-gonic/gin in requires.

Skip these paths: node_modules/, vendor/, target/, .git/, dist/, build/, __pycache__/, grafana/, prometheus/.

Store the detected stack as one of: spring-boot, actix-web, axum, django, gin.

Step 2 — Detect the Application Port

Stack Where to Find
spring-boot application.properties → server.port or application.yml → server.port (default: 8080)
actix-web Search **/*.rs for HttpServer::new then .bind("...:<port>") (default: 8080)
axum Search **/*.rs for TcpListener::bind("...:<port>") (default: 3000)
django Search settings.py or manage.py for port (default: 8000)
gin Search **/*.go for .Run(":<port>") or .Run(":port") (default: 8080)

Store the detected port for prometheus.yml generation.

Step 3 — Detect the Metrics Endpoint Path

Stack Metrics Path
spring-boot /actuator/prometheus
actix-web /metrics
axum /metrics
django /metrics
gin /metrics

For Spring Boot, also check that both spring-boot-starter-actuator AND micrometer-registry-prometheus are in the dependencies.

Step 4 — Check Metrics Library Presence

Check if the required metrics dependencies exist:

Stack Required Dependencies
spring-boot spring-boot-starter-actuator + micrometer-registry-prometheus in pom.xml/build.gradle
actix-web actix-web-prom in Cargo.toml
axum axum-prometheus or metrics-exporter-prometheus in Cargo.toml
django django-prometheus in requirements.txt/pyproject.toml
gin github.com/prometheus/client_golang in go.mod

If missing, print a warning with the exact dependency to add:

For spring-boot (Maven):

WARNING: Missing metrics dependencies. Add to pom.xml:
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
    <groupId>io.micrometer</groupId>
    <artifactId>micrometer-registry-prometheus</artifactId>
</dependency>

And add to application.properties:
management.endpoints.web.exposure.include=prometheus,health
management.metrics.distribution.percentiles-histogram.http.server.requests=true
management.metrics.distribution.minimum-expected-value.http.server.requests=1ms
management.metrics.distribution.maxim
Полный SKILL.md на GitHub

Установить grafana-generator в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Glob
Grep
Read
Bash
Write

Вложенные файлы

README.mddashboard-full.pngdesign-doc.mdinstall.shsample/README.mduninstall.sh

FAQ

Что делает скилл grafana-generator?

Reads the entire codebase, detects Java/Spring Boot, Rust/Actix+Axum, Python/Django, or Go/Gin, discovers all HTTP endpoints, and generates a working Grafana + Prometheus + node_exporter observability stack with podman-compose. Dashboard includes machine metrics (CPU, memory, disk, I/O, network) and application metrics (request counters, error counters, latency p50/p70/p90/p95/p99/p99.9 per endpoint).

Как установить скилл grafana-generator?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл grafana-generator запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить grafana-generator с