Agent SkillsQuixiAI/Hexis › cost-report

cost-report

GitHub

查询 API 使用账本,按提供商、模型和时间段生成详细的成本报告。支持预算阈值监控和支出预测,帮助评估 LLM、嵌入及工具调用的费用效率。

skills/installed/cost-report/SKILL.md QuixiAI/Hexis

Trigger Scenarios

用户询问花费或展示使用情况 心跳检测接近预算阈值时 评估模型或提供商切换的成本效益

Install

npx skills add QuixiAI/Hexis --skill cost-report -g -y
More Options

Non-standard path

npx skills add https://github.com/QuixiAI/Hexis/tree/main/skills/installed/cost-report -g -y

Use without installing

npx skills use QuixiAI/Hexis@cost-report

指定 Agent (Claude Code)

npx skills add QuixiAI/Hexis --skill cost-report -a claude-code -g -y

安装 repo 全部 skill

npx skills add QuixiAI/Hexis --all -g -y

预览 repo 内 skill

npx skills add QuixiAI/Hexis --list

SKILL.md

Frontmatter
{
    "name": "cost-report",
    "aliases": [
        "cost",
        "costs",
        "spend",
        "spent",
        "usage",
        "tokens",
        "budget",
        "bill",
        "billing"
    ],
    "category": "analytics",
    "contexts": [
        "heartbeat",
        "chat"
    ],
    "requires": {
        "tools": [
            "query_usage"
        ]
    },
    "bound_tools": [
        "query_usage"
    ],
    "description": "Query and report on API usage costs across LLM, embedding, and tool providers"
}

Usage Cost Reporting

Query the API usage ledger and produce clear, actionable cost reports broken down by provider, model, and time period.

When to Use

  • When the user asks "how much have I spent" or "show me my usage"
  • During heartbeats to check if spending is approaching a configured budget threshold
  • When evaluating whether to switch models or providers based on cost efficiency
  • As part of a daily or weekly briefing that includes operational metrics
  • After a heavy ingestion or research session to assess the cost impact

Step-by-Step Methodology

  1. Determine the time window: Default to the current billing period (calendar month) unless the user specifies a range. Common windows: today, this week, this month, last 30 days, custom range.
  2. Query the ledger: Use query_usage with the appropriate date range. The tool returns rows from the api_usage table with provider, model, token counts (input/output), and computed cost.
  3. Aggregate by dimension: Break down the raw data into useful summaries:
    • By provider: Total cost per provider (OpenAI, Anthropic, local inference, etc.)
    • By model: Cost per model to identify which models consume the most budget
    • By category: Separate LLM inference costs from embedding costs from tool API costs
    • By day: Daily trend to spot spikes or patterns
  4. Compute key metrics: Calculate:
    • Total spend for the period
    • Average daily cost
    • Cost per conversation (if trackable)
    • Projected monthly cost at current burn rate
  5. Compare to budget: If a budget threshold is configured, compare current spend and projection against it. Flag if on track to exceed.
  6. Present the report: Format as a clean table or summary. Lead with the headline number (total spend), then break down by the most useful dimension.

Quality Guidelines

  • Always show actual numbers, not vague descriptions. "You have spent $4.32 this month" is useful; "you have moderate usage" is not.
  • Round costs to two decimal places for readability.
  • When projecting monthly cost, note that it is an extrapolation and actual spend may vary.
  • If the usage ledger is empty or the query returns no data, say so plainly rather than reporting zeros that could be misleading.
  • In heartbeat context, only generate a cost report if spend is approaching a threshold or if a goal explicitly asks for cost monitoring. Do not waste energy on routine cost checks every heartbeat.
  • Protect cost data as operational metadata. Do not expose it to external services.

Version History

  • 97f625f Current 2026-08-29 01:31
  • 990da5f 2026-08-20 13:52

Same Skill Collection

plugins/installed/fathom/skills/fathom/SKILL.md
skills/installed/calendar/SKILL.md
skills/installed/code-execution/SKILL.md
skills/installed/connector-action-authorization/SKILL.md
skills/installed/core-memory/SKILL.md
skills/installed/council/SKILL.md
skills/installed/crm-lookup/SKILL.md
skills/installed/daily-briefing/SKILL.md
skills/installed/delegation/SKILL.md
skills/installed/email-digest/SKILL.md
skills/installed/expense-capture/SKILL.md
skills/installed/github-issues/SKILL.md
skills/installed/gmail-actions/SKILL.md
skills/installed/gmail-connector-setup/SKILL.md
skills/installed/humanizer/SKILL.md
skills/installed/image-gen/SKILL.md
skills/installed/inbox-triage/SKILL.md
skills/installed/integration-connector-setup/SKILL.md
skills/installed/knowledge-ingest/SKILL.md
skills/installed/meeting-follow-up/SKILL.md
skills/installed/meeting-prep/SKILL.md
skills/installed/memory-exchange/SKILL.md
skills/installed/operations/SKILL.md
skills/installed/outreach/SKILL.md
skills/installed/personal-notes/SKILL.md
skills/installed/self-inspection/SKILL.md
skills/installed/self-reflection/SKILL.md
skills/installed/skill-authoring/SKILL.md
skills/installed/travel-prep/SKILL.md
skills/installed/twitter-x-actions/SKILL.md
skills/installed/twitter-x-connector-setup/SKILL.md
skills/installed/weekly-review/SKILL.md
plugins/installed/asana/skills/asana/SKILL.md
plugins/installed/hubspot/skills/hubspot/SKILL.md
plugins/installed/todoist/skills/todoist/SKILL.md
plugins/installed/youtube/skills/youtube/SKILL.md
skills/installed/research/SKILL.md
plugins/installed/twitter/skills/twitter/SKILL.md
plugins/installed/video_gen/skills/video_gen/SKILL.md

Metadata

Files
0
Version
97f625f
Hash
2b9e99a1
Indexed
2026-08-20 13:52

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-30 01:05
浙ICP备14020137号-1 $방문자$