grafana/gcx/generate-resource-stubs
Claude Code and agent skill by grafana/gcx
- community
Checking that the SKILL.md file is still in the repository.
Generates typed Go stubs and grafana-foundation-sdk builder boilerplate for dashboards and alert rules. Use only when the user asks for stubs or builder boilerplate. To design a usable dashboard, use create-dashboard.
Install
npx vskill@latest install grafana/gcx/generate-resource-stubsSKILL.md
The same SKILL.md was published earlier as grafana/gcx/generate-resource-stubs.
Generate Typed Resource Stubs
Generate ready-to-edit Go files for dashboards and alert rules using gcx dev generate. The generated code uses the grafana-foundation-sdk builder pattern and compiles without modification.
This skill stops at scaffolding. If the task is to decide which dashboard panels, variables, queries, and layout should exist, use create-dashboard after generating the stub.
Quick Start
How Type Inference Works
The resource type is inferred from the immediate parent directory:
| Directory | Type | |
|---|---|---|
dashboards/ or dashboard/ | dashboard | |
alerts/, alertrules/, or alertrule/ | alertrule |
Override with --type when the directory doesn't match:
Output
- Filename is normalized to snake_case:
my-dashboard.go→my_dashboard.go - Function name is CamelCase:
my-dashboard→MyDashboard() - Package name is derived from the parent directory
After Generation: Building Real Dashboards
The generated stub is a starting point. See references/foundation-sdk-guide.md for the full builder API reference to customize your dashboards and alerts.
Dashboard Customization Cheat Sheet
Alert Rule Customization Cheat Sheet
Common Issues
| Issue | Fix | |
|---|---|---|
| "cannot infer resource type" | Directory name doesn't match known types; use --type dashboard or --type alertrule | |
| "file already exists" | Delete the existing file first or use a different name | |
| Need to add to registry | Manually add the function call to your All() function in all.go |
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
- SKILL.md in the repositoryCheckingclaude-plugin/skills/generate-resource-stubs/SKILL.md
Popularity
- Repository stars
- 531
- Repository forks
- 42
- 7-day trend score
- 31
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
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
[](https://verified-skill.com/skills/grafana/gcx/generate-resource-stubs)