grafana-cli

grafana-cli is a skill for Claude Code, Codex from abdullahkhawer/devops-skills. It costs 30 tokens per session (1,174 once invoked), scanned B, original, Apache-2.0.

A command-line helper for Grafana, a tool that displays monitoring data in dashboards. It uses Grafana’s HTTP API to inspect dashboards, data sources, alerts, and annotations.

In plain words
What is it for?
Querying dashboards and data sources, reviewing alerts, and checking annotations through Grafana’s API.
Why use it?
It avoids manually constructing API requests for common Grafana administration and inspection tasks.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/abdullahkhawer/devops-skills/grafana-cli
Any agent
npx skills add abdullahkhawer/devops-skills --skill grafana-cli
Clone the repo
git clone --depth 1 https://github.com/abdullahkhawer/devops-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for grafana-cli

README.md
[![agentmods](https://agentmods.dev/badge/skills/abdullahkhawer/devops-skills/grafana-cli.svg)](https://agentmods.dev/skills/abdullahkhawer/devops-skills/grafana-cli)
Your own site
<a href="https://agentmods.dev/skills/abdullahkhawer/devops-skills/grafana-cli"><img src="https://agentmods.dev/badge/skills/abdullahkhawer/devops-skills/grafana-cli.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,174 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00030 $0.01174
Opus 5 $0.00015 $0.00587
Sonnet 5 $0.00006 $0.00235
Haiku 4.5 $0.00003 $0.00117

Measured 5d ago against content hash 8e04f8cab14e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

grafana-cli scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

mkdir -p ~/.grafana && echo "<your-api-token>" > <TOKEN_FILE> && chmod 600 <TOKEN_FILE>

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

description: Perform Grafana operations using the Grafana HTTP API via curl. Use for querying dashboards, datasources, alerts, and annotations.
skills/grafana-cli/SKILL.md · 105 lines

How it starts

The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Grafana CLI Skill

Use the instance and rules below when constructing all Grafana API commands.

Instances

Update the table below with your Grafana instance URLs and corresponding token file paths:

Environment Base URL Token File
Production https://<your-grafana-prod-url> ~/.grafana/prod.token
Staging https://<your-grafana-staging-url> ~/.grafana/staging.token

If the target instance is unclear, ask the user before running any command.

Prerequisites (one-time setup by user)

Generate a Grafana API token for each instance you intend to use and save it to the corresponding token file (see instance table above). Never print or display token values. Do not perform these steps yourself.

For each instance:

  1. Navigate to <BASE_URL>AdministrationUsers and accessService accountsAdd service account
  2. Enter a display name and role, then click Create
  3. On the service account page, click Add service account token and copy the generated token
  4. Save it:
mkdir -p ~/.grafana && echo "<your-api-token>" > <TOKEN_FILE> && chmod 600 <TOKEN_FILE>

Command Format

All API calls use curl with the token read from the instance's token file (see instance table above):

curl -s -H "Authorization: Bearer $(cat <TOKEN_FILE>)" \
  "<BASE_URL>/api/<endpoint>" | jq .

Example (production):

curl -s -H "Authorization: Bearer $(cat ~/.grafana/prod.token)" \
  "https://<your-grafana-prod-url>/api/health" | jq .

Available API Endpoints

Read-only (safe, no confirmation needed)

Endpoint Method Description
/api/org GET Get current organisation info
/api/user GET Get current authenticated user
/api/datasources GET List all datasources
/api/datasources/<id> GET Get datasource by ID
/api/dashboards/home GET Get the home dashboard
/api/search?query=<term> GET Search dashboards and folders
/api/dashboards/uid/<uid> GET Get dashboard by UID
/api/folders GET List all folders
/api/folders/<uid> GET Get folder by UID
/api/alerts GET List legacy alerts
/api/v1/provisioning/alert-rules GET List all alert rules
/api/v1/provisioning/alert-rules/<uid> GET Get alert rule by UID
/api/annotations GET List annotations
/api/health GET Check Grafana health

Read the full file on GitHub · 105 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 105 lines · 30 tokens per session scan B 8e04f8cab14e

Subscribe to this mod's changes

grafana-cli is a skill published in the GitHub repository abdullahkhawer/devops-skills (7 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 30 tokens to every session and 1,174 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

ask-copilot

Use GitHub Copilot CLI in non-interactive mode to ask questions, review code, or generate snippets without manual interaction.

sickn33/agentic-awesome-skills · 30 tokens

lore

SpecStory Lore - mine your SpecStory coding histories (any agent - Claude Code, Codex, Cursor, Gemini, and more) into a persistent corpus, surface your reproducible workflows with corroborated evidence, and interactively forge the chosen ones into skills installed across all your agent harnesses. Use when the user…

specstoryai/getspecstory · 109 tokens

docs-manage

Manage the Grounded Docs MCP Server documentation index. Covers scraping and indexing documentation from URLs or local files, refreshing existing indexes with changed content, and removing libraries from the index. Use when you need to add, update, or delete indexed documentation.

arabold/docs-mcp-server · 53 tokens

workthreads

SpecStory Workthreads - a weekly work-thread rollup across a team's repos from SpecStory coding histories (any agent - Claude Code, Codex, Cursor, Gemini, and more). It groups the window's sessions into threads of work per project and labels each new / open / recently closed, so a lead sees what shipped, what is still…

specstoryai/getspecstory · 126 tokens

docs-search

Search and query the Grounded Docs MCP Server documentation index. Covers listing indexed libraries, searching documentation content, and resolving library versions. Use when you need to look up API references, find code examples, or check which documentation is available in the local index.

arabold/docs-mcp-server · 54 tokens

fetch-url

Fetch a single URL and convert its content to Markdown. Use when you need to read a web page, documentation page, or API reference without indexing it. The content is returned as plain Markdown text on stdout.

arabold/docs-mcp-server · 45 tokens