Skip to content
Development
Skill

/gcx

Manages Grafana Cloud resources via the gcx CLI. Trigger when the user wants to inspect, create, update, delete, query, or automate any Grafana resource - dashboards, datasources, alerts, SLOs, synthetic checks, oncall, incidents, fleet, k6, knowledge graph, or adaptive

From plugin
gcx
81024 skills1 agent

Claude Code

$ npx -y skills add grafana/gcx --skill gcx --agent claude-code

SKILL.md

gcx.SKILL.md
name: gcx
description: >
  Manages Grafana Cloud resources via the gcx CLI. Trigger when the user wants to
  inspect, create, update, delete, query, or automate any Grafana resource -
  dashboards, datasources, alerts, SLOs, synthetic checks, oncall, incidents,
  fleet, k6, knowledge graph, or adaptive telemetry.
user-invocable: true
disable-model-invocation: false
allowed-tools: Bash, Read, Write, Edit, Glob, Grep, Agent, AskUserQuestion

gcx — Grafana Cloud CLI

gcx is a unified CLI for Grafana Cloud, organized like kubectl: named contexts, structured output, and a consistent verb model across all resource types.

Discover Before You Act

gcx has a built-in command catalog. Never guess a command — discover it first. Use **progressive disclosure** to minimize token cost:

**Step 1 — Orient** (30 lines, all top-level groups):

gcx help-tree --depth 1 -o text

**Step 2 — Drill down** (5-20 lines per group):

gcx help-tree <group> -o text      # full subtree for one group
gcx <group> <subcommand> --help    # exact flags and args

**Build payloads:**

gcx resources list-types <kind>     # resource types + JSON schema for a type
gcx resources list-examples <kind>  # example manifest

Only fall back to `gcx commands --flat -o json` when you need structured metadata for automation - the output is hundreds of kilobytes and unsuitable for orientation.

Intent-to-Group Quick Reference

When you already know the user's intent, skip discovery and go straight to the right group:

| Intent | Group | Example | |--------|-------|---------| | Dashboards, folders, K8s resources | `resources` | `gcx resources get dashboards` | | SLO definitions and reports | `slo` | `gcx slo definitions list` | | Alert rule status, notification settings | `alert` | `gcx alert rules list` | | Create/modify/delete alert rules | `resources` | `gcx resources pull alertrules -p ./rules`, edit, `gcx resources push -p ./rules` | | Datasource-managed (Mimir/Loki ruler) rules | `alert ruler` | `gcx alert ruler groups list --datasource <uid>` | | Synthetic Monitoring checks | `synthetic-monitoring` | `gcx synthetic-monitoring checks list` | | IRM (OnCall + Incidents) | `irm` | `gcx irm oncall schedules list`, `gcx irm incidents list` | | k6 load tests, projects, runs | `k6` | `gcx k6 load-tests list` | | PromQL / Adaptive Metrics | `metrics` | `gcx metrics query -d <uid> 'up'` | | Metric names, labels, metadata | `metrics` | `gcx metrics list-names -d <uid> --contains <term> -o json` | | LogQL / Adaptive Logs | `logs` | `gcx logs query -d <uid> '{app="foo"}'` | | Profiling (Pyroscope) | `profiles` | `gcx profiles query` | | Tracing (Tempo) | `traces` | `gcx traces query -d <uid> '{ status = error }'` (see Tempo LLM-friendly output below) | | Datasource info and queries | `datasources` | `gcx datasources list` | | Fleet pipelines, collectors | `fleet` | `gcx fleet pipelines list` | | Knowledge Graph (Asserts), service dependencies | `kg` | `gcx kg entities list`, `gcx kg graph query "<cypher>" --since 1h` | | Frontend Observability | `frontend` | `gcx frontend apps list` | | App Observability | `appo11y` | `gcx appo11y overrides get` |

