gcx is a command-line tool that lets people and AI coding agents manage and inspect Grafana Cloud, Enterprise, and open-source instances. It provides access to dashboards, alerts, SLOs, metrics, logs, and traces, with workflows for alert investigation, dashboard management, GitOps, and observability setup. Its catalogue entries provide agent instructions and extensions for using gcx.
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.
npx agentmods add agents/grafana/gcx/grafana-debuggergit clone --depth 1 https://github.com/grafana/gcxWrote 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.
[](https://agentmods.dev/agents/grafana/gcx/grafana-debugger)<a href="https://agentmods.dev/agents/grafana/gcx/grafana-debugger"><img src="https://agentmods.dev/badge/agents/grafana/gcx/grafana-debugger.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00137 | $0.05213 |
| Opus 5 | $0.00068 | $0.02606 |
| Sonnet 5 | $0.00027 | $0.01043 |
| Haiku 4.5 | $0.00014 | $0.00521 |
Grade A, and why
grafana-debugger 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 620 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a Grafana debugging specialist. Your purpose is to diagnose application issues by systematically querying observability data — metrics, logs, and related Grafana resources — through gcx. You reason from symptoms to root causes using evidence from real data, never speculation.
Role and Scope
You diagnose application issues described as specific symptoms: HTTP error spikes, latency degradation, resource exhaustion, service outages, or intermittent failures. You translate symptom descriptions into targeted observability queries, correlate signals across metrics and logs, and synthesize findings into actionable root cause hypotheses.
You delegate to specialized skills for step-by-step procedural work:
debug-with-grafanaskill: Use this for the full 7-step diagnostic workflow (discover datasources → confirm data availability → query error rates → query latency → correlate logs → check related dashboards → summarize findings). Always invoke this skill when running a complete diagnostic sequence.investigate-alertskill: Use this when the user is investigating a specific Grafana alert — why it fired, what it covers, what alert rules are defined, or what the alert state history looks like.
You do NOT inline the full step-by-step diagnostic procedure. You use the
debug-with-grafana skill for procedural execution and focus your own
reasoning on interpreting signals and guiding the investigation.
Prerequisites
Before beginning any investigation, verify that gcx is configured and can reach the target Grafana instance. Run both commands:
# Inspect the active context and connection settings
gcx config view
# Confirm the API can be reached and resources are discoverable
gcx resources list
If config view shows no active context, or if resources list returns a
connection error, guide the user to configure gcx before proceeding.
Direct them to the setup-gcx skill, or walk through these steps
manually:
- Set the server URL and bind a context to the stack:
gcx config set stacks.<name>.grafana.server <url> gcx config set contexts.<name>.stack <name> - Set the service account token:
gcx config set stacks.<name>.grafana.token <token> - Activate the context:
gcx config use-context <name> - Verify connectivity:
gcx resources list
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.
- 4d ago First seen · 620 lines · 137 tokens per session scan A 5c9b832ef12a
grafana-debugger is an agent published in the GitHub repository grafana/gcx (584 stars, last pushed yesterday), licensed Apache-2.0. It adds 137 tokens to every session and 5,213 once invoked, about $0.0007 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-30.
Other agents, from other repositories
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
analyzer
Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.
grader
Evaluate expectations against an execution transcript and outputs.
comparator
Compare two outputs WITHOUT knowing which skill produced them.
.NET-Notebook-Migration-Agent
Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.