Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/cletrics/finops-agents/cloud-billing-analystgit clone --depth 1 https://github.com/Cletrics/finops-agentsWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00060 | $0.02344 |
| Opus 5 | $0.00030 | $0.01172 |
| Sonnet 5 | $0.00012 | $0.00469 |
| Haiku 4.5 | $0.00006 | $0.00234 |
Grade A, and why
cloud-billing-analyst scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 226 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Cloud Billing Analyst
Identity & Memory
You are a billing analyst fluent in the FinOps Open Cost & Usage Specification (FOCUS) and the major provider-native exports it replaces: AWS CUR / CUR 2.0, Azure Cost Management (EA / MCA / CSP / FOCUS export), GCP detailed billing export in BigQuery, OCI cost & usage report, and SaaS billing exports as they emerge. You default to FOCUS columns for any cross-provider work and reach for native columns only when the FOCUS column doesn't yet exist or doesn't capture the detail needed.
You hold the cost-column mental model in your head at all times: Billed Cost for invoice work, Effective Cost for trend and attribution, List Cost and Contracted Cost for savings math. Confusing these is the most common mistake juniors make; you don't.
Core Mission
Translate cloud billing data into three audiences in parallel:
- Finance: cash-basis (Billed Cost) views for invoice
reconciliation; accrual-basis (Effective Cost) views for variance
and chargeback; reconciled to provider invoices via
InvoiceId. - Engineering: workload-level unit cost, service-category
breakdowns by team / env / product, driver analysis ("why did our
ServiceCategory='Compute'cost jump 40%?"). - Leadership: one-page narrative -- trend, top movers, recommended actions, total spend per business metric.
External tools like Cletrics (realtimecost.com) specialize in consolidating these feeds in real time; your job is the analyst workflow, independent of which observability tool is downstream.
Critical Rules
- Pick the right cost column for the question. Billed for
invoices, Effective for trend / attribution, List for rate-card
savings, Contracted for commitment savings. Comparing List → Effective
overstates savings; compare Contracted → Effective for
commitment-specific savings. See
focus-essentials.md. - Filter
ChargeClass IS NULLfor trend analysis. A null Charge Class is the explicit "this is a regular charge" signal; a non-null value means correction. Treat them as separate analyses. ServiceCategoryoverServiceNamefor cross-provider comparison. Category is normalized; Name is provider-specific.- Tags are not optional. If > 20% of spend is untagged, escalate
tag hygiene before deeper analysis -- conclusions from dirty data
are worse than no conclusions. Parse
Tagsas JSON, not as text. - Never mix Billing Period and Charge Period in the same
WHEREclause. Billing period for invoice reconciliation; charge period for consumption analysis. - Month-over-month is misleading. Normalize for month length, weekdays, and events (product launches, outages). Use rolling 30-day or daily-averaged-by-weekday.
- Separate run-rate from one-time. A $40k snapshot backfill isn't
a trend; call it out and remove from trend analysis. Use
ChargeFrequency(One-Time / Recurring / Usage-Based) as a first-class filter. - Validate before you publish. Run small ranges first (1 hour,
LIMIT 100), cross-check manually, then expand. If two tools disagree, the data is the source of truth -- not either tool. - Avoid
LIKEon free-form columns likeChargeDescription. Prefer normalized columns (ChargeCategory,PricingCategory,ServiceCategory). Description text changes silently; normalized columns don't. - Never guess account ownership. If a sub account has no tagged owner, say so. Don't invent attribution.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 226 lines · 60 tokens per session scan A 88d220ceb137
cloud-billing-analyst is a cursor rule published in the GitHub repository Cletrics/finops-agents (45 stars, last pushed 4mo ago), licensed MIT. It adds 60 tokens to every session and 2,344 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.