Token导航 LogoToken导航

Agent Skill · AI 工具

langfuse(langfuse 测试)

langfuse 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

langfuse 是AI 工具类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描有未通过项,按安装量在AI 工具类的 2,536 个 Skill 里排第 225。

总安装 10,787周安装 454GitHub Stars 35,662下载 3,777核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:langfuse(langfuse 测试)
来源仓库:https://github.com/sickn33/antigravity-awesome-skills
仓库路径:skills/langfuse
安装命令:
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill langfuse
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill langfuse

这个 Skill 是做什么的

AI 工具类 Skill 用来扩展助手本身的能力,例如接模型、接检索、接外部服务。

法学硕士申请的完整可观察性和跟踪,以及及时的管理、评估和成本跟踪。

通过用户/会话分组自动跟踪 LLM 调用、跨度和跟踪;支持 OpenAI SDK 作为直接替代品,并通过回调处理程序与 LangChain 集成 内置提示版本控制、A/B 测试、数据集管理以及评估和质量监控评分 通过元数据标记进行跨跟踪的成本和性能跟踪,以进行生产调试和回归检测 需要 Python 或 TypeScript 以及 Langfuse 帐户(云或自托管)和 LLM API 密钥;对于在无服务器环境中刷新批量跟踪至关重要

来源仓库内路径:skills/langfuse

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill lan…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

langfuse 怎么安装?

在终端执行 npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill langfuse。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

langfuse 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

langfuse 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

langfuse 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

langfuse 用的人多吗?

公开数据是累计安装 10,787 次,近一周安装 454 次,下载 3,777 次,GitHub 35,662 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

langfuse 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 来源仓库有 35,662 星,维护活跃度相对可查。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理AI 工具类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

AI 工具类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
executing-plans

执行计划 · Codex、Claude

1,515,336173,110只读MIT通过
verification-before-completion

完成前的验证 · Codex、Claude

1,319,472173,121权限未标注MIT通过
subagent-driven-development

子 Agent 驱动开发 · Codex、Claude

1,312,416173,138只读MIT通过
copy-editing

复制编辑 · Codex、Claude

1,209,57625,632只读MIT通过
paywall-upgrade-cro

付费专区升级 cro · Codex、Claude

1,030,17625,617只读MIT通过
langfuse

langfuse 测试 · 本页

10,78735,662需要联网MIT未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

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 variables

compiled = prompt.compile(customer_name="John", issue="billing question")

Use with OpenAI

response = openai.chat.completions.create(model=prompt.config.get("model", "gpt-4o"), messages=compiled, temperature=prompt.config.get("temperature", 0.7))

Link generation to prompt version

