Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

langfuse-cost-forensics

Skill by jeremylongshore

Audits Langfuse recorded-cost observations for missing usage, unavailable cost, cursor gaps and scope mismatches. Built for people reviewing whether a Langfuse spend figure can be trusted.

  • Score 76
  • 3k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install langfuse-cost-forensics

Built from the published package, never by AI.

git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.claude/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/langfuse-cost-forensics ~/.claude/skills/langfuse-cost-forensics

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install langfuse-cost-forensics in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

Langfuse Cost Forensics audits recorded-cost observations from supplied Langfuse Observations API v2 pages. It checks for missing usage fields, unavailable costs, cursor gaps and scope mismatches. It keeps explicit zero costs separate from unknown costs, and it treats a partial subtotal differently from a complete retrieved set.

The skill runs a standard-library Python analyzer, scripts/inspect-costs.py, against a private cost receipt file. The analyzer makes no network requests and does not echo raw prompts, outputs, model names, trace IDs or cursors. It reports eligible, known, zero and missing coverage, a known-row subtotal, and a complete-set subtotal only when the evidence supports it. It is for people reviewing a disputed Langfuse cost claim. It does not verify provider invoices or estimate savings.

Written from the project's SKILL.md and checked against it.

What it can do

  • Coverage auditCounts eligible, known, zero and missing cost observations in a supplied set.
  • Subtotal checkReports a known-row subtotal and withholds a complete-set subtotal when evidence has gaps.
  • Cursor and scope reviewFlags cursor gaps, omitted usage fields and mismatched project or time window.
  • Finding ledgerLists each discrepancy with its finding code, affected count and next check.

What you need

  • Python 3.10+
  • Supplied Langfuse Observations API v2 pages
  • Private cost receipt JSON following the receipt contract
  • Approved read access to the private evidence, if more data is collected

Try asking

  • Audit this cost receipt for missing generation cost and cursor gaps
  • Does this first page prove our total Langfuse spend?
  • Explain why our Langfuse spend looks wrong using this receipt

Good to know

  • Recorded USD cost is not a verified provider invoice.
  • The analyzer makes no network requests and works only on supplied pages.
  • It does not replay arbitrary advanced filters or authenticate supplied declarations.
  • Project-wide aggregate questions should use the Metrics API v2.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/.curated/langfuse-cost-forensics/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

Allowed tools: ReadBash(python3:*)

  • SKILL.md6 KB
  • eval-spec.yaml2 KB
  • references/receipt-contract.md7 KB
  • scripts/inspect-costs.py13 KB

Alternatives to langfuse-cost-forensics

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

langfuse-cost-forensics: common questions

Does this skill prove our total Langfuse spend?

No. A first page or partial set is not a project total, and the skill withholds complete-set subtotals when evidence has gaps. It also states that recorded cost is not a verified invoice.

How does it handle missing cost versus zero cost?

It keeps unavailable costs separate from explicit numeric zero and does not convert unknown cost into zero. Missing prices or usage do not lead to guessed rates.

Does the analyzer call the Langfuse API?

No. The standard-library analyzer makes no network requests and works on the supplied receipt file.

How do I install langfuse-cost-forensics?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is langfuse-cost-forensics free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is langfuse-cost-forensics safe to use?

It scores 76 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to langfuse-cost-forensics?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

langfuse-cost-forensics Install

Add to stack

Loading.