Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
grafana avatar

Import Dashboards

  • 4 installs
  • 524 repo stars
  • Updated August 4, 2026
  • grafana/gcx

import-dashboards skill documents Use when the user wants to import existing Grafana dashboards as Go code, convert live dashboards to builder code, migrate dashboards to code, or reverse-engineer a dashboard from a Graf

About

import-dashboards skill documents Use when the user wants to import existing Grafana dashboards as Go code, convert live dashboards to builder code, migrate dashboards to code, or reverse-engineer a dashboard from a Grafana instance. Triggers on "import dashboard", "convert to code", "dashboard as code", "export dashboard".. name: import-dashboards description: >

  • Use when the user wants to import existing Grafana dashboards as Go code, convert live dashboards to builder code, migra
  • Platform-specific setup patterns for import-dashboards.
  • Evidence-backed steps from upstream SKILL.md.
  • When-to-use criteria for import-dashboards versus alternatives.

Import Dashboards by the numbers

  • 4 all-time installs (skills.sh)
  • Ranked #1,101 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

import-dashboards capabilities & compatibility

Capabilities
import dashboards quick start · import dashboards when to use guidance · import dashboards integration patterns
Works with
grafana
From the docs

What import-dashboards says it does

Use when the user wants to import existing Grafana dashboards as Go code,
SKILL.md
convert live dashboards to builder code, migrate dashboards to code,
SKILL.md
npx skills add https://github.com/grafana/gcx --skill import-dashboards

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs4
repo stars524
Last updatedAugust 4, 2026
Repositorygrafana/gcx

How do I use import-dashboards correctly?

Use when the user wants to import existing Grafana dashboards as Go code, convert live dashboards to builder code, migrate dashboards to code, or reverse-engineer a dashboard from a Grafana instance.

Who is it for?

Teams implementing import-dashboards workflows from the catalog.

Skip if: Skip when requirements clearly match a different specialized stack.

When should I use this skill?

User asks about import-dashboards, use when the user wants to import existing grafana dashboards as go code, convert live das.

What you get

Working import-dashboards setup with validated configuration and next steps.

Files

SKILL.mdMarkdownGitHub ↗

Import Dashboards as Code

Import existing dashboards from a Grafana instance and convert them to Go builder code using gcx dev import.

Prerequisites

1. gcx installed and configured with a Grafana connection (gcx config check should show a valid context) 2. The target Grafana instance must be reachable

Import Commands

Import All Dashboards

gcx dev import dashboards

Writes Go files to imported/ (default). Each dashboard becomes a function returning *resource.ManifestBuilder.

Import a Specific Dashboard

gcx dev import dashboards/my-dashboard-uid

Import to a Custom Directory

gcx dev import dashboards --path src/grafana

Import Multiple Resource Types

gcx dev import dashboards folders

How It Works

Grafana Instance
    │
    ▼
gcx dev import dashboards/foo
    │
    ├── 1. Fetches resource via K8s API (/apis endpoint)
    ├── 2. Detects API version (v0alpha1, v1beta1, v2beta1)
    ├── 3. Runs version-specific converter (JSON → SDK builder code)
    ├── 4. Wraps in resource.NewManifestBuilder()
    └── 5. Writes to imported/<snake_case_name>.go

The converter produces Go code using the grafana-foundation-sdk builder pattern — the same pattern used by dev generate and dev scaffold.

Output Format

Each imported file looks like:

package dashboards

import (
    "github.com/grafana/grafana-foundation-sdk/go/dashboardv2beta1"
    "github.com/grafana/grafana-foundation-sdk/go/resource"
)

func MyDashboard() *resource.ManifestBuilder {
    // ... builder code generated from the live dashboard
}

Workflow: Import → Edit → Push

# 1. Import from Grafana
gcx dev import dashboards --path internal/dashboards

# 2. Review and edit the generated code
#    (fix up builder calls, add variables, etc.)

# 3. Push back to Grafana
gcx resources push

Common Issues

IssueFix
"no converter found"Dashboard uses an unsupported API version; only v0alpha1, v1beta1, v2beta1 supported
Auth error (401/403)Run gcx config check to verify credentials
Empty importThe selector matched no resources; check UID with gcx resources get dashboards
Imported code doesn't compileSome complex dashboards produce converter output that needs manual fixup

Related skills

FAQ

What does import-dashboards do?

import-dashboards skill documents Use when the user wants to import existing Grafana dashboards as Go code, convert live dashboards to builder code, migrate dashboards to code, or reverse-engineer a dashboard from a Grafana instance.

When should I use import-dashboards?

User asks about import-dashboards, use when the user wants to import existing grafana dashboards as go code, convert live das.

Is this skill safe to install?

Review the Security Audits panel on this page before installing in production.

DevOps & CI/CDmonitoring

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.