controlling-costs

controlling-costs is a skill for Claude Code, Codex from openclaw/clawhub. It costs 50 tokens per session (1,808 once invoked), scanned B, original, MIT.

A cost-control workflow for Axiom, a service for storing and querying event and log data.

In plain words
What is it for?
It is for auditing Axiom usage, identifying unused fields or values, building cost dashboards, and setting monitors for ingest-spend limits.
Why use it?
It helps find unused data and query activity that may be increasing storage or data-ingest costs without providing value.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit It is for auditing Axiom usage, identifying unused fields or values, building cost dashboards, and setting monitors for ingest-spend limits.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/openclaw/clawhub/controlling-costs
About the project

ClawHub is a public registry where OpenClaw users publish, version, search, and install text-based agent skills and OpenClaw packages. It provides web browsing, a CLI-oriented API, moderation, vector search, and artifact hosting for code plugins, bundle plugins, and experimental whole-agent packages. The catalogue skills and agents are entries that can be discovered or used through this registry.

openclaw/clawhub · 9,399 stars · on GitHub · clawhub.ai

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.

Any agent
npx skills add openclaw/clawhub --skill controlling-costs
Clone the repo
git clone --depth 1 https://github.com/openclaw/clawhub

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 controlling-costs

README.md
[![agentmods](https://agentmods.dev/badge/skills/openclaw/clawhub/controlling-costs.svg)](https://agentmods.dev/skills/openclaw/clawhub/controlling-costs)
Your own site
<a href="https://agentmods.dev/skills/openclaw/clawhub/controlling-costs"><img src="https://agentmods.dev/badge/skills/openclaw/clawhub/controlling-costs.svg" alt="Measured on agentmods" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,808 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00050 $0.01808
Opus 5 $0.00025 $0.00904
Sonnet 5 $0.00010 $0.00362
Haiku 4.5 $0.00005 $0.00181

Measured 7d ago against content hash a0823b1b1581, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade B, and why

controlling-costs scanned grade B with 1 finding 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 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/lib/format-bytes.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

- Run any script with `-h` for full usage
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.agents/skills/controlling-costs/SKILL.md · 233 lines

How it starts

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

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:

    ['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):

    ['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 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

Phase 0: Check Existing Setup

# 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

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

Read the full file on GitHub · 233 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. 7d ago First seen · 233 lines · 50 tokens per session scan B a0823b1b1581

Subscribe to this mod's changes

controlling-costs is a skill published in the GitHub repository openclaw/clawhub (9,399 stars, last pushed today), licensed MIT. It adds 50 tokens to every session and 1,808 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.