Agent skill

Axiom Cost Control

by openclaw in 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.

MITAuto-check passedDevOps & Cloud

Install Axiom Cost Control

skills CLI
$ npx skills add openclaw/clawhub --skill controlling-costs -a claude-code

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

GitHub CLI
$ gh skill install openclaw/clawhub controlling-costs --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/openclaw/clawhub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/controlling-costs .claude/skills/controlling-costs && 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
controlling-costs
GitHub stars
9.5k
Token cost
~1.7k tokens
SKILL.md length
615 words
Files
15 (incl. scripts)
Skills in repo
56
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 5 steps: Check Existing Setup → Discovery → Dashboard → …
  • Reducing Axiom costs by finding unused columns or field values
  • SKILL.md covers Before You Start, Which Phases to Run, Phase 0: Check Existing Setup and Phase 1: Discovery, plus 5 more sections
  • Runs Shell scripts from its folder; calls jq

What it does

The agent starts by loading the axiom-sre and building-dashboards skills, finding the audit dataset (axiom-audit first, checking that it holds usageCalculated events), and confirming that axiom-history is readable, which the optimization phase needs. It also asks you for the deployment name, the audit dataset name and your contract limit in TB per day, which the monitors require.

Work then runs in phases. Phase 0 looks for an existing cost dashboard and compares it to templates/dashboard.json for drift. Phase 1 runs scripts/baseline-stats to capture daily ingest stats and build an analysis queue. Phase 2 deploys a dashboard of ingest trends, burn rate, projections, waste candidates and top users. Phase 3 lists notifiers, asks which one should receive cost alerts and creates monitors. Phase 4 uses the queue to find unused columns and field values.

Which phases run depends on the request: reducing costs or finding waste runs phases 0, 1 and 4, full setup runs 0 to 3, and a drift check runs 0 alone. Scripts take -h for usage, must not be piped to head or tail, and require jq.

When your agent uses it

  • Reducing Axiom costs by finding unused columns or field values
  • Tracking ingest spend with trends, burn rate and projections on a dashboard
  • Creating monitors that alert as ingest approaches the contract limit
  • Checking an existing cost dashboard for drift from the template

Example prompts

  • “Find waste in our Axiom data and tell me which columns nobody queries.”
  • “Set up cost control for our Axiom deployment with a dashboard and monitors.”
  • “Check whether our Axiom cost dashboard has drifted from the template.”

Requirements

  • An Axiom deployment with an audit dataset and axiom-history access
  • The axiom-sre and building-dashboards skills
  • jq
  • Your contract limit in TB per day, for the monitors

Workflow steps

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

  1. Check Existing Setup
  2. Discovery
  3. Dashboard
  4. Monitors
  5. Optimization

What it can do on your machine

Read from SKILL.md and the folder at commit c23e34a. 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

    Ships 9 files in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • jq

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

  • Network

    No URLs in SKILL.md.

    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

Axiom Cost Control loads about 1.7k tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 615 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

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); the scripts in this folder are not scanned.

SKILL.md

The full file from openclaw/clawhub at commit c23e34a, republished under its MIT licence (© openclaw). 615 words, ~1,687 tokens.

