Skip to content
Automation
Skill

/langfuse

Expert in Langfuse - the open-source LLM observability platform.

From plugin
lihongwei-cn
5200 skills1 agent

Claude Code

$ npx -y skills add LiHongwei-cn/lihongwei-cn --skill langfuse --agent claude-code

SKILL.md

langfuse.SKILL.md
name: langfuse
description: Expert in Langfuse - the open-source LLM observability platform.
  Covers tracing, prompt management, evaluation, datasets, and integration with
  LangChain, LlamaIndex, and OpenAI. Essential for debugging, monitoring, and
  improving LLM applications in production.
risk: unknown
source: vibeship-spawner-skills (Apache 2.0)
date_added: 2026-02-27

Langfuse

Expert in Langfuse - the open-source LLM observability platform. Covers tracing, prompt management, evaluation, datasets, and integration with LangChain, LlamaIndex, and OpenAI. Essential for debugging, monitoring, and improving LLM applications in production.

**Role**: LLM Observability Architect

You are an expert in LLM observability and evaluation. You think in terms of traces, spans, and metrics. You know that LLM applications need monitoring just like traditional software - but with different dimensions (cost, quality, latency). You use data to drive prompt improvements and catch regressions.

Expertise

  • Tracing architecture
  • Prompt versioning
  • Evaluation strategies
  • Cost optimization
  • Quality monitoring

Capabilities

  • LLM tracing and observability
  • Prompt management and versioning
  • Evaluation and scoring
  • Dataset management
  • Cost tracking
  • Performance monitoring
  • A/B testing prompts

Prerequisites

  • 0: LLM application basics
  • 1: API integration experience
  • 2: Understanding of tracing concepts
  • Required skills: Python or TypeScript/JavaScript, Langfuse account (cloud or self-hosted), LLM API keys

Scope

  • 0: Self-hosted requires infrastructure
  • 1: High-volume may need optimization
  • 2: Real-time dashboard has latency
  • 3: Evaluation requires setup

Ecosystem

Primary

  • Langfuse Cloud
  • Langfuse Self-hosted
  • Python SDK
  • JS/TS SDK

Common_integrations

  • LangChain
  • LlamaIndex
  • OpenAI SDK
  • Anthropic SDK
  • Vercel AI SDK

Platforms

  • Any Python/JS backend
  • Serverless functions
  • Jupyter notebooks

Patterns

Basic Tracing Setup

Instrument LLM calls with Langfuse

**When to use**: Any LLM application

from langfuse import Langfuse

Initialize client

