grafana-foundation-sdk
Installation
SKILL.md
Grafana Foundation SDK
The grafana-foundation-sdk provides strongly typed builder libraries for defining Grafana dashboards as code. Instead of writing raw JSON (which is error-prone and hard to review in diffs), you compose dashboards using chained builder calls that produce valid Grafana JSON.
The SDK is auto-generated from Grafana's internal CUE schemas via the cog tool. It supports Go, TypeScript, Python, PHP, and Java. This skill focuses on TypeScript (primary) and Go (secondary) since those are the most common choices for infrastructure teams.
When to use this skill
- Creating new Grafana dashboards from scratch
- Converting existing hand-written dashboard JSON to typed code
- Adding panels, variables, or queries to dashboards
- Building reusable dashboard components (helper functions for common panel patterns)
- Generating dashboards dynamically based on service lists or configs
Installation
The SDK is published as concrete v0.0.x tags (latest: v0.0.16). Pin explicitly - it is pre-1.0 and the API churns between releases (see Known Gotchas).