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.
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-forensicsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install langfuse-cost-forensics in Claude Code
git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace /tmp/tons-of-skills-marketplace && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/tons-of-skills-marketplace/skills/.curated/langfuse-cost-forensics ~/.gemini/antigravity-cli/skills/langfuse-cost-forensicsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install langfuse-cost-forensics in Antigravity CLI
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
ANo 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 →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
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.
