Grafana logo

Skill

scaffold-project

scaffold Grafana resources-as-code projects

Published by Grafana Updated Jul 12
Covers CLI Grafana Engineering Infrastructure as Code

Description

Scaffolds a new Go project for managing Grafana resources as code via gcx dev scaffold. Use when the user wants to create a new Grafana resources-as-code project, start a new dashboards-as-code repo, scaffold a gcx project, or asks "how do I get started with gcx". Triggers on phrases like "new project", "scaffold", "bootstrap", "create project", "get started".

SKILL.md

Scaffold a gcx Project

Scaffold a new Go project for managing Grafana resources as code using gcx dev scaffold.

Prerequisites

Verify gcx is installed:

gcx --version

If missing, see the setup-gcx skill.

Scaffolding

gcx dev scaffold

Prompts for:

  • Project name - becomes the directory name (kebab-cased)
  • Go module path - e.g. github.com/myorg/my-dashboards

Non-Interactive Mode

gcx dev scaffold --project my-dashboards --go-module-path github.com/myorg/my-dashboards

What Gets Generated

my-dashboards/
├── .github/workflows/deploy.yaml   # CI/CD workflow for gcx push
├── .gitignore
├── go.mod
├── main.go                         # Entrypoint — registers all resources
├── internal/
│   └── dashboards/
│       ├── all.go                  # Registry function returning all manifests
│       └── sample.go              # Example dashboard using foundation-sdk builders
└── README.md

Next Steps After Scaffolding

  1. cd my-dashboards && go mod tidy
  2. Configure gcx: gcx config set grafana.server <URL> and gcx config set grafana.token <TOKEN>
  3. Edit internal/dashboards/sample.go or generate new stubs with gcx dev generate
  4. Push to Grafana: gcx resources push

Common Issues

IssueFix
go mod tidy failsEnsure your Go toolchain meets the version required by the generated go.mod
Project name has spacesNames are auto-kebab-cased; spaces become hyphens
Want to add alert rulesCreate internal/alerts/ and use gcx dev generate alerts/my-rule.go

© 2026 YourAI.tools. Every skill from an identity-verified publisher.

Independent catalog. Not affiliated with, endorsed by, or sponsored by Anthropic or any listed publisher. All trademarks belong to their respective owners.