langfuse
Skill1 starsChanged 3 months agoMITView on GitHub
Interact with Langfuse and access its documentation. Use when needing to (1) query or modify Langfuse data programmatically — traces, prompts, scores, sessions, observations, (2) look up Langfuse documentation, concepts, integration guides, or SDK usage, or (3) understand how any Langfuse feature works. Works against self-hosted and cloud Langfuse, on both the legacy v1 REST API (server major <= 3) and the v2/v3 read APIs (server major >= 4).
- Reads credentials
10 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- KonghaYao/peritheir own version, first seen Aug 14, 2026
- Bbar0n234/learnflow-aiedited, first seen Aug 11, 2026
- HybridAIOne/hybridclawtheir own version, first seen May 12, 2026
- phuquocchamp/claude-code-101edited, first seen Apr 13, 2026
- lifegenieai/claude-code-observabilitytheir own version, first seen Apr 4, 2026
- avivsinai/langfuse-mcptheir own version, first seen Mar 27, 2026
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- Bbar0n234/learnflow-ai★ 3519% same
- phuquocchamp/claude-code-101★ 016% same
Wrote their own version · 8
- langfuse/skills★ 295same name
- KonghaYao/peri★ 221same name
- HybridAIOne/hybridclaw★ 157same name
- avivsinai/langfuse-mcp★ 113same name
- xfstudio/skills★ 9same name
- ajbmachon/ajbm-skills★ 7same name
- ai4brands-design/claude-skills★ 2same name
- lifegenieai/claude-code-observability★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- user-claude-md/CLAUDE.mdCLAUDE.md
- adversarial-reviewSkill
- feature-planningSkill
- hyperdxSkill
- mutation-testSkill
- pr-reviewSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Documentation First: When implementing SDK integrations, always fetch current docs before writing code (Langfuse updates frequently).
- Very specific: line 29
If any value is missing from .agent.env, ask the user to add it before proceeding.
- Very specific: line 45
Run the script directly — never export env vars manually or run curl directly for data access.
- Distinctive: line 73
Check what you're talking to:
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Langfuse
This skill helps you use Langfuse effectively: debugging traces, inspecting LLM generations and tool calls, reviewing sessions, and managing prompts.
Core Principles
- Use the query script for data access: Run
langfuse_query.shfor all Langfuse queries. It detects the server's API generation and picks the right endpoints. The script ships in this skill'sbin/directory, which is on the Bash tool'sPATHwhenever the skill is installed — invoke it by bare name, never by an absolute path. - Documentation First: When implementing SDK integrations, always fetch current docs before writing code (Langfuse updates frequently).
Per-Project Configuration (.agent.env)
Each project should have a .agent.env file in the project root:
LANGFUSE_BASE_URL: http://localhost:3000
LANGFUSE_PUBLIC_KEY: pk-lf-...
LANGFUSE_SECRET_KEY: sk-lf-...LANGFUSE_BASE_URL: base URL of your Langfuse instance — local, EU cloud (https://cloud.langfuse.com), or US cloud (https://us.cloud.langfuse.com).- API keys are in your Langfuse project under Settings > API Keys.
If any value is missing from .agent.env, ask the user to add it before proceeding.
Permissions
The query script is meant to be pre-approved, via this rule:
Bash(langfuse_query.sh:*)Neither install route installs that rule — it ships in the toolkit's
project-files/.claude/settings.json template, which the user merges into a
project's .claude/settings.json (or their user settings) themselves. If every
call prompts, the rule is absent: that is unfinished setup, not a broken skill,
and not a reason to reach for curl. Say so once and carry on.
Run the script directly — never export env vars manually or run curl directly
for data access. Both trigger permission prompts. The script reads .agent.env
automatically from the project root.
The rule approves the bare command name, matching whatever PATH resolves it
to. An invocation prefixed with an inline env var
(LANGFUSE_MAX_RECORDS=10000 langfuse_query.sh ...) falls outside it and will
prompt — expected, and rare enough not to warrant a broader rule.
Two failures are environment rather than defects: Missing required command: <x>
(exit 127) means a dependency is absent — tell the user to install it; and
command not found: langfuse_query.sh means the skill's bin/ is not on PATH,
so the plugin is disabled or the session predates the install. Neither is a
reason to edit the script.
API generations (important)
Langfuse v4 changed the read API surface. The script reads the server version
once from /api/public/health and routes accordingly:
| legacy (server ≤ 3) | v4 (server ≥ 4) | |
| Traces | /traces, /traces/{id} | gone (404) — derived from observations |
| Observations | /observations, /observations/{id} | /v2/observations (+ structured filter for a single id) |
| Sessions | /sessions | gone (404) — derived from observations |
| Scores | /scores | /v3/scores |
| Prompts | /v2/prompts | /v2/prompts (unchanged) |
Check what you're talking to:
langfuse_query.sh apigen # → legacy | v4Override detection with LANGFUSE_API_GEN=legacy|v4 if needed.
Three v4 behaviours worth knowing
tracesandsessionsare derived, not equivalent. v4 exposes no trace or session read entity, so the script groups observations bytraceId/sessionId. Both label their output as derived. A trace's "name" is inferred from its earliest observation.- Content requires field groups.
/v2/observationsreturns onlycoreandbasicfields by default — no input, output, usage, or model. The script requestsfields=core,basic,time,io,metadata,model,usage,promptwhere content matters. A port that forgets this silently returns metadata only. - Input/output are always raw strings.
parseIoAsJson=trueis deprecated and returns 400. The script decodes JSON-looking strings client-side.
Pagination
v4 pagination is cursor-based (meta.cursor), not page-numbered — passing
page=N is silently ignored and returns the same rows. The script walks the
cursor transparently, so commands return the complete set rather than one page.
Walks are bounded by LANGFUSE_MAX_RECORDS (default 2000) so a busy project
can't trigger an unbounded crawl. When the cap is hit the script says so on
stderr and tells you what to raise:
note: stopped at the 2000-record cap after 20 pages; raise LANGFUSE_MAX_RECORDS for moreLANGFUSE_MAX_RECORDS=10000 langfuse_query.sh trace <trace-id>1. Querying Langfuse Data
# List recent traces
langfuse_query.sh traces --limit 5
langfuse_query.sh traces --name my-trace-name --limit 10
langfuse_query.sh traces --session-id abc123 --limit 10
# Get a full trace with all observations
langfuse_query.sh trace <trace-id>
# Show LLM generations and tool calls for a trace (most common debugging task)
langfuse_query.sh generations <trace-id>
# List observations for a trace, optionally filtered by type
langfuse_query.sh observations <trace-id> --type GENERATION
# Get a single observation with full detail (raw JSON)
langfuse_query.sh observation <obs-id>
# Sessions, scores, prompts
langfuse_query.sh sessions --limit 5
langfuse_query.sh scores --trace-id <trace-id>
langfuse_query.sh prompts
# Which API generation am I on?
langfuse_query.sh apigenCommon Workflows
Check what the LLM actually received and returned:
langfuse_query.sh traces --limit 3 # find the trace
langfuse_query.sh generations <trace-id> # model, prompt name+version, tokens, input, outputOn v4 this also shows the linked prompt (promptName / promptVersion), which
is the fastest way to confirm which prompt version produced a given output.
Review a full trace end-to-end:
langfuse_query.sh trace <trace-id>Shows trace metadata plus a chronological list of all observations with tool calls and token counts.
Inspect token usage and cost:
langfuse_query.sh generations <trace-id>Get raw JSON for one observation (full untruncated input/output):
langfuse_query.sh observation <obs-id>Troubleshooting
- 404s on every command — you are on a v4 server but detection returned
legacy(or vice versa). Checklangfuse_query.sh apigenand force withLANGFUSE_API_GEN. - Generations show no input/output — the observation genuinely has none, or
you are calling the API directly without
fields=...,io. tracesshows fewer traces than expected on v4 — the walk stopped atLANGFUSE_MAX_RECORDS. The script prints a note on stderr when that happens; raise it and re-run.- A command is slow on v4 — it is paging. Each page is 100 observations, so
a 2000-record trace costs 20 round trips. Narrow with
--typewhere you can.
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) over curl when available.
2a. Documentation Index (llms.txt)
curl -s https://langfuse.com/llms.txtReturns 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.
2b. Fetch Individual Pages as Markdown
Any page listed in llms.txt can be fetched as markdown by appending .md:
curl -s "https://langfuse.com/docs/observability/overview.md"2c. Search Documentation
curl -s "https://langfuse.com/api/search-docs?query=How+do+I+trace+LangGraph+agents"Instance API spec
A self-hosted instance serves its own OpenAPI spec, which is authoritative for that exact version — more reliable than the docs site when endpoints have moved:
curl -s "$LANGFUSE_BASE_URL/generated/api/openapi.yml"Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

