# langfuse

Adds LLM observability, prompt metrics, and trace logging to projects via Langfuse. Helps monitor LangChain or OpenAI workflows.

- skill · `type=skill` · Claude Code · 78 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/ai-research/langfuse
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/langfuse

## What it does

This skill guides Claude Code in setting up LLM telemetry for Python and TypeScript applications. It covers instrumenting model calls, grouping interactions with user identifiers, and logging response scores. To use it, you need a Langfuse account (cloud-hosted or self-hosted), host credentials, and active LLM provider keys.

The skill outlines integration patterns such as the drop-in `langfuse.openai` wrapper and the LangChain `CallbackHandler`. It also flags operational pitfalls. In serverless setups, omitting `langfuse.flush()` drops batched traces before the process exits.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --skill ai-research/langfuse
```

2. **Skills CLI (Vercel)**
```bash
npx skills add davila7/claude-code-templates --skill langfuse -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/langfuse/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/langfuse/

### Codex

**Manually: put the files in place**
- File: `.agents/skills/langfuse/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

**Manually: put the files in place**
- File: `.cursor/skills/langfuse/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install davila7/claude-code-templates langfuse
```

2. **Manually: put the files in place**
- File: `.github/skills/langfuse/SKILL.md`

### Gemini CLI

**Platform CLI**
```bash
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/ai-research/langfuse
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/langfuse/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/ai-research/langfuse

## When to use it
- instrument model calls with traces and spans
- track token expenditures and response latency
- attach LangChain callbacks to log chain executions
- record user feedback scores on generated outputs

## Example prompts
- Add Langfuse tracing to our OpenAI completion script.
- Configure a LangChain CallbackHandler with user and session metadata.
- Show how to flush pending traces inside an AWS Lambda handler.

## Similar
- [skill-creator](https://affpapa.org/en/nevibecode/skills/skill-creator.md) — skill · 414180 installs
- [writing-for-agents](https://affpapa.org/en/nevibecode/skills/writing-for-agents.md) — skill · 466719 installs
- [media-use](https://affpapa.org/en/nevibecode/skills/media-use.md) — skill · 1100000 installs
- [mcp-builder](https://affpapa.org/en/nevibecode/skills/mcp-builder.md) — skill · 130949 installs
- [subagent-driven-development](https://affpapa.org/en/nevibecode/skills/subagent-driven-development.md) — skill · 237746 installs
- [orchestration](https://affpapa.org/en/nevibecode/skills/orchestration.md) — skill · 350300 installs

## Other versions with the same name
- [langfuse · langfuse](https://affpapa.org/en/nevibecode/skills/langfuse-langfuse.md) — 19900 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 804 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
