agentleFS
Ghost7802Ghost7802/awesome-api-skills/skills/langfuse/SKILL.md

langfuse

Skill13 starsChanged 27 days agoMITView on GitHub

Verification Tier: code_example_tested | Last Verified: 2026-11-18 Official Docs: https://langfuse.com/docs/observability/sdk/overview

  • Reads credentials
  • Installs packages

24 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use upstash-qstash, Linux Privilege Escalation and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • xfstudioSkill

    upstash-qstash

    Upstash QStash expert for serverless message queues, scheduled jobs, and reliable HTTP-based task delivery without managing infrastructure. Use when: qstash, upstash queue, serverless cron, scheduled http, message queue serverless.

    Also in 4 projects that use this

  • xfstudioSkill

    Linux Privilege Escalation

    This skill should be used when the user asks to "escalate privileges on Linux", "find privesc vectors on Linux systems", "exploit sudo misconfigurations", "abuse SUID binaries", "exploit cron jobs for root access", "enumerate Linux systems for privilege escalation", or "gain root access from low-privilege shell". It provides comprehensive techniques for identifying and exploiting privilege escalation paths on Linux systems.

    Also in 4 projects that use this

  • +10 more from xfstudio

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 23 edited versions we read keep these.

  • 0

    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
  1. Very specific:

    Treat telemetry failures as non-fatal: never block or crash user-facing LLM responses if Langfuse ingestion experiences transient errors or …

    line 24
  2. Very specific:

    Keep LANGFUSE_SECRET_KEY strictly server-side.

    line 29

“Common” is measured: kept by at least 6 in 10 of the 23 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Langfuse API & SDK Skill

Verification Tier: code_example_tested | Last Verified: 2026-11-18
Official Docs: https://langfuse.com/docs/observability/sdk/overview

Overview

Langfuse provides LLM observability, nested traces/generations, prompt versioning, and evaluation datasets via OpenTelemetry (@langfuse/otel) and the JS/Python SDKs.

Installation

npm install langfuse @langfuse/otel @opentelemetry/sdk-node
pip install langfuse

Authentication

Configure LANGFUSE_PUBLIC_KEY (pk-lf-...), LANGFUSE_SECRET_KEY (sk-lf-...), and LANGFUSE_BASE_URL (e.g., https://cloud.langfuse.com, https://us.cloud.langfuse.com, or your self-hosted instance). REST ingestion uses HTTP Basic Auth (publicKey:secretKey).

Core Concepts

  • Traces, Spans, Generations: Group multi-step agent runs under a single trace; record model name, input/output, and token usage on Generation observations.
  • Serverless Flushing: Batched trace export happens asynchronously in memory. In AWS Lambda, Vercel Functions, or Cloudflare Workers, you MUST await langfuse.flushAsync() (or spanProcessor.forceFlush()) before the handler returns or traces are silently dropped.
  • Scores: Attach automated or user-feedback evaluation scores via traceId.

Error Handling & Rate Limits

  • Treat telemetry failures as non-fatal: never block or crash user-facing LLM responses if Langfuse ingestion experiences transient errors or HTTP 429.
  • Configure explicit batch size and flush intervals to avoid ingestion throttling under burst traffic.

Security Best Practices

  • Mask or redact PII/secrets before sending prompt inputs/outputs to Langfuse spans.
  • Keep LANGFUSE_SECRET_KEY strictly server-side; only use LANGFUSE_PUBLIC_KEY for approved client score submissions if needed.

AI Pitfalls

  • Forgetting await flushAsync() / forceFlush() in serverless handlers, resulting in zero traces appearing in the dashboard.
  • Mixing up EU (cloud.langfuse.com) vs US (us.cloud.langfuse.com) LANGFUSE_BASE_URL regions (produces 401 Unauthorized).
  • Recording raw customer secrets or auth tokens inside trace metadata.

Production Checklist

  • LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, and LANGFUSE_BASE_URL configured via env vars
  • flushAsync() / forceFlush() awaited in serverless/short-lived processes
  • PII scrubbing applied to logged prompt inputs
  • Telemetry errors caught and isolated from critical user paths

References

Related skills

  • opentelemetry — depends on
  • openai-responses — works well with
  • vercel-ai-sdk — integrates with

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.