trace = langfuse.trace(name="support-chat") generation = trace.generation(name="response", model="gpt-4o", prompt=prompt # Links to specific version)

Create/update prompts via API

langfuse.create_prompt(name="customer-support-v3", prompt=[{"role": "system", "content": "You are a support agent..."}, {"role": "user", "content": "{{user_message}}"}], config={"model": "gpt-4o", "temperature": 0.7}, labels=["production"] # or ["staging", "development"])

Fetch specific label

prompt = langfuse.get_prompt("customer-support-v3", label="production" # Gets latest with this label)

Evaluation and Scoring

Evaluate LLM outputs systematically

When to use: Quality assurance and improvement

from langfuse import Langfuse

langfuse = Langfuse()

Manual scoring in code

trace = langfuse.trace(name="qa-flow")

After getting response

trace.score(name="relevance", value=0.85, # 0-1 scale comment="Response addressed the question")

trace.score(name="correctness", value=1, # Binary: 0 or 1 data_type="BOOLEAN")

LLM-as-judge evaluation

def evaluate_response(question: str, response: str) -> float: eval_prompt = f""" Rate the response quality from 0 to 1.

Question: {question}
Response: {response}

Output only a number between 0 and 1.
"""

result = openai.chat.completions.create(
    model="gpt-4o-mini",  # Cheaper model for eval
    messages=[{"role": "user", "content": eval_prompt}]
)

return float(result.choices[0].message.content.strip())

Score asynchronously

score = evaluate_response(question, response) trace.score(name="quality-llm-judge", value=score)

Create evaluation dataset

dataset = langfuse.create_dataset(name="support-qa-v1")

Add items to dataset

langfuse.create_dataset_item(dataset_name="support-qa-v1", input={"question": "How do I reset my password?"}, expected_output="Go to settings > security > reset password")

Run evaluation on dataset

dataset = langfuse.get_dataset("support-qa-v1")

for item in dataset.items: # Generate response response = generate_response(item.input["question"])

# Link to dataset item
trace = langfuse.trace(name="eval-run")
trace.generation(
    name="response",
    input=item.input,
    output=response
)

# Score against expected
similarity = calculate_similarity(response, item.expected_output)
trace.score(name="similarity", value=similarity)

# Link trace to dataset item
item.link(trace, "eval-run-1")

Decorator Pattern

Clean instrumentation with decorators

When to use: Function-based applications

from langfuse.decorators import observe, langfuse_context

@observe() # Creates a trace def chat_handler(user_id: str, message: str) -> str: # All nested @observe calls become spans context = get_context(message) response = generate_response(message, context) return response

@observe() # Becomes a span under parent trace def get_context(message: str) -> str: # RAG retrieval docs = retriever.get_relevant_documents(message) return "\n".join([d.page_content for d in docs])

@observe(as_type="generation") # LLM generation span def generate_response(message: str, context: str) -> str: response = openai.chat.completions.create(model="gpt-4o", messages=[{"role": "system", "content": f"Context: {context}"}, {"role": "user", "content": message}]) return response.choices[0].message.content

Add metadata and scores

@observe() def main_flow(user_input: str): # Update current trace langfuse_context.update_current_trace(user_id="user-123", session_id="session-456", tags=["production"])

result = process(user_input)

# Score the trace
langfuse_context.score_current_trace(
    name="success",
    value=1 if result else 0
)

return result

Works with async

@observe() async def async_handler(message: str): result = await async_generate(message) return result

Collaboration

Delegation Triggers

  • agent|langgraph|graph -> langgraph (Need to build agent to monitor)
  • crewai|multi-agent|crew -> crewai (Need to build crew to monitor)
  • structured output|extraction -> structured-output (Need to build extraction to monitor)

Observable LangGraph Agent

Skills: langfuse, langgraph

Workflow:

1. Build agent with LangGraph
2. Add Langfuse callback handler
3. Trace all LLM calls and tool uses
4. Score outputs for quality
5. Monitor and iterate

Monitored RAG Pipeline

Skills: langfuse, structured-output

Workflow:

1. Build RAG with retrieval and generation
2. Trace retrieval and LLM calls
3. Score relevance and accuracy
4. Track costs and latency
5. Optimize based on data

Evaluated Agent System

Skills: langfuse, langgraph, structured-output

Workflow:

1. Build agent with structured outputs
2. Create evaluation dataset
3. Run evaluations with traces
4. Compare prompt versions
5. Deploy best performers

Related Skills

Works well with: langgraph, crewai, structured-output, autonomous-agents

When to Use

  • User mentions or implies: langfuse
  • User mentions or implies: llm observability
  • User mentions or implies: llm tracing
  • User mentions or implies: prompt management
  • User mentions or implies: llm evaluation
  • User mentions or implies: monitor llm
  • User mentions or implies: debug llm

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

平台分布

Claude Code

29.51%
按下载量换算1,115

OpenCode

23.65%
按下载量换算893

Antigravity

18.12%
按下载量换算684

Gemini CLI

10.55%
按下载量换算398

Cursor

6.82%
按下载量换算258

Codex

3.15%
按下载量换算119

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills