grafana/gcx/manage-dashboards

Claude Code and agent skill by grafana/gcx

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Manages existing Grafana dashboards via gcx: list, search, get, audit panels, queries, datasources, and variables; apply a finished manifest; delete; versions and restore; pull/push/validate files; folders; PNG snapshots. Not for new dashboards, panels, or variables (use create-dashboard).

Install

npx vskill@latest install grafana/gcx/manage-dashboards

SKILL.md

The same SKILL.md was published earlier as grafana/gcx/manage-dashboards.

Manage Dashboards

Use gcx dedicated commands first. Only use gcx api when a dedicated command cannot perform the requested operation.

Routing

User intentUse
Build a new dashboard from an idea, service, SLO, incident, or set of metricscreate-dashboard
Redesign layout, choose panels/queries, or visually iterate dashboard qualitycreate-dashboard
Generate a Go builder skeleton onlygenerate-resource-stubs
Convert an existing live dashboard to Go codeimport-dashboards
List, search, inspect, delete, restore, pull, push, validate, promote, or snapshot existing dashboardsthis skill
Configure gcx/auth firstsetup-gcx

Preflight for Mutations

Before any create/update/delete/push/restore operation:

bash
gcx config current-context
gcx config check

Use --context <name> when the user named a target environment. Do not switch the global context unless the user asked for it.

For writes, read current state first and preserve folder/manager intent:

bash
gcx dashboards get <dashboard-name> -o json
gcx resources get folders -o json

Manager boundary: gcx protects resources managed by another tool. If a push fails because of grafana.app/managed-by, stop and ask/confirm before using --include-managed.

Typical Update Workflow

  1. Preflight — gcx config check, then fetch current state with gcx dashboards get <name> -o json
  2. Edit — write the modified YAML locally
  3. Validate and push — gcx resources validate -p <path> -o json, gcx resources push -p <path> --dry-run, gcx resources push -p <path>
  4. Verify — gcx dashboards get <name> -o json

Operation Reference

Use JSON/YAML for programmatic work and table/wide output for human summaries.

OperationCommand pattern
List datasourcesgcx datasources list -o json
Prometheus metric namesgcx datasources prometheus labels -d <uid> --label __name__
Prometheus label valuesgcx datasources prometheus labels -d <uid> --label <label>
Prometheus metric metadatagcx datasources prometheus metadata -d <uid>
Loki label namesgcx datasources loki labels -d <uid>
Loki label valuesgcx datasources loki labels -d <uid> --label <label>
Tempo attribute namesgcx datasources tempo labels -d <uid>
Tempo attribute valuesgcx datasources tempo labels -d <uid> -l resource.service.name --llm -o json
Pyroscope profile typesgcx datasources pyroscope list-profile-types -d <uid>
Pyroscope label valuesgcx datasources pyroscope labels -d <uid> --label service_name
Other datasource typesCheck gcx datasources <type> --help for dedicated subcommands before using gcx api
List dashboardsgcx dashboards list -o wide
Search by text/tag/foldergcx dashboards search "<query>" --tag <tag> --folder <folder-name> -o json
Get one dashboardgcx dashboards get <dashboard-name> -o json
Create from finished filegcx dashboards create -f <dashboard.yaml>
Update from finished filegcx dashboards update <dashboard-name> -f <dashboard.yaml>
Delete with confirmationgcx dashboards delete <dashboard-name>
Delete non-interactivelygcx dashboards delete <dashboard-name> --force
Version historygcx dashboards list-versions <dashboard-name>
Restore versiongcx dashboards versions restore <dashboard-name> <version> --message "<why>"
Pull dashboards/foldersgcx resources pull dashboards folders -p <dir> -o yaml
Pull one dashboardgcx resources pull dashboards/<dashboard-name> -p <dir> -o yaml
Validate local filesgcx resources validate -p <path> -o json
Preview pushgcx resources push -p <path> --dry-run
Push local filesgcx resources push -p <path>
Delete by selectorgcx resources delete dashboards/<dashboard-name>
Edit in $EDITORgcx resources edit dashboards/<dashboard-name> -o yaml
List resource kindsgcx resources list-types

<dashboard-name> is the dashboard resource name (metadata.name), which is also the value accepted by gcx dashboards snapshot.

Pull/Push Notes

  • Pull output directories may include API version/group in their path. Use the

paths printed by gcx; do not assume a fixed dashboards/ directory shape.

  • When a directory contains folders and dashboards, gcx pushes folders first.
  • Use --on-error abort when later resources depend on earlier ones and partial

progress would be confusing.

  • Dry-run before writing to production unless the user explicitly opts out.

Snapshots

bash
GCX_AGENT_MODE=true gcx dashboards snapshot <dashboard-name> --output-dir ./snapshots --since 6h
# With variables:
GCX_AGENT_MODE=true gcx dashboards snapshot <dashboard-name> --output-dir ./snapshots --since 6h --var cluster=prod

Read the returned file_path PNG and summarize what you see; do not just report the path.

Troubleshooting: plugin not found/renderer 500 = image renderer unavailable; wrong data = inspect template variables and rerun with --var; auth errors = check gcx config check.

Version Restore Safety

Restore performs a read of historical content and writes a new current revision. Always include a message and verify afterwards:

bash
gcx dashboards list-versions <dashboard-name> --limit 10
gcx dashboards versions restore <dashboard-name> <version> \
--message "Restore known-good dashboard after <reason>"
gcx dashboards get <dashboard-name> -o json

A conflict or 409 means someone changed the dashboard concurrently. Re-fetch, review the newest version, and retry only if the restore is still correct.

Common Failure Handling

SymptomAction
gcx config check failsUse setup-gcx before dashboard operations
gcx resources get datasources selector errorUse gcx datasources list instead — datasource.grafana.app is not registered on all instances
Dashboard not foundSearch first; confirm metadata.name, not just title
Folder filter does not work with listUse gcx dashboards search --folder <folder-name>
Push blocked by manager metadataAsk before --include-managed
Validation failsFix local file; do not push invalid resources
Snapshot returns wrong variablesInspect templating and pass --var name=value
Snapshot unavailableReport renderer/auth blocker; do not claim visual review

References

  • For full flag sets, selector syntax, --on-error policy, and the

gcx dev serve live-reload workflow, read references/resource-operations.md.

  • For resource structure, manager metadata, push ordering, and lifecycle

behavior, read references/resource-model.md.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
800
Repository forks
65
7-day trend score
33

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 6 Jul 2026, 4 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/grafana/gcx/manage-dashboards/badge)](https://verified-skill.com/skills/grafana/gcx/manage-dashboards)

Something wrong with this skill or its page? Tell us.