Official agent skill

Cost Management

by grafana in grafana/skills

Cut your Grafana Cloud bill by attributing spend to teams and reducing telemetry volume.

OfficialApache-2.0Auto-check passedDevOps & Cloud

Install Cost Management

skills CLI
$ npx skills add grafana/skills --skill cost-management -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install grafana/skills cost-management --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/grafana/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/grafana-cloud/cost-management .claude/skills/cost-management && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cost-management
GitHub stars
282
Token cost
~1.1k tokens
SKILL.md length
171 words
Files
3 (incl. references)
Skills in repo
51
Repo updated
First seen
Licence
Apache-2.0

At a glance

Cut your Grafana Cloud bill by attributing spend to teams and reducing telemetry volume.

  • Works in 4 steps: Attribute cost to a team / service → Cut metric cardinality with Adaptive… → Drop noisy logs in Alloy → …
  • Investigating a high Grafana Cloud bill
  • SKILL.md covers Prerequisites, Common Workflows, Optimization checklist and References, plus 1 more section
  • Calls curl and jq

What it does

Cost Management is an agent skill from grafana/skills, published by the product's own GitHub organization. Cut your Grafana Cloud bill by attributing spend to teams and reducing telemetry volume. Covers FOCUS-compliant billing dashboards, cost-attribution labels in Alloy, Adaptive Metrics (cardinality reduction), Adaptive Logs (drop/sample), Adaptive Traces (tail sampling), usage alerts, and an optimization checklist. Use when investigating a high Grafana Cloud bill, attributing observability cost to a team or service, reducing active series / log bytes / trace spans, or setting up usage / quota alerts — even when the…

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/adaptive-signals.md` and `references/alerts-and-queries.md`).

It sits in DevOps & Cloud, covering Cloud cost optimization, Monitoring and alerting and Observability. It works with Grafana. The licence is Apache-2.0.

When your agent uses it

  • Investigating a high Grafana Cloud bill
  • Attributing observability cost to a team
  • Reducing active series / log bytes / trace spans
  • Setting up usage / quota alerts — even when the user says our Grafana bill is too high

Example prompts

  • “our Grafana bill is too high”
  • “s burning the most metrics”
  • “drop debug logs”
  • “/cost-management”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Attribute cost to a team / service
  2. Cut metric cardinality with Adaptive Metrics
  3. Drop noisy logs in Alloy
  4. Set a usage alert before you hit quota

What it can do on your machine

Read from SKILL.md and the folder at commit 1ccacf2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • grafana.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cost Management loads about 1.1k tokens when it runs, and up to ~2k if it reads all its reference files. Until then it costs about 179 tokens; SKILL.md has 171 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~179
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from grafana/skills at commit 1ccacf2, republished under its Apache-2.0 licence (© grafana). 171 words, ~1,139 tokens.

Download SKILL.mdSave it as .claude/skills/cost-management/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
cost-management
description
Cut your Grafana Cloud bill by attributing spend to teams and reducing telemetry volume. Covers FOCUS-compliant billing dashboards, cost-attribution labels in Alloy, Adaptive Metrics (cardinality reduction), Adaptive Logs (drop/sample), Adaptive Traces (tail sampling), usage alerts, and an optimization checklist. Use when investigating a high Grafana Cloud bill, attributing observability cost to a team or service, reducing active series / log bytes / trace spans, or setting up usage / quota alerts — even when the user says "our Grafana bill is too high", "who's burning the most metrics", "drop debug logs", "sample our traces", or "alert me before we hit quota" without naming Cost Management.
license
Apache-2.0

Grafana Cloud Cost Management

Docs: https://grafana.com/docs/grafana-cloud/cost-management-and-billing/

Reduce metric / log / trace spend with Adaptive signals + cost-attribution labels.

Prerequisites

  • A Grafana Cloud stack with Adaptive Metrics / Logs / Traces enabled (visible under Cost Management)
  • Alloy (or Grafana Agent) ingesting telemetry, with API key in scope metrics:write + logs:write (+ traces:write)
  • Admin access to the stack to apply Adaptive recommendations

Common Workflows

1. Attribute cost to a team / service
alloy
# 1. Add external labels in Alloy (metrics + logs configs)
prometheus.remote_write "cloud" {
  endpoint { url = sys.env("PROMETHEUS_URL") /* ... */ }
  external_labels = { team = "platform", project = "checkout-service" }
}
bash
# 2. Reload Alloy
curl -X POST http://localhost:12345/-/reload

# 3. Verify labels arrived in Grafana Cloud
#    In Explore, run:  count by (team, project) ({__name__=~".+"})
#    Then visit Cost Management → group by `team` / `project`

See references/adaptive-signals.md for the full Alloy snippet.

2. Cut metric cardinality with Adaptive Metrics
bash
# 1. Pull recommendations
curl https://<stack>.grafana.net/api/plugins/grafana-adaptive-metrics-app/resources/v1/recommendations \
  -H "Authorization: Bearer <token>" | jq '.recommendations | length'

# 2. In the UI: Grafana Cloud → Adaptive Metrics → review rules sorted by series-reduction impact
# 3. Test in "Preview" mode before applying
# 4. Apply (takes effect within 5 min)

# 5. Verify — series count should drop on the affected metrics
#    Before applying, capture baseline:
#      count({__name__="http_request_duration_seconds_bucket"})
#    Wait 10 min after apply, run again — expect 10x+ reduction for high-card metrics.

# Rollback if needed: open the rule in the UI → Disable, or DELETE /v1/rules/<id>.
3. Drop noisy logs in Alloy
alloy
# 1. Add a filter stage (see references/adaptive-signals.md for the full block)
loki.process "filter_logs" {
  forward_to = [loki.write.cloud.receiver]
  stage.drop { expression = ".*GET /health.*" }
}
bash
# 2. Reload Alloy
curl -X POST http://localhost:12345/-/reload

# 3. Verify the filter — health logs should NOT appear in Logs Drilldown
#    LogQL check (should return 0):
#      sum(rate({app="my-app"} |= "GET /health" [5m]))
#    Bytes-ingested should also drop. Compare 24h before/after:
#      sum(increase(loki_ingester_chunk_size_bytes_sum[24h])) by (namespace)
4. Set a usage alert before you hit quota

See references/alerts-and-queries.md for ready-to-paste rules (MetricsUsageHigh, LogsIngestionHigh).

Optimization checklist

  • Apply Adaptive Metrics recommendations — typically reduces series 40-60%
  • Drop health/readiness probe logs in Alloy
  • Tail-sample traces to 5-10% + keep errors / slow spans
  • Add team + project external labels to every Alloy config
  • Set usage alerts at 80% of quota
  • Replace expensive ad-hoc queries with recording rules

References

Resources

© grafana, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/grafana-cloud/cost-management of grafana/skills.

  • SKILL.md
  • references/adaptive-signals.md
  • references/alerts-and-queries.md

Open the folder on GitHubat commit 1ccacf2

Compare with similar skills

Cost Management next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cost Management compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cost Management this skillgrafana/skills282—~1.1kAutomated safety check: PassApache-2.0
Axiom Dashboard Builderopenclaw/clawhub9.5k—~4.9kAutomated safety check: PassMIT
Happy Infra Metrics and Grafanaslopus/happy24k—~2kAutomated safety check: NotesMIT
Axiom Cost Controlopenclaw/clawhub9.5k—~1.7kAutomated safety check: PassMIT
OpenTelemetry Pipeline Metrics Speccomet-ml/opik22k—~3.2kAutomated safety check: PassApache-2.0
AWS Cost Operationszxkane/aws-skills367—~2.4kAutomated safety check: PassMIT

Similar skills

  • Axiom Dashboard Builder

    openclaw/clawhub

    Designs and deploys Axiom dashboards through the API, choosing chart types and writing APL or metrics queries, with templates and migration notes for Splunk and Grafana.

    9.5k GitHub stars~4.9k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Queries live Prometheus metrics and manages Grafana dashboards as code for Happy's infrastructure, using the grafanactl CLI and the Grafana datasource proxy API.

    24k GitHub stars~2k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Axiom Cost Control

    openclaw/clawhub

    Finds unused data in Axiom by analyzing query patterns, then deploys a cost dashboard and ingest monitors to keep spend under the contract limit.

    9.5k GitHub stars~1.7k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Specifies how to instrument an opik-backend pipeline with per-stage OpenTelemetry metrics for throughput, latency, errors and queue delay by workspace.

    22k GitHub stars~3.2k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • AWS Cost Operations

    zxkane/aws-skills

    AWS cost optimization, monitoring, and operational excellence expert.

    367 GitHub stars~2.4k tokensUpdated 3 mo ago
    DevOps & CloudAuto-check passed
  • Archestra Dev Observability

    archestra-ai/archestra

    A skill your agent uses when changing Archestra tracing, metrics, OpenTelemetry, Tempo, Grafana, Prometheus, LLM/MCP spans, observability labels, or local observability setup.

    4.4k GitHub stars~1.2k tokensUpdated today
    DevOps & CloudAuto-check passed

More from grafana/skills

All 51 skills in this repo
  • K6 Docs

    grafana/skills

    Official

    Write or review k6 documentation across the three k6 repositories - k6-DefinitelyTyped (TypeScript types), k6-docs (user documentation), and k6 (release notes / changelog).

    282 GitHub stars~678 tokensUpdated 2 days ago
    Auto-check passed
  • Alerting Irm

    grafana/skills

    Official

    Configure Grafana Alerting, Incident Response Management (IRM), and SLOs end-to-end — provisions Grafana-managed and data-source-managed alert rules, contact points (Slack/PagerDuty/email/webhook)…

    282 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Dashboarding

    grafana/skills

    Official

    Build, modify, and ship Grafana dashboards as JSON via the HTTP API — panel types (timeseries / stat / gauge / table / heatmap / logs / traces / node-graph), gridPos 24-column layout, units…

    282 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • K6 Perf Test Website

    grafana/skills

    Official

    A skill your agent uses when the user wants to performance-test, load-test, or stress-test a public website end-to-end with k6.

    282 GitHub stars~3.3k tokensUpdated 2 days ago
    Auto-check passed
  • Promql

    grafana/skills

    Official

    Write, validate, and optimize PromQL for Prometheus / Grafana Mimir / Grafana Cloud Metrics.

    282 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Adaptive Metrics

    grafana/skills

    Official

    Cut Grafana Cloud Metrics cost by shrinking active-series count with Adaptive Metrics aggregation rules — auto-recommendations from query history, custom exact/regex rules, label-drop config…

    282 GitHub stars~1.3k tokensUpdated 2 days ago
    Auto-check passed

Works with

Categories

Questions about Cost Management

What does Cost Management do?

Cut your Grafana Cloud bill by attributing spend to teams and reducing telemetry volume. Cost Management is an agent skill from grafana/skills, published by the product's own GitHub organization. Cut your Grafana Cloud bill by attributing spend to teams and reducing telemetry volume.

When should I use Cost Management?

Cost Management fits situations like: investigating a high Grafana Cloud bill; attributing observability cost to a team; reducing active series / log bytes / trace spans; setting up usage / quota alerts — even when the user says our Grafana bill is too high.

How do I install Cost Management in Claude Code?

Run `npx skills add grafana/skills --skill cost-management -a claude-code`. Or copy the skill folder (skills/grafana-cloud/cost-management in grafana/skills) into .claude/skills/cost-management in your project. Claude Code loads it when a task matches its description.

How do I install Cost Management in Codex?

Run `npx skills add grafana/skills --skill cost-management -a codex`. Or copy the skill folder (skills/grafana-cloud/cost-management in grafana/skills) into .agents/skills/cost-management in your project. Codex loads it when a task matches its description.

Can I use Cost Management in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add grafana/skills --skill cost-management -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cost-management, .gemini/skills/cost-management, .github/skills/cost-management and .opencode/skills/cost-management in your project.

What does Cost Management need to run?

Going by SKILL.md and its folder, Cost Management needs the command-line tools its instructions call (curl and jq).

Does Cost Management access the network?

SKILL.md names 1 domain. As links in the text: grafana.com. This is read from the text; nothing was executed.

Is Cost Management safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Cost Management use?

Cost Management is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cost Management use?

About 1.1k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 862 tokens, read only when the agent opens those files.

What are the alternatives to Cost Management?

Skills that share tags, products or a category with Cost Management: Axiom Dashboard Builder (openclaw/clawhub, 9.5k stars), Happy Infra Metrics and Grafana (slopus/happy, 24k stars), Axiom Cost Control (openclaw/clawhub, 9.5k stars) and OpenTelemetry Pipeline Metrics Spec (comet-ml/opik, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cost Management?

grafana (a GitHub organization, an official publisher) maintains it in grafana/skills, which has 282 GitHub stars. The repository holds 51 skills in this directory. The repository was last updated on October 8, 2026.

Source: grafana/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.