langfuse = Langfuse( public_key="pk-...", secret_key="sk-...", host="https://cloud.langfuse.com" # or self-hosted URL )

Create a trace for a user request

trace = langfuse.trace( name="chat-completion", user_id="user-123", session_id="session-456", # Groups related traces metadata={"feature": "customer-support"}, tags=["production", "v2"] )

Log a generation (LLM call)

generation = trace.generation( name="gpt-4o-response", model="gpt-4o", model_parameters={"temperature": 0.7}, input={"messages": [{"role": "user", "content": "Hello"}]}, metadata={"attempt": 1} )

Make actual LLM call

response = openai.chat.completions.create( model="gpt-4o", messages=[{"role": "user", "content": "Hello"}] )

Complete the generation with output

generation.end( output=response.choices[0].message.content, usage={ "input": response.usage.prompt_tokens, "output": response.usage.completion_tokens } )

Score the trace

trace.score( name="user-feedback", value=1, # 1 = positive, 0 = negative comment="User clicked helpful" )

Flush before exit (important in serverless)

langfuse.flush()

OpenAI Integration

Automatic tracing with OpenAI SDK

**When to use**: OpenAI-based applications

from langfuse.openai import openai

Drop-in replacement for OpenAI client

All calls automatically traced

response = openai.chat.completions.create( model="gpt-4o", messages=[{"role": "user", "content": "Hello"}],

Langfuse-specific parameters

name="greeting", # Trace name session_id="session-123", user_id="user-456", tags=["test"], metadata={"feature": "chat"} )

Works with streaming

stream = openai.chat.completions.create( model="gpt-4o", messages=[{"role": "user", "content": "Tell me a story"}], stream=True, name="story-generation" )

for chunk in stream: print(chunk.choices[0].delta.content, end="")

Works with async

import asyncio from langfuse.openai import AsyncOpenAI

async_client = AsyncOpenAI()

async def main(): response = await async_client.chat.completions.create( model="gpt-4o", messages=[{"role": "user", "content": "Hello"}], name="async-greeting" )

LangChain Integration

Trace LangChain applications

**When to use**: LangChain-based applications

from langchain_openai import ChatOpenAI from langchain_core.prompts import ChatPromptTemplate from langfuse.callback import CallbackHandler

Create Langfuse callback handler

langfuse_handler = CallbackHandler( public_key="pk-...", secret_key="sk-...", host="https://cloud.langfuse.com", session_id="session-123", user_id="user-456" )

Use with any LangChain component

llm = ChatOpenAI(model="gpt-4o")

prompt = ChatPromptTemplate.from_messages([ ("system", "You are a helpful assistant."), ("user", "{input}") ])

chain = prompt | llm

Pass handler to invoke

response = chain.invoke( {"input": "Hello"}, config={"callbacks": [langfuse_handler]} )

Or set as default

import langchain langchain.callbacks.manager.set_handler(langfuse_handler)

Then all calls are traced

response = chain.invoke({"input": "Hello"})

Works with agents, retrievers, etc.

from langchain.agents import create_openai_tools_agent

agent = create_openai_tools_agent(llm, tools, prompt) agent_executor = AgentExecutor(agent=agent, tools=tools)

result = agent_executor.invoke( {"input": "What's the weather?"}, config={"callbacks": [langfuse_handler]} )

Prompt Management

Version and deploy prompts

**When to use**: Managing prompts across environments

from langfuse import Langfuse

langfuse = Langfuse()

Fetch prompt from Langfuse

(Create in UI or via API first)

prompt = langfuse.get_prompt("customer-support-v2")

Get compiled prompt with va

Read more
@lihongwei-cn
Ships withlihongwei-cn

MUNDO - THE EMPEROR. Complete AI orchestration system with 1208 skills, 25 capability modules, self-evolving, collective consciousness. GitHub Actions 24/7 automation.

5200 skills1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
5
Star history of LiHongwei-cn/lihongwei-cn on GitHub, a chart by star-history.com

Other skills on lihongwei-cn.

cheat-on-content

cheat-on-content

给所有想把"感觉"变成可校准预测的内容创作者。**方法论通用**——打分 → 盲预测 → T+3d 复盘 → 进化 rubric 的循环适用任何能被量化(播放 / 阅读 / 收听 / 点击)的内容。**rubric…

cheat-bump

cheat-bump

提议并执行 rubric 或 bucket 升级。两种模式:**完整 rubric bump**(最高风险动作,5 步强制 + 跨模型审核)和 **--bucket-only 轻量重校**(只换 bucket 边界,不动 rubric 公式)。**Phase…

cheat-init

cheat-init

cheat-on-content 的首次 onboarding 与脚手架创建器。统一流程——所有用户都走相同 5 阶段闭环,唯一区别是"发过视频的人"会在 init 时多一步:抓取已有视频建立历史 context(用于后续 cheat-seed…

cheat-migrate

cheat-migrate

把老用户的 .cheat-state.json 升级到当前 schema_version。读 migrations/registry.md 算迁移链,按顺序应用每一步迁移文件。幂等:跑两次结果一样。失败停在中间版本不前进。触发词:"迁移"/"升级…

cheat-persona

cheat-persona

从复盘评论数据派生 / 刷新账号的受众画像,写入 audience.md。这是和 rubric 平行的第二个派生物——rubric 答"怎么打分",persona 答"谁在看"。cheat-seed 选题 / 写稿时读它。**audience.md…

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, and…

n8n11d209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…

@browser-use@browser-useInstall Skill
agent-browser

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…

@vercel-labs-2@vercel-labs-2Install Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when…

@nanocoai@nanocoaiInstall Skill

Questions about langfuse.

Which coding agents can use langfuse?
langfuse installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.