Skip to content
Back to skills

Ai Cost And Metering

ASecurity

Use when modeling, metering, attributing, billing, or controlling AI usage costs across tenants, plans, features, providers, and agent workloads.

  • 28 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 28, 2026
developmentgosecurity

Security analysis

A100/100

Pro scans all 10 files and shows the line behind each finding

Scanned September 20, 2026

npx -y skills add peterbamuhigire/skills-web-dev --skill ai-cost-and-metering --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ai Cost And Metering?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ai Cost And Metering
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/peterbamuhigire-ai-cost-and-metering/badge)](https://www.skillsdirectory.com/skills/peterbamuhigire-ai-cost-and-metering)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ai-cost-and-metering
description: Use when modeling, metering, attributing, billing, or controlling AI usage costs across tenants, plans, features, providers, and agent workloads.
metadata:
  portable: true
  compatible_with:
  - claude-code
  - codex
---

# AI Cost And Metering

## Operating contract

## Inputs

| Input | Required | Purpose |
|---|---|---|
| Domain evidence | yes | provider price cards and effective dates, usage events, tenant and feature keys, budgets, billing terms, and currency rules |

## Outputs

- Produce: meter schema, attribution rules, cost model, budget controls, reconciliation checks, and billing handoff.

## Capability and permission boundaries

Default to read-only analysis. Read only scoped records; redact secrets and regulated data. Writes, execution, network calls, production configuration, customer communication, billing changes, and delegation require explicit authority and an identified owner. Never widen tenant, time-window, or system scope implicitly.

## Degraded mode

When required telemetry, evidence, execution, network access, or write authority is unavailable, return a partial result with each unassessed item labelled, preserve the safest existing state, and state the evidence or approval needed to continue. Never convert missing evidence into a pass.

## Decision rules

| Condition | Action |
|---|---|
| Scope, owner, or threshold is missing | Stop the affected decision and request it |
| Evidence is incomplete but read-only analysis is safe | Produce a qualified partial result and gap list |
| A mutation exceeds authority or tenant boundary | Block it and route for approval |
| Evidence meets the stated threshold | Issue the output with provenance and owner |

## Anti-Patterns

- Treating absent evidence as success. Fix: mark the check unassessed and name the missing source.
- Expanding one tenant or workflow to all tenants. Fix: enforce supplied scope at every query and action.
- Performing a production write during analysis. Fix: emit a reviewed change plan until authority is explicit.
- Reporting a metric without population, window, or source. Fix: attach all three.
- Hiding a failed threshold inside an average. Fix: report failure slices and the remediation owner.

Acknowledgement: Shared by Peter Bamuhigire, techguypeter.com, +256 784 464178.

<!-- dual-compat-start -->

## Use When

- Design AI usage metering, cost attribution, quotas, chargeback, or billing controls.
- Model AI cost by tenant, feature, provider, model, request, or agent task.
- Connect cost evidence to plan limits, entitlement enforcement, and customer-facing billing.

## Do Not Use When

- The work is not AI-specific or agentic-AI-specific.
- A narrower retained AI parent skill fits the request better.

## Required Inputs

- Product, tenant, user, data, risk, and operational context relevant to the AI workflow.
- Target artifact: design, implementation plan, audit, test strategy, UX flow, commercial policy, or runbook.
- Constraints from security, privacy, reliability, billing, support, and compliance stakeholders when relevant.

## Workflow

1. Read this SKILL.md first.
2. Load [references/routing.md](references/routing.md) to select the absorbed child reference that matches the task.
3. Load only the selected child reference files needed for the current request.
4. Produce execution-oriented output with assumptions, risks, evidence, and next actions where relevant.

## Quality Standards

- Keep routing explicit: name which reference files were used when the work depends on absorbed material.
- Preserve tenant isolation, auditability, cost controls, safety gates, and operational evidence when they matter.
- Prefer concrete contracts, checklists, tables, schemas, runbooks, and decision records over broad summaries.

## Anti-Patterns

- Loading every absorbed reference by default.
- Treating AI-specific billing, compliance, safety, or UX concerns as generic SaaS work without checking AI failure modes.
- Hiding retired skill names; old slugs must remain discoverable through [references/routing.md](references/routing.md).

## Outputs

- A concrete deliverable matched to the request: architecture, implementation plan, audit, policy, runbook, UX flow, test strategy, or operating model.
- The selected consolidated reference files and any assumptions, risks, evidence requirements, or follow-up actions that affect execution.
## References

- [references/routing.md](references/routing.md) maps retired child skill slugs to their consolidated reference folders.

## Consolidated Child References

- Load [references/routing.md](references/routing.md) to map retired AI child skill slugs to their reference modules.
## Evidence Produced

| Category | Artifact | Format | Example |
| --- | --- | --- | --- |
| Correctness | AI usage and cost reconciliation | Markdown/CSV | provider usage, tenant attribution, pricing version, variance, and unresolved items |

<!-- dual-compat-end -->

Files in this skill

  • SKILL.md2.7 KB
  • references/ai-cost-modeling/entrypoint.md10.8 KB
  • references/ai-cost-per-tenant-attribution/entrypoint.md13.2 KB
  • references/ai-cost-per-tenant-attribution/references/model-price-table-template.md4.1 KB
  • references/ai-cost-per-tenant-attribution/references/token-accounting-pipeline.md2.6 KB
  • references/ai-metering-billing/entrypoint.md14.1 KB
  • references/ai-saas-billing/entrypoint.md13.9 KB
  • references/ai-usage-metering-and-billing/entrypoint.md14.1 KB
  • references/ai-usage-metering-and-billing/references/stripe-metered-billing-for-ai.md5.2 KB
  • references/routing.md1.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…