controlling-costs
Skill này làm gì
Skill này xem cách Axiom được truy vấn để tìm dữ liệu không ai dùng, rồi thiết lập dashboard và monitor để theo dõi chi phí nhập dữ liệu. Dành cho các nhóm muốn giảm hóa đơn ghi log.
Khi nào nên dùng
- ✓Khi bạn được yêu cầu giảm chi phí Axiom.
- ✓Khi bạn muốn tìm các cột hoặc giá trị trường mà không ai truy vấn.
- ✓Khi bạn muốn theo dõi lượng dữ liệu nhập vào theo thời gian.
Liên kết skill
https://github.com/openclaw/clawhub/blob/main/.agents/skills/controlling-costs/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tìm các trường không dùng trong dữ liệu Axiom của chúng tôi và cho tôi biết có thể cắt giảm nhập liệu ở đâu.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill đọc dữ liệu kiểm toán của Axiom để xem trường nào được truy vấn, rồi so sánh với những gì được lưu. Sau đó nó xây dựng dashboard và monitor chi phí. Nó hỏi bạn xác nhận tên tập dữ liệu kiểm toán và giới hạn hợp đồng trước khi bắt đầu.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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,
Câu hỏi thường gặp
Nó có cần dữ liệu kiểm toán không?
Có. Nó tìm tập dữ liệu kiểm toán trong Axiom và yêu cầu bạn nêu tên nếu không tìm thấy.
Những giai đoạn nào được chạy?
Nó chỉ chạy các giai đoạn khớp với yêu cầu của bạn, như tìm dữ liệu không dùng hoặc thiết lập monitor.
Vì sao nó hỏi giới hạn hợp đồng?
Các monitor chi phí so sánh mức dùng với giới hạn hợp đồng, được đặt theo terabyte mỗi ngày.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 9.5k
- Vị trí xếp hạng
- #12229
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
axiom-alerting
9.5kGiúp agent của bạn tạo và quản lý monitor cùng các tuyến thông báo của Axiom qua API Axiom, và kiểm tra cảnh báo hoạt động đúng như mong đợi.
axiom-sre
9.5kGiúp agent của bạn điều tra sự cố và lỗi production từng bước, kiểm tra mỗi giả thuyết với log Axiom trước khi đưa ra kết luận.
building-dashboards
9.5kGiúp agent của bạn thiết kế dashboard Axiom với biểu đồ, truy vấn và bộ lọc phù hợp, bắt đầu từ các quyết định mà dashboard phải hỗ trợ.
convex-acquire-domain
9.5kGiúp agent của bạn tìm và mua tên miền cho app Convex qua Convex, rồi kết nối với app, chỉ sau khi bạn chọn tên và đồng ý.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.