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 skills/grafana/gcx/add-datasourcenpx skills add grafana/gcx --skill add-datasourcegit 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/skills/grafana/gcx/add-datasource)<a href="https://agentmods.dev/skills/grafana/gcx/add-datasource"><img src="https://agentmods.dev/badge/skills/grafana/gcx/add-datasource.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.00127 | $0.05464 |
| Opus 5 | $0.00063 | $0.02732 |
| Sonnet 5 | $0.00025 | $0.01093 |
| Haiku 4.5 | $0.00013 | $0.00546 |
Grade A, and why
add-datasource 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 5d 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 — 491 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add Datasource Type
Orchestrates adding a new datasource type plugin — from API discovery through verified implementation. Three stages, worked autonomously: the stage boundaries are checkpoints you satisfy, not approvals you wait for.
When to Use
- User wants gcx CLI support for a datasource type gcx does not yet support
- User says "add support for an unsupported datasource type", "new datasource type"
- A task references datasource type implementation
When NOT to use:
- The user wants a datasource instance, not a type. "Add a datasource" most
often means creating or configuring one in a Grafana stack — that is
gcx datasources create/update, already shipped. This skill writes Go code to teach gcx a new kind. Confirm which one is meant before starting. - The kind is already registered under
internal/datasources/providers/— extend that implementation instead of adding a duplicate. - The product is a Grafana Cloud product, not a datasource — use
/add-provider.
Entry paths
Invoked from integrate-with-gcx (the placement section already exists —
necessity, command path, backend evidence, wiring, readiness):
- Skip the Stage 1 questions it already answers: the datasource kind and plugin type string, the query/metadata endpoints, and the readiness verdict. Record them and move on rather than re-asking.
- The Stage 1 approval gate does not apply on this path. Build autonomously. If a query-language or endpoint detail is genuinely missing, discover it from the vendor docs, or ask one targeted question carrying the evidence and a recommendation — never fall back to a blanket approval gate.
- Start at Stage 2, and use Stage 3 verification as written.
Invoked directly (no placement section): work through all three stages.
Autonomy is the same as above — the Stage 1 gate is a checkpoint you satisfy, not
an approval you wait for. Discover the plugin type, endpoints and response shapes
from bin/gcx datasources list -o json, the vendor's API docs and bin/gcx api
probes; present findings and keep going. Ask only where an unresolved answer would
materially change the implementation — an unknown query-expression format, an
endpoint you cannot verify. If no instance is reachable, report the live checks as
UNVERIFIED with the reason rather than blocking or claiming them green.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 5d ago First seen · 491 lines · 127 tokens per session scan A 622dcb80268d
add-datasource is a skill published in the GitHub repository grafana/gcx (586 stars, last pushed today), licensed Apache-2.0. It adds 127 tokens to every session and 5,464 once invoked, about $0.0006 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 skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
chronicle
Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…
imagegen
Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…