← Back to the catalog

Skill · Version 1.0.0

Cost reports with drill-down

Builds understandable cost reports whose totals lead to the underlying tasks, runs and immutable usage records.

cost-reporting-drill-down

See how it helps

When is it useful?

Use when users need to explain a spending total or compare the cost of completed work.

What does it help you do?

  • Keeps organization, service, project and run breakdowns consistent with parent totals.
  • Uses aggregated data for dashboards and detailed records for investigation.
  • Shows freshness, currencies, units and estimated versus reconciled portions.

Try asking this

Design a cost dashboard that opens a tenant total into model costs, individual runs and the original ledger entries. Open one unusually expensive run from the monthly total. Its raw events, pricing version and adjustments should explain the amount without exposing other tenants.

Detailed documentation

Read the skill’s original instructions, examples and checks in their authored language.

Details…Show less

Cost Reporting & Drill-Down

A cost number that cannot be drilled down to the exact tasks, agent turns, or storage buckets that produced it will not be trusted by users, operators, or finance teams.

Workflow

  1. Hierarchical drill-down without loss of consistency:
    • Support seamless drill-down paths where every level sums to the exact parent total:
      1. Organization / Tenant Summary: Total direct cost, allocated cost, budget utilization %, and period-over-period delta.
      2. Service / Resource Breakdown: LLM inference vs. storage vs. bandwidth vs. background compute.
      3. Workflow / Project / Agent Breakdown: Which project, workflow, or agent role (agentRole, model) consumed the budget.
      4. Task & Run Trace: Individual taskId / runId with turn-by-turn token progression, cache hit rate, retries, and duration.
      5. Raw Ledger Entries: The underlying immutable events with occurredAt, rateVersionId, certainty, and providerRequestId.
  2. Query pre-aggregated rollups for dashboards; raw ledgers for trace inspection:
    • Serve time-series charts (hourly, daily, monthly) and top-N leaderboards from pre-aggregated rollup tables indexed by (tenant_id, bucket_start, service, model, agent_role) so dashboard queries return in milliseconds regardless of raw event volume.
    • Coordinate with the database specialist on composite indexes and partitioning, and with the data visualization specialist so time-bucket boundaries, currency formatting, and unit labels (tokens, GB-month, USD) are unambiguous.
  3. Surface data freshness, certainty, and unit economics:
    • Include metadata on every report response:
      • asOfTimestamp / watermarkTimestamp: How fresh the rollup data is.
      • estimatedShareMicros vs. providerReportedMicros vs. reconciledMicros: Clearly badge any portion of recent spend that still relies on local estimates.
    • Compute actionable unit-economics metrics:
      • Average and P95 cost per task / per run / per active workspace.
      • Cache savings (listCostWithoutCacheMicros - actualCostMicros) so teams can see the concrete dollar return of prompt caching and model routing optimizations.

Anti-Patterns to Avoid

  • Running SUM() over tens of millions of raw events on every dashboard page load: Always use incremental rollups for overview ranges and reserve raw event queries for single-run drill-downs or export jobs.
  • Many-to-many join fan-out in reporting SQL: Joining usage events directly to multi-row tag or membership tables without pre-aggregating inflates reported spend by the number of joined rows.

Included files 1

  • SKILL.md

About this skill package

cost-reporting-drill-down

cost-reporting-drill-down: Make usage and AI costs explainable with consistent metering events, pricing, quotas, reconciliation and drill-down reports.

Details…Show less

cost-reporting-drill-down

cost-reporting-drill-down: Make usage and AI costs explainable with consistent metering events, pricing, quotas, reconciliation and drill-down reports.

Includes the complete skill and its supporting files (1 files). The exact authored scope is preserved below.

Original skill description (source language)

Use when building fast, accurate cost and usage reporting APIs, rollups, unit-economics views, and drill-down queries from tenant totals down to individual tasks, agent runs, and raw events.

Install the skill, review its source and trust settings, then enable it for the relevant project or agent.

Requirements

  • Orqestria installed on your computer.