← ClaudeAtlas

grafana-foundation-sdklisted

Build Grafana dashboards as code with the grafana-foundation-sdk typed builders (TypeScript or Go). Use when creating, modifying, or generating Grafana dashboard JSON programmatically, converting hand-written dashboard JSON to typed code, building monitoring dashboards, or working with Prometheus/Loki queries in dashboards.
tenequm/skills · ★ 29 · Data & Documents · score 85
Install: claude install-skill tenequm/skills
# 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). **TypeScript:** ```bash npm install '@grafana/grafana-foundation-sdk@~0.0.16' # or pnpm add '@grafana/grafana-foundation-sdk@~0.0.16' ``` **Go:** ```bash go get github.com/grafana/grafana-foundation-sdk/go@v0.0.16 ``` ## Core Architecture Everything follows the **builder pattern**: create a builder, chain configuration methods, call `.build()` (TS) or `.Build()` (Go) to produce the final object. The