Download SKILL.mdSave it as .claude/skills/controlling-costs/SKILL.md (or your agent's skills folder). This skill also uses 14 other files; get the full folder from GitHub.
name
controlling-costs
description
Analyzes Axiom query patterns to find unused data, then builds dashboards and monitors for cost optimization. Use when asked to reduce Axiom costs, find unused columns or field values, identify data waste, or track ingest spend.

Axiom Cost Control

Dashboards, monitors, and waste identification for Axiom usage optimization.

Before You Start

  1. Load required skills:

    skill: axiom-sre
    skill: building-dashboards

    Building-dashboards provides: dashboard-list, dashboard-get, dashboard-create, dashboard-update, dashboard-delete

  2. Find the audit dataset. Try axiom-audit first:

    apl
    ['axiom-audit']
    | where _time > ago(1h)
    | summarize count() by action
    | where action in ('usageCalculated', 'runAPLQueryCost')
    • If not found → ask user. Common names: axiom-audit-logs-view, audit-logs
    • If found but no usageCalculated events → wrong dataset, ask user
  3. Verify axiom-history access (required for Phase 4):

    apl
    ['axiom-history'] | where _time > ago(1h) | take 1

    If not found, Phase 4 optimization will not work.

  4. Confirm with user:

    • Deployment name?
    • Audit dataset name?
    • Contract limit in TB/day? (required for Phase 3 monitors)
  5. Replace <deployment> and <audit-dataset> in all commands below.

Tips:

  • Run any script with -h for full usage
  • Do NOT pipe script output to head or tail — causes SIGPIPE errors
  • Requires jq for JSON parsing
  • Use axiom-sre's axiom-query for ad-hoc APL, not direct CLI

Which Phases to Run

User requestRun these phases
"reduce costs" / "find waste"0 → 1 → 4
"set up cost control"0 → 1 → 2 → 3
"deploy dashboard"0 → 2
"create monitors"0 → 3
"check for drift"0 only

Phase 0: Check Existing Setup

bash
# Existing dashboard?
dashboard-list <deployment> | grep -i cost

# Existing monitors?
axiom-api <deployment> GET "/v2/monitors" | jq -r '.[] | select(.name | startswith("Cost Control:")) | "\(.id)\t\(.name)"'

If found, fetch with dashboard-get and compare to templates/dashboard.json for drift.


Phase 1: Discovery

bash
scripts/baseline-stats -d <deployment> -a <audit-dataset>

Captures daily ingest stats and produces the Analysis Queue (needed for Phase 4).


Phase 2: Dashboard

bash
scripts/deploy-dashboard -d <deployment> -a <audit-dataset>

Creates dashboard with: ingest trends, burn rate, projections, waste candidates, top users. See reference/dashboard-panels.md for details.


Phase 3: Monitors

Contract is required. You must have the contract limit from preflight step 4.

Step 1: List available notifiers
bash
scripts/list-notifiers -d <deployment>

Present the list to the user and ask which notifier they want for cost alerts. If they don't want notifications, proceed without -n.

Step 2: Create monitors
bash
scripts/create-monitors -d <deployment> -a <audit-dataset> -c <contract_tb> [-n <notifier_id>]

Creates 3 monitors:

  1. Total Ingest Guard — alerts when daily ingest >1.2x contract OR 7-day avg grows >15% vs baseline
  2. Per-Dataset Spike — robust z-score detection, alerts per dataset with attribution
  3. Query Cost Spike — hardened z-score with 30d baseline, 5d exclusion gap, persistence-based gating (median_z > 3, p25_z > 2.5)

The spike monitors use notifyByGroup: true so each dataset triggers a separate alert.

See reference/monitor-strategy.md for threshold derivation.


Phase 4: Optimization

Show full SKILL.md (277 more words)Show less
Get the Analysis Queue

Run scripts/baseline-stats if not already done. It outputs a prioritized list:

PriorityMeaning
P0⛔Top 3 by ingest OR >10% of total — MANDATORY
P1Never queried — strong drop candidate
P2Rarely queried (Work/GB < 100) — likely waste

Work/GB = query cost (GB·ms) / ingest (GB). Lower = less value from data.

Analyze datasets in order

Work top-to-bottom. For each dataset:

Step 1: Column analysis

bash
scripts/analyze-query-coverage -d <deployment> -D <dataset> -a <audit-dataset>

If 0 queries → recommend DROP, move to next.

Step 2: Field value analysis

Pick a field from suggested list (usually app, service, or kubernetes.labels.app):

bash
scripts/analyze-query-coverage -d <deployment> -D <dataset> -a <audit-dataset> -f <field>

Note values with high volume but never queried (⚠️ markers).

Step 3: Handle empty values

If (empty) has >5% volume, you MUST drill down with alternative field (e.g., kubernetes.namespace_name).

Step 4: Record recommendation

For each dataset, note: name, ingest volume, Work/GB, top unqueried values, action (DROP/SAMPLE/KEEP), estimated savings.

Done when

All P0⛔ and P1 datasets analyzed. Then compile report using reference/analysis-report-template.md.



Cleanup

bash
# Delete monitors
axiom-api <deployment> GET "/v2/monitors" | jq -r '.[] | select(.name | startswith("Cost Control:")) | "\(.id)\t\(.name)"'
axiom-api <deployment> DELETE "/v2/monitors/<id>"

# Delete dashboard
dashboard-list <deployment> | grep -i cost
dashboard-delete <deployment> <id>

Note: Running create-monitors twice creates duplicates. Delete existing monitors first if re-deploying.


Reference

Audit Dataset Fields
FieldDescription
actionusageCalculated or runAPLQueryCost
properties.hourly_ingest_bytesHourly ingest in bytes
properties.hourly_billable_query_gbmsHourly query cost
properties.datasetDataset name
resource.idOrg ID
actor.emailUser email
Common Fields for Value Analysis
Dataset typePrimary fieldAlternatives
Kubernetes logskubernetes.labels.appkubernetes.namespace_name, kubernetes.container_name
Application logsapp or servicelevel, logger, component
Infrastructurehostregion, instance
Tracesservice.namespan.kind, http.route
Units & Conversions
  • Scripts use TB/day
  • Dashboard filter uses GB/month
ContractTB/dayGB/month
5 PB/month1675,000,000
10 PB/month33310,000,000
15 PB/month50015,000,000
Optimization Actions
SignalAction
Work/GB = 0Drop or stop ingesting
High-volume unqueried valuesSample or reduce log level
Empty values from system namespacesFilter at ingest or accept
WoW spikeCheck recent deploys

© openclaw, MIT. 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 14 other files (scripts) in .agents/skills/controlling-costs of openclaw/clawhub.

  • SKILL.md
  • README.md
  • reference/analysis-report-template.md
  • reference/dashboard-panels.md
  • reference/monitor-strategy.md
  • scripts/analyze-query-coverage
  • scripts/baseline-stats
  • scripts/create-monitors
  • scripts/deploy-dashboard
  • scripts/lib/ast-parser.jq
  • scripts/lib/format-bytes.sh
  • scripts/list-notifiers
  • scripts/setup
  • scripts/test-ast-parser
  • templates/dashboard.json

Open the folder on GitHubat commit c23e34a

Compare with similar skills

Axiom Cost Control 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.

Axiom Cost Control compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Axiom Cost Control this skillopenclaw/clawhub9.5k—~1.7kAutomated safety check: PassMIT
AWS Cost Operationszxkane/aws-skills3671 repos~2.4kAutomated safety check: PassMIT
Cost Managementgrafana/skills279—~1.1kAutomated safety check: PassApache-2.0
AWS Cost OperationsMicrock/ordinary-claude-skills4031 repos~2.5kAutomated safety check: PassCustom licence
Prometheus Missing Data Troubleshootingprometheus/prometheus-mcp118—~587Automated safety check: PassApache-2.0
Vercel Optimize Auditvercel-labs/agent-skills32k9 repos~4.3kAutomated safety check: PassNone

Similar skills

  • AWS Cost Operations

    zxkane/aws-skills

    AWS cost optimization, monitoring, and operational excellence expert.

    367 GitHub starsUsed in 1 repo~2.4k tokens
    DevOps & CloudAuto-check passed
  • Cost Management

    grafana/skills

    Official

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

    279 GitHub stars~1.1k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • AWS Cost Operations

    Microck/ordinary-claude-skills

    This skill provides AWS cost optimization, monitoring, and operational best practices with integrated MCP servers for billing analysis, cost estimation, observability, and security assessment.

    403 GitHub starsUsed in 1 repo~2.5k tokens
    DevOps & CloudAuto-check passed
  • Finds where a Prometheus metric stops existing, whether at the target, the scrape, relabeling or the query, using the tools of a connected Prometheus MCP server.

    118 GitHub stars~587 tokensUpdated 4 days ago
    DevOps & CloudAuto-check passed
  • Vercel Optimize Audit

    vercel-labs/agent-skills

    Official

    Runs a metrics-first audit of a deployed Vercel project, gating investigations on real signals to produce ranked, citation-backed cost and performance recommendations.

    32k GitHub starsUsed in 9 repos~4.3k tokens
    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 yesterday
    DevOps & CloudAuto-check: notes

More from openclaw/clawhub

All 56 skills in this repo
  • Creates and manages Axiom monitors and notifiers end to end through the v2 API, with scripts for each CRUD operation and a recommended create-validate-tune workflow.

    9.5k GitHub stars~2.1k tokensUpdated yesterday
    Auto-check passed
  • 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
    Auto-check passed
  • Axiom Metrics Query

    openclaw/clawhub

    Explores and queries OpenTelemetry metrics in Axiom MetricsDB, listing datasets, metrics and tags first and picking the right aggregation for each metric's type.

    9.5k GitHub stars~2.6k tokensUpdated yesterday
    Auto-check passed
  • Axiom SRE Investigator

    openclaw/clawhub

    Investigates incidents and production problems with hypothesis-driven debugging, queries Axiom observability data when available, and keeps secrets out of commands and output.

    9.5k GitHub stars~7.1k tokensUpdated yesterday
    Auto-check passed
  • Axiom Eval Writer

    openclaw/clawhub

    Scaffolds evaluation suites for the Axiom AI SDK: eval files, scorers, flag schemas and axiom.config.ts, generated from plain descriptions of an AI capability.

    9.5k GitHub stars~4.1k tokensUpdated yesterday
    Auto-check: warnings
  • Drafts, previews, sends and records email for an existing ClawHub content rights case through the admin CLI, with a dry run and your sign-off before anything goes out.

    9.5k GitHub stars~984 tokensUpdated yesterday
    Auto-check passed

Questions about Axiom Cost Control

What does Axiom Cost Control do?

Finds unused data in Axiom by analyzing query patterns, then deploys a cost dashboard and ingest monitors to keep spend under the contract limit. The agent starts by loading the axiom-sre and building-dashboards skills, finding the audit dataset (axiom-audit first, checking that it holds usageCalculated events), and confirming that axiom-history is readable, which the optimization phase needs. It also asks you for the deployment name, the audit dataset name and your contract limit in TB per day, which the monitors require.

When should I use Axiom Cost Control?

Axiom Cost Control fits situations like: reducing Axiom costs by finding unused columns or field values; tracking ingest spend with trends, burn rate and projections on a dashboard; creating monitors that alert as ingest approaches the contract limit; checking an existing cost dashboard for drift from the template.

How do I install Axiom Cost Control in Claude Code?

Run `npx skills add openclaw/clawhub --skill controlling-costs -a claude-code`. Or copy the skill folder (.agents/skills/controlling-costs in openclaw/clawhub) into .claude/skills/controlling-costs in your project. Claude Code loads it when a task matches its description.

How do I install Axiom Cost Control in Codex?

Run `npx skills add openclaw/clawhub --skill controlling-costs -a codex`. Or copy the skill folder (.agents/skills/controlling-costs in openclaw/clawhub) into .agents/skills/controlling-costs in your project. Codex loads it when a task matches its description.

Can I use Axiom Cost Control 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 openclaw/clawhub --skill controlling-costs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/controlling-costs, .gemini/skills/controlling-costs, .github/skills/controlling-costs and .opencode/skills/controlling-costs in your project.

What does Axiom Cost Control need to run?

Going by SKILL.md and its folder, Axiom Cost Control needs a shell for the scripts in its folder and the command-line tools its instructions call (jq). Our summary lists: An Axiom deployment with an audit dataset and axiom-history access; The axiom-sre and building-dashboards skills; jq; Your contract limit in TB per day, for the monitors.

Does Axiom Cost Control access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Axiom Cost Control 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Axiom Cost Control use?

Axiom Cost Control is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Axiom Cost Control use?

About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Axiom Cost Control?

Skills that share tags, products or a category with Axiom Cost Control: AWS Cost Operations (zxkane/aws-skills, 367 stars), Cost Management (grafana/skills, 279 stars), AWS Cost Operations (Microck/ordinary-claude-skills, 403 stars) and Prometheus Missing Data Troubleshooting (prometheus/prometheus-mcp, 118 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Axiom Cost Control?

openclaw (a GitHub organization) maintains it in openclaw/clawhub, which has 9,495 GitHub stars. The repository holds 56 skills in this directory. The repository was last updated on October 7, 2026.

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