langfuse

GitHub

提供 Langfuse 使用指南,涵盖 CLI 数据查询、文档查阅及功能理解。支持应用接入、提示词迁移、调试追踪、反馈评分等场景,强调基于最新文档和 CLI 工具进行开发操作。

.github/skills/langfuse/SKILL.md raphaelmansuy/edgequake

Trigger Scenarios

需要查询或修改 Langfuse 中的 traces、prompts 等数据 查找 Langfuse 文档或 SDK 用法 了解 Langfuse 特定功能的工作原理

Install

npx skills add raphaelmansuy/edgequake --skill langfuse -g -y
More Options

Non-standard path

npx skills add https://github.com/raphaelmansuy/edgequake/tree/edgequake-main/.github/skills/langfuse -g -y

Use without installing

npx skills use raphaelmansuy/edgequake@langfuse

指定 Agent (Claude Code)

npx skills add raphaelmansuy/edgequake --skill langfuse -a claude-code -g -y

安装 repo 全部 skill

npx skills add raphaelmansuy/edgequake --all -g -y

预览 repo 内 skill

npx skills add raphaelmansuy/edgequake --list

SKILL.md

Frontmatter
{
    "name": "langfuse",
    "description": "Interact with Langfuse and access its documentation. Use when needing to (1) query or modify Langfuse data programmatically via the CLI — traces, prompts, datasets, scores, sessions, and any other API resource, (2) look up Langfuse documentation, concepts, integration guides, or SDK usage, or (3) understand how any Langfuse feature works. This skill covers CLI-based API access (via npx) and multiple documentation retrieval methods.",
    "allowed-tools": [
        "WebFetch(domain:langfuse.com)",
        "Bash(curl *langfuse.com\/*)",
        "Bash(npx langfuse-cli api __schema *)",
        "Bash(npx langfuse-cli api * --help *)",
        "Bash(npx langfuse-cli api * list *)",
        "Bash(npx langfuse-cli api * get *)",
        "Bash(bunx langfuse-cli api __schema *)",
        "Bash(bunx langfuse-cli api * --help *)",
        "Bash(bunx langfuse-cli api * list *)",
        "Bash(bunx langfuse-cli api * get *)"
    ]
}

Langfuse

This skill helps you use Langfuse effectively across all common workflows: instrumenting applications, migrating prompts, debugging traces, and accessing data programmatically.

Core Principles

Follow these principles for ALL Langfuse work:

  1. Documentation First: NEVER implement based on memory. Always fetch current docs before writing code (Langfuse updates frequently) See the section below on how to access documentation.
  2. CLI for Data Access: Use langfuse-cli when querying/modifying Langfuse data. See the section below on how to use the CLI.
  3. Best Practices by Use Case: Check the relevant reference file below for use-case-specific guidelines before implementing
  4. Use latest Langfuse versions: Unless the user specified otherwise or there's a good reason, always use the latest version of Langfuse SDKs/APIs. Even if you're only creating a plan for another agent to execute, be explicit about the exact version to use.
  5. If you guide the user through UI and are unsure about a label or location, inspect the user’s screenshots or ask to see the relevant screen. Do not assume UI labels have the exact same names as API, SDK, or CLI fields.

Use case specific references

  • instrumenting an existing function/application: references/instrumentation.md
  • migrating prompts from a codebase into Langfuse: references/prompt-migration.md
  • creating a prompt or changing any part of an existing prompt, including small edits and debugging/tuning: references/prompt-engineering.md
  • capturing user feedback (thumbs, ratings, implicit signals) as scores on traces: references/user-feedback.md
  • further tips on using the Langfuse CLI: references/cli.md
  • upgrading legacy trace-level or dataset-item evaluators to observation-level or experiment evaluators: references/trace-evaluator-upgrade.md. Use the evaluator migration guide as the primary reference.
  • preparing an application and Langfuse project for the v4 platform migration: references/v4-project-migration.md
  • judge calibration (LLM-as-a-Judge reliability, simple accuracy checks, advanced split-based validation, confusion matrices, and metric ingestion): references/judge-calibration.md
  • systematic error analysis — reading traces, building failure taxonomy, deciding what to fix: references/error-analysis.md
  • setting up CI/CD experiment gates with langfuse/experiment-action: references/ci-cd.md
  • submitting feedback about this skill: references/skill-feedback.md

1. Langfuse API via CLI

Use the langfuse-cli to interact with the full Langfuse REST API from the command line. Run via npx (no install required):

Start by discovering the schema and available arguments:

