aio-grafana-diagram

aio-grafana-diagram is a skill for Claude Code from aiocean/claude-plugins. It costs 82 tokens per session (3,179 once invoked), scanned A, original, MIT.

A tool for turning a codebase into Grafana diagrams whose services are connected to Prometheus metrics. Grafana displays monitoring data, while Prometheus collects time-based measurements from systems.

In plain words
What is it for?
Use it to generate Mermaid diagrams from code, bind nodes to metrics, and show health based on threshold values in Grafana.
Why use it?
It connects an architecture view to current service health, making the diagram useful for spotting unhealthy parts of a live system.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the aio-diagramming plugin — 2 skills shipped together

Good fit Use it to generate Mermaid diagrams from code, bind nodes to metrics, and show health based on threshold values in Grafana.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aiocean/claude-plugins/aio-grafana-diagram
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add aiocean/claude-plugins --skill aio-grafana-diagram
Clone the repo
git clone --depth 1 https://github.com/aiocean/claude-plugins

Made for: Claude Code.

Or install aio-diagramming, the plugin that ships this one along with the rest of its 2 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for aio-grafana-diagram

README.md
[![agentmods](https://agentmods.dev/badge/skills/aiocean/claude-plugins/aio-grafana-diagram/github.svg)](https://agentmods.dev/skills/aiocean/claude-plugins/aio-grafana-diagram)
Your own site
<a href="https://agentmods.dev/skills/aiocean/claude-plugins/aio-grafana-diagram"><img src="https://agentmods.dev/badge/skills/aiocean/claude-plugins/aio-grafana-diagram/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for aio-grafana-diagram

Your own site · 80×15
<a href="https://agentmods.dev/skills/aiocean/claude-plugins/aio-grafana-diagram"><img src="https://agentmods.dev/badge/skills/aiocean/claude-plugins/aio-grafana-diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,179 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00082 $0.03179
Opus 5 $0.00041 $0.01589
Sonnet 5 $0.00016 $0.00636
Haiku 4.5 $0.00008 $0.00318

Measured 12d ago against content hash c7d740cc1113, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

aio-grafana-diagram scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/aio-diagramming/skills/aio-grafana-diagram/SKILL.md · 493 lines

How it starts

The opening of the file, as written. The whole thing — 493 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Grafana Dashboard Diagram Generator

Environment

  • grafana-cli: !which grafana-cli 2>/dev/null || echo "NOT INSTALLED"

Objective Workflow

Phase 1: DISCOVER — Analyze Codebase Architecture

Scan the project to identify system components:

  1. Services: Find service entry points, main files, Dockerfiles, docker-compose services
  2. APIs: Identify HTTP routes, gRPC definitions, GraphQL schemas
  3. Data flows: Trace database connections, message queues, cache layers, external API calls
  4. Infrastructure: Load balancers, CDNs, monitoring endpoints from config/infra files
# Example discovery commands
ls docker-compose*.yml Dockerfile* k8s/ infra/ 2>/dev/null
# Look for service definitions, route handlers, DB connection strings

Output a component inventory: [service_name, type, connections[], metrics_available[]]

Phase 2: GENERATE — Create Mermaid Diagram Code

Based on discovered components, generate Mermaid syntax:

  1. Choose diagram type: graph LR (service flow), graph TB (layered arch), sequenceDiagram (request flow)
  2. Create nodes with meaningful IDs matching metric naming conventions (underscores, no special chars)
  3. Use subgraphs to group related services (Frontend, Backend, Data, Infrastructure)
  4. Add edge labels for protocol/relationship types (HTTP, gRPC, TCP, pub/sub)
  5. Keep to 10-15 nodes max for readability

Phase 3: BIND — Map Metrics to Diagram Nodes

For each node, identify and bind a relevant metric:

  1. Match node IDs to available Prometheus/datasource metric aliases
  2. Generate query targets with format: "time_series" (required for diagram binding)
  3. Ensure every query includes a time field — nodes without time series will not update
  4. Set thresholds: Green (healthy), Yellow (degraded), Red (critical)
  5. Use metric composites when a node health depends on multiple signals

Phase 4: OUTPUT — Generate Importable Grafana Panel JSON

Produce a complete panel JSON block ready to paste into a Grafana dashboard:

Read the full file on GitHub · 493 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 493 lines · 82 tokens per session scan A c7d740cc1113

Subscribe to this mod's changes

aio-grafana-diagram is a skill published in the GitHub repository aiocean/claude-plugins (4 stars, last pushed 9d ago), licensed MIT. It adds 82 tokens to every session and 3,179 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

pr-triage

4-phase PR backlog management with audit, deep code review, validated comments, and optional worktree setup. Use when triaging pull requests, catching up on pending code reviews, or managing a backlog of open PRs. Args: 'all' to review all, PR numbers to focus (e.g. '42 57'), 'en'/'fr' for language, no arg = audit…

FlorianBruniaux/claude-code-ultimate-guide · 86 tokens

source-command-audit-whitepapers

Audit version freshness, FR/EN parity, and metadata quality of all whitepapers and recap cards.

FlorianBruniaux/claude-code-ultimate-guide · 26 tokens

audit-agents-skills

Audit Claude Code agents, skills, and commands for quality and production readiness. Use when evaluating skill quality, checking production readiness scores, or comparing agents against best-practice templates.

FlorianBruniaux/claude-code-ultimate-guide · 41 tokens

design-patterns

Detect, suggest, and evaluate GoF design patterns in TypeScript/JavaScript codebases. Use when refactoring code, applying singleton/factory/observer/strategy patterns, reviewing pattern quality, or finding stack-native alternatives for React, Angular, NestJS, and Vue.

FlorianBruniaux/claude-code-ultimate-guide · 59 tokens

eval-agents

Audit Claude Code agents defined in .claude/agents/ for description specificity, model tier appropriateness, tools scoping, and system prompt quality. Detects dispatch ambiguity between agents, flags over-permissive tool grants, and checks for human-in-the-loop patterns that break programmatic orchestration. Use when…

FlorianBruniaux/claude-code-ultimate-guide · 93 tokens

issue-triage

3-phase issue backlog management with audit, deep analysis, and validated triage actions. Use when triaging GitHub issues, sorting bug reports, cleaning up stale tickets, or detecting duplicate issues. Args: 'all' to analyze all, issue numbers to focus (e.g. '42 57'), 'en'/'fr' for language, no arg = audit only.

FlorianBruniaux/claude-code-ultimate-guide · 81 tokens