controlling-costs
できること
このスキルは、Axiomへのクエリの仕方を見て、誰も使っていないデータを見つけ、その後、取り込みの費用を追跡するダッシュボードとモニターを作ります。対象は、ログの請求額を減らそうとしているチームです。
使う場面
- ✓Axiomのコストを減らすよう頼まれたとき。
- ✓誰もクエリしていない列やフィールドの値を見つけたいとき。
- ✓時間とともに取り込んだデータの量を追跡したいとき。
スキルのリンク
https://github.com/openclaw/clawhub/blob/main/.agents/skills/controlling-costs/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Axiomのデータの中で使われていないフィールドを見つけ、取り込みをどこで減らせるかを示してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、Axiomの監査データを読み、どのフィールドがクエリされているかを、保存されているものと比べます。その後、コストのダッシュボードとモニターを作ります。開始する前に、監査データセットの名前と契約上の上限を確認します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Axiom Cost Control
Dashboards, monitors, and waste identification for Axiom usage optimization.
Before You Start
Load required skills:
skill: axiom-sre skill: building-dashboardsBuilding-dashboards provides:
dashboard-list,dashboard-get,dashboard-create,dashboard-update,dashboard-deleteFind the audit dataset. Try
axiom-auditfirst:['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
usageCalculatedevents → wrong dataset, ask user
- If not found → ask user. Common names:
Verify
axiom-historyaccess (required for Phase 4):['axiom-history'] | where _time > ago(1h) | take 1If not found, Phase 4 optimization will not work.
Confirm with user:
- Deployment name?
- Audit dataset name?
- Contract limit in TB/day? (required for Phase 3 monitors)
Replace
<deployment>and<audit-dataset>in all commands below.
Tips:
- Run any script with
-hfor full usage - Do NOT pipe script output to
headortail— causes SIGPIPE errors - Requires
jqfor JSON parsing - Use axiom-sre's
axiom-queryfor 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>
Captures daily ingest stats and produces the Analysis Queue (needed for Phase 4).
Phase 2: Dashboard
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
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
scripts/create-monitors -d <deployment> -a <audit-dataset> -c <contract_tb> [-n <notifier_id>]
Creates 3 monitors:
- Total Ingest Guard — alerts when daily ingest >1.2x contract OR 7-day avg grows >15% vs baseline
- Per-Dataset Spike — robust z-score detection, alerts per dataset with attribution
- 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
Get the Analysis Queue
Run scripts/baseline-stats if not already done. It outputs a prioritized list:
| Priority | Meaning |
|---|---|
| P0⛔ | Top 3 by ingest OR >10% of total — MANDATORY |
| P1 | Never queried — strong drop candidate |
| P2 | Rarely 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
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):
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,
よくある質問
監査データが必要ですか?
はい。Axiomで監査のデータセットを探し、見つからなければその名前を尋ねます。
どのフェーズが実行されますか?
依頼に合うフェーズだけを実行します。たとえば、未使用のデータを探すことや、モニターを設定することです。
なぜ契約上の上限を尋ねるのですか?
コストのモニターは、使用量をあなたの契約上の上限と比べるもので、それは1日あたりのテラバイトで設定されているからです。
詳細
作者による元の説明
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.
repo: openclaw/clawhub
人気
- GitHubのスター
- 9.5k
- ランキング
- #12229
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
axiom-alerting
9.5kエージェントが、Axiom APIを通じてAxiomのモニターと通知のルートを作って管理し、アラートが期待どおり動くかを確認できるよう支援します。
axiom-sre
9.5kエージェントが、本番のインシデントやバグを段階的に調べ、各推測をAxiomのログに照らして検証してから結論を出せるよう支援します。
building-dashboards
9.5kエージェントが、何の判断を支えるべきかという点から始めて、適切なグラフ、クエリ、フィルターを使ったAxiomのダッシュボードを設計できるよう支援します。
convex-acquire-domain
9.5kエージェントが、Convexのアプリ用のドメインを探してConvexを通じて購入し、アプリに接続できるよう支援します。名前を選び、同意した後にだけ行います。
似ているスキル
openclaw-update
394k既存のOpenClaw Gatewayを更新するようエージェントを支援します。インストール方法に合った更新方法を選び、セッションを動かし続けます。
diagnose-gateway
394k設定、チャンネル、ポートを確認して、OpenClaw Gatewayが失敗している理由を、何も変更せずに突き止めるようエージェントを支援します。
crabbox-apps
394k一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。