Cost attribution and reconciliation
Connects individual resource charges to owners and execution records, then compares internal totals with provider reports.
cost-attribution-reconciliation
See how it helpsWhen is it useful?
Use when you need to explain who incurred costs and why internal accounting differs from external bills.
What does it help you do?
- Preserves initiating and executing actors across project, workflow and infrastructure dimensions.
- Keeps internal and unattributed costs visible instead of discarding them.
- Classifies missing events, time-window differences and estimated-versus-reported discrepancies.
Try asking this
Reconcile daily provider charges with task costs and create an explicit bucket for usage missing tenant attribution. Show attributed, shared and unresolved charges separately. Their sum must reconcile to the provider export, with time-window differences documented rather than discarded.
Detailed documentation
Read the skill’s original instructions, examples and checks in their authored language.
Show less
Cost Attribution & Reconciliation
Every unit of resource consumption must be traceable both bottom-up (from an individual task, agent step, or API request to a tenant) and top-down (from the monthly cloud/AI provider invoice back to internal usage buckets).
Workflow
- Multi-level attribution hierarchy:
- Design attribution dimensions so every cost entry can be sliced along:
- Organizational axis:
tenantId->workspaceId->projectId->userId/apiKeyId. - Execution axis:
feature/workflowId->taskId->runId->agentRole->phase->toolCallId. - Infrastructure axis:
provider->service->modelOrSku->environment(prod,staging,ci).
- Organizational axis:
- Preserve both the initiating actor (user who triggered the work) and the executing actor (subagent or worker that incurred the cost).
- Design attribution dimensions so every cost entry can be sliced along:
- Explicitly classify unattributed and platform-internal usage:
- Never drop events without a customer
tenantId. Route them to explicit internal cost centers (system:healthcheck,system:eval_suite,system:embeddings_backfill,system:unattributed_quarantine). - Track the attribution coverage ratio: $\text{Attributed Cost} / \text{Total Internal Ledger Cost}$ (target $\ge 99%$).
- Never drop events without a customer
- Reconcile internal ledger against provider billing APIs / exports:
- Ingest external usage/cost reports (OpenAI/Anthropic usage & cost APIs, cloud billing / FOCUS exports, storage metrics) segmented by provider key, workspace, project, or billing tag.
- Compare for each
(date, provider, modelOrSku)bucket: $$\Delta_{\text{units}} = \text{ProviderUnits} - \text{InternalUnits}, \quad \Delta_{\text{cost}} = \text{ProviderCost} - \text{InternalCost}$$ - Classify discrepancies systematically:
- Missing instrumentation: Endpoints, retries, or subagent calls bypassing the metering hook.
- Clock / timezone skew: Events near UTC midnight bucketed into adjacent days.
- Estimated vs. actual gap: Aborted streams or tokenizer estimates diverging from provider counts.
- Rate card mismatch: Discount tiers, cache multipliers, or minimum fees missing from the catalog.
Anti-Patterns to Avoid
- Lumping all API calls under one shared key with no metadata: Prevents verifying which environment or tenant caused an invoice spike.
- Silently smearing reconciliation errors across customers: Keep invoice variance in a dedicated
reconciliation_variancebucket until root-caused. - Confusing internal cost attribution with customer invoicing: Keep internal COGS tracking and external customer plan billing cleanly separated.
Included files 1
SKILL.md
About this skill package
cost-attribution-reconciliation
cost-attribution-reconciliation: Make usage and AI costs explainable with consistent metering events, pricing, quotas, reconciliation and drill-down reports.
Show less
cost-attribution-reconciliation
cost-attribution-reconciliation: 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 attributing usage and internal costs across tenants, workspaces, projects, tasks, agents, and features, and reconciling internal ledgers against external provider billing exports.
Install the skill, review its source and trust settings, then enable it for the relevant project or agent.
Requirements
- Orqestria installed on your computer.
