Agent skill · software engineering · jeremylongshore

langfuse-local-dev-loop

Set up Langfuse local development workflow with hot reload and debugging.

Why this skill is useful

Adds scripts for hot reloading, debugging, and tracing in Langfuse that enhance local development workflows for LLM applications.

What it needs

Requires docker, node installed locally. Requires langfuse account access. About 4k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Langfuse Local Dev Loop Overview Fast local development workflow with Langfuse tracing, immediate trace visibility, debug logging, and optional self-hosted local instance via Docker. Prerequisites Completed langfuse-install-auth setup Node.js 18+ with tsx for hot reload (npm install -D tsx) Docker (optional, for self-hosted local instance) Instructions Step 1: Development Environment File Step 2: Dev-Optimized Langfuse Setup (v4+) Step 3: Dev-Optimized Setup (v3 Legacy) Step 4: Hot Reload Scripts Step 5: Development Tracing Utilities Step 6: Example Dev Workflow Local Self-Hosted Langfuse (Optional) For offline development or data privacy: Before starting the stack, place unique local-only values for DATABASEURL, POSTGRESPASSWORD, NEXTAUTHSECRET, SALT, and ENCRYPTIONKEY in a git-ignored .env file. Do not commit a database URI or reuse example or production values. Error Handling Issue Cause Solution ------- ------- ---------- Traces delayed in dev Batching still active Set flushAt: 1 or exportIntervalMillis: 1000 No debug output Debug not enabled Set LANGFUSEDEBUG=true or DEBUG=langfuse Hot reload not working Wrong watch command Use tsx watch (not ts-node) Local instance 502 DB not ready Wait 10s for PostgreSQL startup Traces going to cloud Wrong LANGFUSEBASEURL Point to http://localhost:3000 Output Produce a local development receipt naming the SDK/runtime version, local or cloud host, sample trace identifier, and debug setting used. Keep .env.local secret values and local database credentials out of logs and commits. Examples Start the watch process, change a prompt or traced function, and verify the reload emits one local trace. For self-hosting, bring up Compose, create a disposable project and key in the local UI, then prove that the application points to localhost rather than cloud. Resources TypeScript SDK Setup Self-Hosting Docker Compose Advanced SDK Configuration Next Steps For SDK patterns and best practices, see langfuse-sdk-patterns.

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/langfuse-local-dev-loop

View the source on GitHub

Browse the @skills marketplace