/axiom:axiom-control-costsfrom axiom
Analyzes Axiom query patterns to find unused data, builds dashboards and monitors for cost optimization. Use to reduce Axiom costs, find unused columns or field values, identify data waste, or track ingest spend.
Ships in axiom. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Dashboards, monitors, and waste identification for Axiom usage optimization.
Select the requested phases from the table below. Use the connected Axiom MCP tools for all Axiom access. Use Axiom dashboards for dashboards. Use Axiom alerting for monitors and notifiers.
Local helpers analyze exported results without credentials or network access. Keep MCP calls and exported evidence in the selected organization.
Find the audit dataset. Try axiom-audit first:
['axiom-audit']
| where _time > ago(1h)
| summarize count() by action
| where action in ('usageCalculated', 'runAPLQueryCost')
axiom-audit-logs-view, audit-logsusageCalculated events appear, verify the organization and time coverage.If Phase 4 is requested, verify axiom-history access:
['axiom-history'] | where _time > ago(1h) | take 1
If unavailable, report that query-use analysis is blocked.
Resolve the organization and audit dataset from the request and available context. For contract comparisons, establish a positive amount, its unit, and its period. Ask only when a missing or ambiguous value blocks a requested phase.
For local analysis, follow Analysis workflow for query preparation, complete exports, and input formats.
Run usage queries through queryDataset with explicit start and end times.
Local analysis requires Python 3.10+, Bash, and jq.
Run helpers from this skill’s directory and keep exports in a separate task directory.
| User request | Run 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 |
Inspect only resources relevant to the request.
For dashboards, use MCP listDashboards in the selected organization.
Use checkMonitors to find existing monitors.
Read relevant definitions with getMonitor.
Compare their organization, dataset, query, condition, and notification destinations.
Reuse a suitable monitor when the request calls for changing it.
If a dashboard is found, read it with MCP getDashboard.
Compare its measurements with Dashboard panels for the selected scope and period.
Report missing measurements or changed calculations.
For requested changes, follow the dashboard workflow in Phase 2.
Follow Usage to measure ingest and query work, establish coverage, and build the dataset review queue.
Use Axiom dashboards to build the cost dashboard from the measurements in Dashboard panels. Discover and test the queries, then create or edit the dashboard through MCP. Keep it in the same organization as the cost analysis.
Select the requested conditions from Cost monitors. Use Axiom alerting to test queries, select notification destinations, apply changes, and inspect saved definitions.
For contract comparisons, establish a positive amount, its unit, and its period. Resolve the notification destination from the request and existing configuration. Ask only when a missing choice blocks the requested setup.
Create only missing monitors. For changes, start from the current monitor definition. A matching name prefix does not authorize deleting or replacing a monitor.
Use the review queue from Usage. Complete its required dataset set before calling the assessment complete. Report omissions and coverage gaps.
Work top-to-bottom. For each dataset, collect the required evidence through MCP. Follow Analysis workflow for fixed windows, independent history totals, and complete samples.
Step 1: Column analysis
scripts/analyze-query-coverage --queries history.csv --counts history-count.csv --schema schema.csv
If no queries are observed, record the history period and coverage limits. Malformed queries or incomplete exports block the affected analysis; they do not establish unused data.
Step 2: Field value analysis
Pick a field from suggested list (usually app, service, or kubernetes.labels.app):
scripts/analyze-query-coverage --queries history.csv --counts history-count.csv --field <field> --sample-plan samples-plan.json --samples-dir <export-directory>
Treat values without explicit literal targeting as review candidates. Other predicates, groupings, and unfiltered queries can still use those values.
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, record the assessed periods, coverage limits, proposed action, supporting evidence, and estimated savings. Review known retention and operational requirements before recommending changes to collection.
Complete the minimum review set reported by the analysis queue before calling the assessment complete. Report unassessed datasets and coverage gaps. Compile findings using Analysis report.
Use Axiom alerting for requested monitor cleanup. Use Axiom dashboards for requested dashboard cleanup. Identify the exact resources, delete only those authorized, and verify absence.
| Field | Description |
|---|---|
action | usageCalculated or runAPLQueryCost |
properties.hourly_ingest_bytes | Hourly ingest in bytes |
properties.hourly_billable_query_gbms | Hourly query cost |
properties.dataset | Dataset name |
resource.id | Resource ID. Interpret it with resource.type for the event. |
actor.email | User email |
| Dataset type | Primary field | Alternatives |
|---|---|---|
| Kubernetes logs | kubernetes.labels.app | kubernetes.namespace_name, kubernetes.container_name |
| Application logs | app or service | level, logger, component |
| Infrastructure | host | region, instance |
| Traces | service.name | span.kind, http.route |
Record the contract amount, unit, and period. Convert the contract and measured usage to matching units and periods. State the number of days used when converting between periods. For dashboards, match the contract unit and period to the projection in Dashboard panels.
| Signal | Action |
|---|---|
| Work/GB = 0 | Inspect raw query work and history coverage using the panel guide |
| High-volume values without observed query use | Review coverage and retention requirements before proposing collection changes |
| Empty values from system namespaces | Identify the source and required data before proposing ingest filters |
| WoW spike | Check recent deploys |
README.md (opens in a new tab)SPEC.md (opens in a new tab)reference/analysis-report-template.md (opens in a new tab)reference/analysis-workflow.md (opens in a new tab)reference/dashboard-panels.md (opens in a new tab)reference/monitor-strategy.md (opens in a new tab)reference/usage.md (opens in a new tab)scripts/analyze-query-coverage (opens in a new tab)scripts/baseline-stats (opens in a new tab)scripts/lib/ast-parser.jq (opens in a new tab)scripts/lib/cost_analysis.py (opens in a new tab)scripts/prepare-queries (opens in a new tab)scripts/test-analysis (opens in a new tab)scripts/test-ast-parser (opens in a new tab)tests/manual-tests.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
axiom-cost, cost-optimization, data-waste, ingest-monitoring
npx claudepluginhub axiomhq/skills --plugin axiom10 skills in this plugin
/axiom-alertingConfigure Axiom monitors and notifiers through MCP. Use when creating alerts, changing notification routing, or investigating monitor behavior./axiom-build-dashboardDesign, create, edit, and migrate Axiom dashboards. Use when selecting measurements, charts, filters, or investigation paths, or adapting dashboards from Grafana or Splunk./axiom-create-orgCreate a temporary Axiom organization through the CLI. Use when the user needs an organization before account setup or requests a temporary one.Other plugins' skills for the same job