cost-tracking
Track and report AI model token usage, spending, and budgets from a local cost-tracking database.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Track and report AI model token usage, spending, and budgets from a local cost-tracking database.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Create professional architecture, workflow, sequence, data-flow, and lifecycle/state diagrams as standalone HTML files with SVG graphics, a built-in dark/light theme toggle, and one-click export to PNG / JPEG / WebP / SVG. Accepts plain-language descriptions or pasted Mermaid code (flowchart, sequenceDiagram, stateDiagram) and lays the diagram out from scratch in archify style. Use when the user asks for system architecture diagrams, infrastructure diagrams, cloud architecture visualizations, security diagrams, network topology, technical workflows, approval flows, runbooks, CI/CD flows, process diagrams, API call sequences, request lifecycles, data pipelines, ETL/ELT maps, PII boundaries, data lineage, state machines, lifecycle diagrams, status transitions, or asks to convert/beautify a Mermaid diagram.
Data analysis methodology — how to frame a question, pick the right technique, avoid statistical traps, and connect results to decisions. NOT a tool tutorial (pandas/polars/duckdb live in python-data-analysis) — this is the judgment layer: problem framing, analysis-type decision tree, experiment/causal design, and domain playbooks (churn, cohort, funnel, anomaly). Trigger: "왜 늘었/줄었지", 이탈 분석, 코호트, 퍼널, A/B 테스트, 인과추론, 상관 vs 인과, 유의성, 세그먼트, 이상 탐지, "이 데이터로 뭘 봐야", 지표 설계, exploratory analysis.
AWS cost management and FinOps practice — Cost Explorer, Budgets, Cost Anomaly Detection, CUR/data exports, cost allocation tags, Cost Categories, Savings Plans vs Reserved Instances, Compute Optimizer / Cost Optimization Hub, rightsizing, unit economics, showback/chargeback. Grounded in the FinOps Foundation Framework (Inform / Optimize / Operate). Trigger: cost anomaly, Savings Plan, Reserved Instance, rightsizing, cost allocation tag, chargeback, showback, unit cost, budget alert, CUR, Cost Explorer, unblended/amortized cost, RI coverage, commitment, "왜 청구서가 늘었지".
Multi-source deep research using firecrawl and exa MCPs. Searches the web, synthesizes findings, and delivers cited reports with source attribution. Use when the user wants thorough research on any topic with evidence and citations.
Conduct market research, competitive analysis, investor due diligence, and industry intelligence with source attribution and decision-oriented summaries. Use when the user wants market sizing, competitor comparisons, fund research, technology scans, or research that informs business decisions.
기술 문서를 정확하고 명확하고 실행 가능하게 작성·윤문하는 스킬. 개발 가이드·API 문서·README·테크 블로그·기술 리포트를 대상으로, 번역투·hype·모호성을 제거하고 전제조건·코드 예제·용어 일관성·구조를 보강한다.
| name | cost-tracking |
| description | Track and report AI model token usage, spending, and budgets from a local cost-tracking database. |
| origin | harness |
| workloads | ["finops","ai"] |
Use this skill to analyze AI model cost and usage history from a local SQLite database. It is intended for users who already have a cost-tracking hook or plugin writing usage rows to a local database.
First verify prerequisites:
command -v sqlite3 >/dev/null && echo "sqlite3 available" || echo "sqlite3 missing"
test -f ~/.cost-tracker/usage.db && echo "Database found" || echo "Database not found"
If the database is missing, do not fabricate usage data. Tell the user that cost tracking is not configured and suggest installing or enabling a trusted local cost-tracking hook/plugin.
The expected usage table usually contains one row per tool call or model interaction. Column names vary by tracker, but common columns are:
| Column | Meaning |
|---|---|
timestamp | ISO timestamp for the usage event |
project | Project or repository name |
tool_name | Tool or event name |
input_tokens | Input token count, when recorded |
output_tokens | Output token count, when recorded |
cost_usd | Precomputed cost in USD |
session_id | Session identifier |
model | Model used for the event |
Prefer cost_usd over hand-calculating pricing. Model prices and cache pricing change over time, and the tracker should be the source of truth for how each row was priced.
sqlite3 ~/.cost-tracker/usage.db "
SELECT
'Today: $' || ROUND(COALESCE(SUM(CASE WHEN date(timestamp) = date('now') THEN cost_usd END), 0), 4) ||
' | Total: $' || ROUND(COALESCE(SUM(cost_usd), 0), 4) ||
' | Calls: ' || COUNT(*) ||
' | Sessions: ' || COUNT(DISTINCT session_id)
FROM usage;
"
sqlite3 -header -column ~/.cost-tracker/usage.db "
SELECT project, ROUND(SUM(cost_usd), 4) AS cost, COUNT(*) AS calls
FROM usage
GROUP BY project
ORDER BY cost DESC;
"
sqlite3 -header -column ~/.cost-tracker/usage.db "
SELECT tool_name, ROUND(SUM(cost_usd), 4) AS cost, COUNT(*) AS calls
FROM usage
GROUP BY tool_name
ORDER BY cost DESC;
"
sqlite3 -header -column ~/.cost-tracker/usage.db "
SELECT date(timestamp) AS date, ROUND(SUM(cost_usd), 4) AS cost, COUNT(*) AS calls
FROM usage
WHERE date(timestamp) >= date('now', '-7 days')
GROUP BY date(timestamp)
ORDER BY date DESC;
"
sqlite3 -header -column ~/.cost-tracker/usage.db "
SELECT session_id,
MIN(timestamp) AS started,
MAX(timestamp) AS ended,
ROUND(SUM(cost_usd), 4) AS cost,
COUNT(*) AS calls
FROM usage
GROUP BY session_id
ORDER BY started DESC
LIMIT 10;
"
sqlite3 -header -column ~/.cost-tracker/usage.db "
SELECT model, ROUND(SUM(cost_usd), 4) AS cost, SUM(input_tokens) AS in_tokens, SUM(output_tokens) AS out_tokens
FROM usage
GROUP BY model
ORDER BY cost DESC;
"
When presenting cost data, include:
For small amounts, format currency with four decimal places. For larger amounts, two decimals are enough.
cost_usd is present.SELECT * exports on large databases.