langfuse
Skill by TerminalSkills
Langfuse is an open-source LLM engineering platform. This skill helps an AI assistant add tracing, prompt management, output scoring and dataset experiments to LLM apps. It is aimed at developers building LLM or RAG applications.
Install langfuse
Built from the published package, never by AI.
git clone --depth 1 https://github.com/TerminalSkills/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/skills/langfuse ~/.claude/skills/langfuseRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/TerminalSkills/skills /tmp/skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/skills/skills/langfuse ~/.gemini/antigravity-cli/skills/langfuseAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill gives an AI assistant guidance for Langfuse, an open-source LLM engineering platform. It covers recording traces of LLM calls as nested observations with model, token usage and cost, managing versioned prompts, scoring outputs, and building datasets and experiments. The examples cover Python and TypeScript instrumentation, including OpenAI and Vercel AI SDK calls.
The skill targets developers adding observability to LLM or RAG applications, whether on Langfuse Cloud or a self-hosted instance. It includes setup steps, code for the Python langfuse 5.x and @langfuse/* 6.x SDKs, and guidelines such as flushing before exit and avoiding legacy APIs. Langfuse observes and evaluates calls. It does not call models or route requests.
Written from the project's SKILL.md and checked against it.
What it can do
- Trace Python pipelinesUses the @observe decorator to nest retriever, generation and function observations.
- Trace TypeScript appsCreates observations and propagates user and session attributes with @langfuse/tracing.
- Track cost and latencyRecords model, token usage and cost for LLM generations, including through the OpenAI drop-in.
- Manage promptsFetches versioned prompts by label, with a fallback value, and links generations to prompt versions.
- Score outputsAdds numeric, boolean or categorical scores to traces, from user feedback or evaluators.
- Build datasets and experimentsCreates dataset items and runs experiments with evaluators to compare prompt versions.
- Self-host guidanceDescribes the official docker-compose setup and the secret values to replace before exposing it.
What you need
- Langfuse Cloud project or self-hosted Langfuse instance
- LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY API keys
- Python 3.11+ (langfuse 5.x) or Node.js 22+ (@langfuse/* 6.x)
- Docker for self-hosting with docker-compose
Try asking
- Add Langfuse tracing to my /ask RAG endpoint with user and session IDs
- Fetch my support system prompt from Langfuse using the production label
- Run a Langfuse experiment comparing two prompt versions on my QA dataset
Good to know
- Legacy v2/v3 APIs such as langfuse.decorators and the unscoped npm packages should not be used in new code.
- Custom or fine-tuned models need price definitions in project settings, or cost stays empty.
- Tracing is asynchronous and batched, so scripts and serverless handlers must flush before exiting.
- Langfuse does not call models or route requests for you.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/langfuse/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to langfuse
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: common questions
Does Langfuse work with the OpenAI SDK and Vercel AI SDK?
The source describes an OpenAI drop-in in Python, observeOpenAI in @langfuse/openai, and @langfuse/vercel-ai-sdk for AI SDK v7. For AI SDK versions up to 6, it says to enable experimental_telemetry in each call.
Can Langfuse be self-hosted?
Yes. The source points to the official docker-compose.yml in langfuse/langfuse, which runs the web app, a worker, Postgres, ClickHouse, Redis and MinIO. Every CHANGEME value must be replaced before exposing it.
Does Langfuse record my prompts and outputs?
By default, observations record function inputs and outputs. The source says to pass capture_input=False and capture_output=False to @observe, or to mask data in the client, for personal or secret data.
How do I install langfuse?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is langfuse free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is langfuse safe to use?
It scores 49 of 100. Grades: maintenance A, licence A, quality B. 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?
Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.