# Discover all available resources
npx langfuse-cli api __schema

# List actions for a resource
npx langfuse-cli api <resource> --help

# Show args/options for a specific action
npx langfuse-cli api <resource> <action> --help

Credentials

Set environment variables before making calls:

export LANGFUSE_PUBLIC_KEY=pk-lf-...
export LANGFUSE_SECRET_KEY=sk-lf-...
export LANGFUSE_BASE_URL=https://cloud.langfuse.com # example for EU cloud. For US cloud it's us.cloud.langfuse.com, and can also be a self-hosted URL. The server must always be specified in order to access Langfuse.

If LANGFUSE_BASE_URL is used instead of LANGFUSE_HOST, run export LANGFUSE_HOST="$LANGFUSE_BASE_URL". If not set, ask the user to set them in their shell or a .env file. Keys are found in the Langfuse project under Settings -> API Keys; the user should create a project API key pair there. If they do not have a Langfuse account yet, share that they can create one for free at https://langfuse.com/cloud. Do not ask them to paste keys into chat for security reasons.

Detailed CLI Reference

For common workflows, tips, and full usage patterns, see references/cli.md.

2. Langfuse Documentation

Three methods to access Langfuse docs, in order of preference. Always prefer your application's native web fetch and search tools (e.g., WebFetch, WebSearch, mcp_fetch, etc.) over curl when available. The URLs and patterns below work with any fetching method — the curl examples are just illustrative.

2a. Documentation Index (llms.txt)

Fetch the full index of all documentation pages:

curl -s https://langfuse.com/llms.txt

Returns a structured list of every doc page with titles and URLs. Use this to discover the right page for a topic, then fetch that page directly.

Alternatively, you can start on https://langfuse.com/docs and explore the site to find the page you need.

2b. Fetch Individual Pages as Markdown

Any page listed in llms.txt can be fetched as markdown by appending .md to its path or by using Accept: text/markdown in the request headers. Use this when you know which page contains the information needed. Returns clean markdown with code examples and configuration details.

curl -s "https://langfuse.com/docs/observability/overview.md"
curl -s "https://langfuse.com/docs/observability/overview" -H "Accept: text/markdown"

2c. Search Documentation

When you need to find information across all docs and github issues/discussions without knowing the specific page:

curl -s "https://langfuse.com/api/search-docs?query=<url-encoded-query>"

Example:

curl -s "https://langfuse.com/api/search-docs?query=How+do+I+trace+LangGraph+agents"

Returns a JSON response with:

  • query: the original query
  • answer: a JSON string containing an array of matching documents, each with:
    • url: link to the doc page
    • title: page title
    • source.content: array of relevant text excerpts from the page

Search is a great fallback if you cannot find the relevant pages or need more context. Especially useful when debugging issues as all GitHub Issues and Discussions are also indexed. Responses can be large — extract only the relevant portions. Note that changelog posts may also surface here: use them only to confirm a feature exists, never to implement from — their examples may be outdated, so always implement from the docs and API/SDK reference.

Documentation Workflow

  1. Start with llms.txt to orient — scan for relevant page titles
  2. Fetch specific pages when you identify the right one
  3. Fall back to search when the topic is unclear and you want more context

Skill Feedback

When the user expresses that something about this skill is not working as expected, gives incorrect guidance, is missing information, or could be improved — offer to submit feedback to the Langfuse skill maintainers. This includes when:

  • The skill gave wrong or outdated instructions
  • A workflow didn't produce the expected result
  • The user wishes the skill covered something it doesn't
  • The user explicitly says something like "this should work differently" or "this is wrong"

Do NOT trigger this for issues with Langfuse itself (the product) — only for issues with this skill's instructions and behavior.

When triggered, follow the process in references/skill-feedback.md.

Version History

  • 4904960 Current 2026-08-20 07:42

Same Skill Collection

.github/skills/copilotkit-nextjs-integration/SKILL.md
.github/skills/doc-traceability-validator/SKILL.md
.github/skills/makefile-dev-workflow/SKILL.md
.github/skills/pdf-markdown-validator/SKILL.md
.github/skills/playwright-ux-ui-capture/SKILL.md
.github/skills/reverse-documentation/SKILL.md
.github/skills/ux-ui-analyze-single-page/SKILL.md
.github/skills/ux-ui-map-page-by-page/SKILL.md

Metadata

Files
0
Version
86aa8a6
Hash
58a3d325
Indexed
2026-08-20 07:42

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-09 20:34
浙ICP备14020137号-1 $Carte des visiteurs$