Download for MacApple silicon, macOS 14+
Skill

cue-kind-definition

@grafana Updated 2026-10-17

Author CUE kind definitions for grafana-app-sdk apps - schemas, versioning, field constraints, named type definitions, custom routes, and codegen configuration. Scaffolds kinds via `grafana-app-sdk project kind add`, writes spec/status schemas with type constraints (regex, enum, range), defines `#`-prefixed named types for reusable structs, registers versions in the app manifest, and runs `grafana-app-sdk generate` with explicit error recovery. Use when working with CUE kinds, adding a new resource type, adding a version to an existing kind, writing schema field constraints, defining `#Definition` types, adding custom routes, editing files under `kinds/`, or when the user asks to "model a resource", "add a CUE schema", or "write a kind" — even without saying "CUE" explicitly.

Install

With your agent

Install OMGSkills skill "grafana/skills:cue-kind-definition" into this agent's normal skills directory: call the OMGSkills MCP get_install_plan tool for your agent and run the script it returns (it installs only the pinned commit and verifies SKILL.md), and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.

Manual command

git clone https://github.com/grafana/skills /tmp/skills && ln -s /tmp/skills/skills/grafana-app-sdk/cue-kind-definition ~/.claude/skills/cue-kind-definition

From README

CUE Kind Definition Common Workflows Adding a new kind If generate fails with CUE errors: Read the error — CUE prints the offending file + line + which constraint failed Common causes: missing required field, type mismatch (e.g. string field assigned an int), unresolved reference between version files Fix the .cue source, re-run grafana-app-sdk generate. Never edit files under pkg/generated/ — they're overwritten on every run. Adding a new version to an existing kind Breaking changes (removing fields, changing types, adding required fields) must go into a new version — never modify a stable version (v1, v2) in place. Kind file structure The CLI produces a flat layout under kinds/: For multi-version kinds, additional version files sit alongside (mykindv1.cue, etc.). For very large kind sets (10+ kinds), consider the per-kind subdirectory layout — full kind anatomy reference in references/kind-layout.md.