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,568 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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for controlling-costs

Your own site · 80×15
<a href="https://agentmods.dev/skills/openclaw/clawhub/controlling-costs"><img src="https://agentmods.dev/badge/skills/openclaw/clawhub/controlling-costs.svg" alt="Reviewed on agentmods" width="80" 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 181
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • medium Excessive Agency · line 44
    Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.
    Fix: Restrict tool access to only the tools required for the skill's stated purpose. Use an explicit allowlist rather than granting blanket access.
How audits are shown
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.5 $0.00020 $0.00723
Sonnet 5.5 $0.00010 $0.00362
Haiku 4.5 $0.00005 $0.00181

Measured 3mo ago against content hash a0823b1b1581, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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 3mo 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. 3mo 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,568 stars, last pushed today), licensed MIT. It adds 50 tokens to every session and 1,808 once invoked, about $0.0002 per session on Opus 5.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.

Related

controlling-costs compared with skills from other repositories

controlling-costs next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
controlling-costsopenclaw/clawhubSkill9.6ktodayMITB50Claude Code, Codex
directory-based-skillagentfront/frontmcpSkill154todayApache-2.0A28Claude Code, Codex
patent-maphandsomestWei/patent-disclosure-skillSkill14ktodayMITA48Claude Code
trip-planning-briefiflytek/skillhubSkill5.5ktodayApache-2.0A99Claude Code, Codex
sandbaseiflytek/skillhubSkill5.5ktodayApache-2.0A67Claude Code
regex-masteryalibaba/anolisaSkill68810d agoApache-2.0A60Claude Code, Codex
ws-ckptalibaba/anolisaSkill68810d agoApache-2.0A115Claude Code, Codex