# Grafana Query Export

> Export every Grafana dashboard target—SQL, PromQL, LogQL, TraceQL, Flux, InfluxQL, Graphite, expressions, and unknown JSON—into project context files

- Skill: `datus-ai/grafana-query-export` (Agent Skill)
- Install (CLI): `npx skillmds@latest add datus-ai/grafana-query-export`
- Raw SKILL.md: https://api.skillmd.com/api/skills/datus-ai/grafana-query-export/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: datus-ai (https://skillmd.com/u/datus-ai)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/datus-ai/grafana-query-export

---


# Grafana Query Export

Run:

```bash
datus grafana context export-dashboard <dashboard-uid>
```

The default destination is `reference_sql/grafana/<dashboard-slug>/`. Each target gets its own language-appropriate file. Grafana expressions and unknown target models remain structured JSON so information is not discarded. `manifest.json` records dashboard/panel/refId, datasource, variables/macros, language, checksum, and status; `_source/` holds redacted dashboard and resolved library-panel documents.

Existing output is protected. Use `--overwrite` only after inspecting the path, and `--include-hidden` only when hidden targets should be context. Retain `$variable`, `${variable:format}`, `$__timeFilter`, interval macros, and datasource templating; do not substitute runtime values. Review the manifest before consuming files as project context and report incomplete resolution rather than guessing query semantics.

