scaffold-project

Scaffolds a new Go project for managing Grafana resources as code using gcx.

1|Updated May 25, 2020
One-click install
npx skills add https://github.com/titaneric/dotfiles --skill scaffold-project-titaneric
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scaffold-project
Source: https://github.com/titaneric/dotfiles/tree/main/dot_agents/skills/scaffold-project
Command: npx skills add https://github.com/titaneric/dotfiles --skill scaffold-project-titaneric

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Starting a new Grafana resources-as-code project from scratch requires setting up Go modules, directory structure, CI/CD workflows, and sample dashboards manually. This Skill automates that boilerplate using the gcx CLI so you can begin defining dashboards and alerts immediately. ## Core Features & Use Cases - Interactive Scaffolding: Run gcx dev scaffold and answer prompts for project name and Go module path. - Non-Interactive Mode: Pass --project and --go-module-path flags for scripted or CI-driven project creation. - Complete Project Layout: Generates a Go module with a main.go entrypoint, an internal dashboards registry, a sample dashboard built with foundation-sdk builders, and a GitHub Actions deploy workflow. - Use Case: A platform engineer wants to manage Grafana dashboards as code. They scaffold a project, run go mod tidy, configure the gcx server and token, then push resources to Grafana with gcx resources push. ## Quick Start Ask the assistant to scaffold a new gcx project named my-dashboards with the Go module path github.com/myorg/my-dashboards.

Frequently Asked Questions about scaffold-project

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a new Grafana dashboards-as-code project?

Run gcx dev scaffold for interactive mode, which prompts for a project name and Go module path. For automation, use gcx dev scaffold --project my-dashboards --go-module-path github.com/myorg/my-dashboards to skip prompts.

What files does gcx dev scaffold generate?

It generates a Go module with go.mod, a main.go entrypoint that registers resources, an internal/dashboards package with a registry function and sample dashboard, a GitHub Actions deploy workflow, a .gitignore, and a README.

What do I do after scaffolding a gcx project?

Run go mod tidy inside the project, then configure gcx with gcx config set server <URL> and gcx config set token <TOKEN>. Edit the sample dashboard or generate new stubs with gcx dev generate, then push with gcx resources push.

Why does go mod tidy fail after scaffolding?

go mod tidy fails when the installed Go version is older than 1.24. Verify your Go toolchain version and upgrade to Go 1.24 or later before running the command again.

Can I add alert rules to a scaffolded gcx project?

Yes. Create an internal/alerts directory and run gcx dev generate alerts/my-rule.go to generate an alert rule stub. Register it alongside your dashboards in the project entrypoint.