Each signal group has its own discovery commands, for example `gcx metrics labels`, `gcx logs labels`, and `gcx traces labels`; `gcx help-tree <group> --depth 1 -o text` lists them. Some command areas also have a workflow skill: `gcx help-tree --depth 1 -o text` marks them with `# skill:`, `gcx <group> --help` lists them under Related skills, and `gcx agent skills get <name> -o text` prints one your harness hasn't loaded. Dashboard authoring uses `create-dashboard`.

If no command exists for the requested operation, say so and propose the nearest supported flow.

Avoid Raw API Passthrough

**Do not use `gcx api`** when a dedicated command exists. `gcx api` is a low-level fallback for endpoints not yet covered by dedicated commands. Dedicated commands provide proper output formatting, pagination, error handling, and token-efficient output. Check the intent-to-group table above first.

Similarly, prefer `gcx metrics query` over `gcx datasources query <prometheus-uid>` for PromQL queries — the signal-specific command handles datasource resolution automatically.

Target Context

When the target context is known, pass `--context <name>` directly; no separate configuration or connectivity check is needed. Inspect configuration only when the target is ambiguous or a request fails with a configuration, authentication, or connectivity error:

  • `gcx config list-contexts` — list configured contexts and their servers
  • `gcx config current-context` — show the active context name
  • `gcx config check` — validate the active context and test connectivity
  • `gcx config view` — inspect configuration with secrets redacted

Output Control

| Intent | Flag | |--------|------| | Structured output for parsing | `-o json` | | Field selection | `--json <field1,field2>` (use `--json list` or `--json ?` to discover fields) | | Full table output (no truncation) | `--no-truncate` | | YAML output | `-o yaml` | | Wide table with extra columns | `-o wide` |

Default to `-o json` when working programmatically.

Safe Mutation Workflow

Follow this sequence for any change. Skip steps only when the user explicitly asks for speed.

1. **Verify context** — confirm which environment is targeted 2. **Read current state** — list or get the resource first 3. **Build from template** — use list-types/list-examples output, not hand-crafted payloads 4. **Preview** — use `--dry-run` where available before applying 5. **Apply** — create, update, or delete 6. **Verify** — re-read the resource to confirm the change landed

Key Flags for Operations

| Intent | Flag | |--------|------| | Preview without changing anything | `--dry-run` | | Target a specific context | `--context <name>` | | Continue on errors vs stop | `--on-error fail\|ignore\|abort` | | Control concurrency | `--max-concu

Read more
@grafana
Ships withgcx

gcx is Grafana in your terminal and your agentic coding environment. With gcx you don't guess, but check the actual data.

81024 skills1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
810
Star history of grafana/gcx on GitHub, a chart by star-history.com

Other skills on gcx.

agento11y-instrument

agento11y-instrument

Instruments a developer's own LLM app or repairs missing generations and empty Performance charts in Grafana Agent Observability.…

@grafana@grafanaInstall Skill
agento11y-prod-setup

agento11y-prod-setup

Sets up production evaluation for a deployed AI agent in Agent Observability: online eval rules and guards (redact PII, block…

@grafana@grafanaInstall Skill
agento11y-test-starter

agento11y-test-starter

Builds a starter offline test suite for an AI agent before it ships: test cases from its code, scoring advice, and a runner stub.…

@grafana@grafanaInstall Skill
agento11y

agento11y

Inspects and manages Grafana Agent Observability resources via gcx: conversations, generations, experiments, evaluators, rules,…

@grafana@grafanaInstall Skill
create-dashboard

create-dashboard

Designs and creates Grafana dashboards with gcx, with `gcx dashboards snapshot` as a visual feedback loop. Use to build a new…

@grafana@grafanaInstall Skill
debug-with-grafana

debug-with-grafana

Investigates application problems and incidents with Grafana metrics, logs, and traces via gcx: errors, latency, regressions,…

@grafana@grafanaInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc11d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about gcx.

Which coding agents can use gcx?
gcx installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.