integrate-with-gcx

Guides adding, placing, and reviewing new commands in the grafana/gcx CLI codebase.

581|46|Updated Mar 23, 2026
One-click install
npx skills add https://github.com/grafana/gcx --skill integrate-with-gcx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: integrate-with-gcx
Source: https://github.com/grafana/gcx/tree/main/.claude/skills/integrate-with-gcx
Command: npx skills add https://github.com/grafana/gcx --skill integrate-with-gcx

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Contributing a new capability to the gcx CLI requires deciding where a command belongs (provider, datasource, resource adapter, cloud command, or skill), designing its agent-facing contract, and catching recurring review defects before a human reviews the PR. This Skill walks a contributor and their coding agent through that entire process inside a grafana/gcx checkout.

Core Features & Use Cases

  • Placement decisions: Determines whether a capability needs a new command, an extension of an existing one, or no gcx surface at all, with a backend-readiness gate that names owners for missing prerequisites.
  • Contract design: Covers naming, typed inputs, output protocol class, completeness disclosure, error vocabulary, and token cost so agents can route on the command metadata.
  • Diff-triggered self-review: Runs targeted checks (T1-T12) for defect classes like dead codec paths, empty-flag handling, truncation disclosure, and fix-push regressions.
  • Use Case: You want to expose your Grafana product's API through gcx. The Skill inventories the command tree, probes the backend, drafts the command contract, hands off to add-provider or add-datasource skills, and reviews the resulting diff before the PR.

Quick Start

Ask your coding agent to integrate your product's API with gcx by adding a new command, starting from a grafana/gcx repository checkout.

Frequently Asked Questions about integrate-with-gcx

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

FAQPage Schema
How do I add a new command to the gcx CLI?

Run the Place mode first: inventory the tree with bin/gcx help-tree and bin/gcx commands, decide necessity and path, verify the backend with a probe, then design the contract before writing code. Hand implementation to the add-provider or add-datasource skill and return for Review mode.

How do I expose my Grafana product API through gcx?

Probe the backend surface (K8s API, plugin REST API, GCOM, or datasource query API), then choose wiring: a provider package for product REST APIs, a datasource provider for queryable kinds, or no new code if gcx resources already covers standard CRUD.

When should a capability not become a gcx command?

When an existing command already answers the question, when gcx api suffices for one-off diagnostics, or when the capability is product-owned work like client-side bulk data mining. The readiness gate can also return backend-prerequisite or not-gcx as terminal outcomes.

What CI checks enforce gcx command wiring?

TestConsistency suites enforce output-class fixture entries, token cost annotations, and llm_hint for medium/large costs. TestAgentConformance verifies finite leaves emit exactly one JSON value. Cloud-only availability and command-to-skill mappings are review-enforced only.

Why does gcx command naming matter so much in review?

Released command names are frozen within a major version, so a wrong name ships forever. Names must follow docs/design/command-naming.md and the precedent record in docs/plans/list-subject-verdicts.md, checked against the real tree with bin/gcx help-tree.

Can this skill migrate a provider from the legacy CLI?

No. Migration is explicitly out of scope; porting a provider from the legacy CLI is a human-driven workflow. The skill directs you to .claude/skills/migrate-provider/SKILL.md and its status note instead.