Agent skill

Langfuse Local Dev Loop

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

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

MITAuto-check: notesAI & LLM Engineering

Install Langfuse Local Dev Loop

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill langfuse-local-dev-loop -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace langfuse-local-dev-loop --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/langfuse-local-dev-loop .claude/skills/langfuse-local-dev-loop && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
langfuse-local-dev-loop
GitHub stars
2.8k
Token cost
~1.9k tokens
SKILL.md length
279 words
Files
1
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 6 steps: Development Environment File → Dev-Optimized Langfuse Setup (v4+) → Dev-Optimized Setup (v3 Legacy) → …
  • Developing LLM applications locally
  • SKILL.md covers Overview, Prerequisites, Instructions and Local Self-Hosted Langfuse…, plus 5 more sections
  • Calls docker, npm and tsx; reaches cloud.langfuse.com; needs POSTGRES_PASSWORD and NEXTAUTH_SECRET

What it does

Langfuse Local Dev Loop is an agent skill from jeremylongshore/tons-of-skills-marketplace. Set up Langfuse local development workflow with hot reload and debugging. Use when developing LLM applications locally, debugging traces, or setting up a fast iteration loop with Langfuse. Trigger with phrases like "langfuse local dev", "langfuse development", "debug langfuse traces", "langfuse hot reload", "langfuse dev workflow".

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Designed for Claude Code

It sits in AI & LLM Engineering, covering LLM observability. It works with Langfuse and Docker. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Developing LLM applications locally
  • Debugging traces
  • Setting up a fast iteration loop with Langfuse
  • With phrases like langfuse local dev

Example prompts

  • “langfuse local dev”
  • “langfuse development”
  • “debug langfuse traces”
  • “/langfuse-local-dev-loop”

Requirements

  • Node.js
  • Docker
  • A credential in LANGFUSE_PUBLIC_KEY
  • A credential in LANGFUSE_SECRET_KEY
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(npm:*), Bash(docker:*), Bash(pnpm:*)

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Development Environment File
  2. Dev-Optimized Langfuse Setup (v4+)
  3. Dev-Optimized Setup (v3 Legacy)
  4. Hot Reload Scripts
  5. Development Tracing Utilities
  6. Example Dev Workflow

What it can do on your machine

Read from SKILL.md and the folder at commit 80f86df. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash(npm:*)
    • Bash(docker:*)
    • Bash(pnpm:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • docker
    • npm
    • tsx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • cloud.langfuse.com

    Also links to:

    • langfuse.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • POSTGRES_PASSWORD
    • NEXTAUTH_SECRET
    • ENCRYPTION_KEY
    • LANGFUSE_PUBLIC_KEY
    • LANGFUSE_SECRET_KEY
    • OPENAI_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Langfuse Local Dev Loop loads about 1.9k tokens when it runs. Until then it costs about 89 tokens; SKILL.md has 279 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~89
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:43
    # .env.local (git-ignored)
  • NoteMentions a .env fileSKILL.md:119
    "dev": "tsx watch --env-file=.env.local src/index.ts",
  • NoteMentions a .env fileSKILL.md:120
    ": "DEBUG=langfuse* tsx watch --env-file=.env.local src/index.ts",
  • NoteMentions a .env fileSKILL.md:121
    LANGFUSE_DEBUG=true tsx watch --env-file=.env.local src/index.ts"
  • NoteMentions a .env fileSKILL.md:224
    `.env` file. Do not commit a database URI or reuse example or production values.
  • NoteMentions a .env fileSKILL.md:234
    # Update .env.local
  • NoteMentions a .env fileSKILL.md:235
    GFUSE_BASE_URL=http://localhost:3000' >> .env.local
  • NoteMentions a .env fileSKILL.md:251
    dentifier, and debug setting used. Keep `.env.local` secret values and

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit 80f86df, republished under its MIT licence (© jeremylongshore). 279 words, ~1,909 tokens.

Download SKILL.mdSave it as .claude/skills/langfuse-local-dev-loop/SKILL.md (or your agent's skills folder).
name
langfuse-local-dev-loop
description
Set up Langfuse local development workflow with hot reload and debugging. Use when developing LLM applications locally, debugging traces, or setting up a fast iteration loop with Langfuse. Trigger with phrases like "langfuse local dev", "langfuse development", "debug langfuse traces", "langfuse hot reload", "langfuse dev workflow".
allowed-tools
Read, Write, Edit, Bash(npm:*), Bash(docker:*), Bash(pnpm:*)
compatibility
Designed for Claude Code
version
1.17.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, langfuse, llm, debugging, workflow

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
bash
# .env.local (git-ignored)
LANGFUSE_PUBLIC_KEY=pk-lf-dev-...
LANGFUSE_SECRET_KEY=sk-lf-dev-...
LANGFUSE_BASE_URL=https://cloud.langfuse.com

# Dev-specific settings
NODE_ENV=development
OPENAI_API_KEY=sk-...
Step 2: Dev-Optimized Langfuse Setup (v4+)
typescript
// src/lib/langfuse-dev.ts
import { LangfuseSpanProcessor } from "@langfuse/otel";
import { NodeSDK } from "@opentelemetry/sdk-node";
import { LangfuseClient } from "@langfuse/client";

const isDev = process.env.NODE_ENV !== "production";

// Configure span processor with dev-friendly settings
const processor = new LangfuseSpanProcessor({
  // In dev: flush immediately for instant visibility
  ...(isDev && { exportIntervalMillis: 1000, maxExportBatchSize: 1 }),
});

const sdk = new NodeSDK({ spanProcessors: [processor] });
sdk.start();

export const langfuse = new LangfuseClient();

// Print trace URLs in development
export function logTrace(traceId: string) {
  if (isDev) {
    const host = process.env.LANGFUSE_BASE_URL || "https://cloud.langfuse.com";
    console.log(`\n  Trace: ${host}/trace/${traceId}\n`);
  }
}

// Clean shutdown
process.on("SIGINT", async () => {
  await sdk.shutdown();
  process.exit(0);
});
Step 3: Dev-Optimized Setup (v3 Legacy)
typescript
// src/lib/langfuse-dev.ts
import { Langfuse } from "langfuse";

const isDev = process.env.NODE_ENV !== "production";

export const langfuse = new Langfuse({
  flushAt: isDev ? 1 : 15,          // Immediate flush in dev
  flushInterval: isDev ? 1000 : 10000,
  ...(isDev && { debug: true }),     // Verbose SDK logging
});

export function logTraceUrl(trace: ReturnType<typeof langfuse.trace>) {
  if (isDev) {
    console.log(`\n  Trace: ${trace.getTraceUrl()}\n`);
  }
}

process.on("beforeExit", async () => {
  await langfuse.shutdownAsync();
});
Step 4: Hot Reload Scripts
json
{
  "scripts": {
    "dev": "tsx watch --env-file=.env.local src/index.ts",
    "dev:debug": "DEBUG=langfuse* tsx watch --env-file=.env.local src/index.ts",
    "dev:trace": "LANGFUSE_DEBUG=true tsx watch --env-file=.env.local src/index.ts"
  }
}
Step 5: Development Tracing Utilities
typescript
// src/lib/dev-utils.ts
import { observe, updateActiveObservation, startActiveObservation } from "@langfuse/tracing";

// Quick traced function wrapper with console output
export function devTrace<T extends (...args: any[]) => Promise<any>>(
  name: string,
  fn: T
): T {
  return observe({ name }, async (...args: Parameters<T>) => {
    updateActiveObservation({ input: args, metadata: { env: "dev" } });
    const start = Date.now();

    const result = await fn(...args);

    const duration = Date.now() - start;
    updateActiveObservation({ output: result });
    console.log(`  [${name}] ${duration}ms`);

    return result;
  }) as T;
}

// Quick debug trace -- fire-and-forget diagnostic trace
export async function debugTrace(name: string, data: Record<string, any>) {
  await startActiveObservation(`debug/${name}`, async () => {
    updateActiveObservation({
      input: data,
      metadata: { debug: true, timestamp: new Date().toISOString() },
    });
  });
}
Step 6: Example Dev Workflow
typescript
// src/index.ts
import "dotenv/config";
import { initTracing, langfuse } from "./lib/langfuse-dev";
import { devTrace } from "./lib/dev-utils";
import OpenAI from "openai";
import { observeOpenAI } from "@langfuse/openai";

initTracing();

const openai = observeOpenAI(new OpenAI());

const askQuestion = devTrace("ask-question", async (question: string) => {
  const response = await openai.chat.completions.create({
    model: "gpt-4o-mini",
    messages: [{ role: "user", content: question }],
  });
  return response.choices[0].message.content;
});

// Run on file save (tsx watch restarts automatically)
const answer = await askQuestion("What is Langfuse?");
console.log("Answer:", answer);

Local Self-Hosted Langfuse (Optional)

For offline development or data privacy:

yaml
# docker-compose.langfuse.yml
services:
  langfuse:
    image: langfuse/langfuse:latest
    ports:
      - "3000:3000"
    environment:
      - DATABASE_URL=${DATABASE_URL}
      - NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
      - NEXTAUTH_URL=http://localhost:3000
      - SALT=${SALT}
      - ENCRYPTION_KEY=${ENCRYPTION_KEY}
    depends_on:
      - db

  db:
    image: postgres:16-alpine
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_DB: langfuse
    volumes:
      - langfuse-db:/var/lib/postgresql/data

volumes:
  langfuse-db:

Before starting the stack, place unique local-only values for DATABASE_URL, POSTGRES_PASSWORD, NEXTAUTH_SECRET, SALT, and ENCRYPTION_KEY in a git-ignored .env file. Do not commit a database URI or reuse example or production values.

bash
set -euo pipefail
# Start local Langfuse
docker compose -f docker-compose.langfuse.yml up -d

# Wait for startup, then visit http://localhost:3000
# Create account, project, and API keys in the local UI

# Update .env.local
echo 'LANGFUSE_BASE_URL=http://localhost:3000' >> .env.local

Error Handling

IssueCauseSolution
Traces delayed in devBatching still activeSet flushAt: 1 or exportIntervalMillis: 1000
No debug outputDebug not enabledSet LANGFUSE_DEBUG=true or DEBUG=langfuse*
Hot reload not workingWrong watch commandUse tsx watch (not ts-node)
Local instance 502DB not readyWait 10s for PostgreSQL startup
Traces going to cloudWrong LANGFUSE_BASE_URLPoint 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

Next Steps

For SDK patterns and best practices, see langfuse-sdk-patterns.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/.curated/langfuse-local-dev-loop of jeremylongshore/tons-of-skills-marketplace.

Open the folder on GitHubat commit 80f86df

Compare with similar skills

Langfuse Local Dev Loop next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Langfuse Local Dev Loop compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Langfuse Local Dev Loop this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.9kAutomated safety check: NotesMIT
Datadog Query Recipeslangfuse/langfuse36k—~824Automated safety check: PassCustom licence
Linear Work Rhythmlangfuse/langfuse36k—~3.4kAutomated safety check: PassCustom licence
Code Reviewlangfuse/langfuse36k—~591Automated safety check: PassCustom licence
Refactor React Effectslangfuse/langfuse36k—~1.7kAutomated safety check: PassCustom licence
Langfuseavivsinai/langfuse-mcp1131 repos~580Automated safety check: PassMIT

Similar skills

  • Datadog Query Recipes

    langfuse/langfuse

    Research Langfuse production telemetry with reusable Datadog queries.

    36k GitHub stars~824 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Linear Work Rhythm

    langfuse/langfuse

    Answer "what should I do today" for a Langfuse maintainer, from the tracker rather than from memory: which projects you lead, which owe an update before the Monday engineering weekly, what shipped…

    36k GitHub stars~3.4k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Code Review

    langfuse/langfuse

    Review Langfuse code changes for correctness, regressions, and best practices.

    36k GitHub stars~591 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Refactor React Effects

    langfuse/langfuse

    Refactor avoidable React useEffect usage in Langfuse frontend code.

    36k GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Langfuse

    avivsinai/langfuse-mcp

    Investigate AI traces, observations, exceptions, latency, sessions, prompts, datasets, annotation queues, and scores through Langfuse MCP.

    113 GitHub starsUsed in 1 repo~580 tokens
    AI & LLM EngineeringAuto-check passed
  • Langfuse Integration Page

    langfuse/langfuse-docs

    Create a new Langfuse integration page in the langfuse-docs repo.

    247 GitHub stars~3.7k tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated yesterday
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Langfuse Local Dev Loop

What does Langfuse Local Dev Loop do?

Set up Langfuse local development workflow with hot reload and debugging. Langfuse Local Dev Loop is an agent skill from jeremylongshore/tons-of-skills-marketplace. Set up Langfuse local development workflow with hot reload and debugging.

When should I use Langfuse Local Dev Loop?

Langfuse Local Dev Loop fits situations like: developing LLM applications locally; debugging traces; setting up a fast iteration loop with Langfuse; with phrases like langfuse local dev.

How do I install Langfuse Local Dev Loop in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill langfuse-local-dev-loop -a claude-code`. Or copy the skill folder (skills/.curated/langfuse-local-dev-loop in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/langfuse-local-dev-loop in your project. Claude Code loads it when a task matches its description.

How do I install Langfuse Local Dev Loop in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill langfuse-local-dev-loop -a codex`. Or copy the skill folder (skills/.curated/langfuse-local-dev-loop in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/langfuse-local-dev-loop in your project. Codex loads it when a task matches its description.

Can I use Langfuse Local Dev Loop in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill langfuse-local-dev-loop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/langfuse-local-dev-loop, .gemini/skills/langfuse-local-dev-loop, .github/skills/langfuse-local-dev-loop and .opencode/skills/langfuse-local-dev-loop in your project.

What does Langfuse Local Dev Loop need to run?

Going by SKILL.md and its folder, Langfuse Local Dev Loop needs the command-line tools its instructions call (docker, npm and tsx) and credentials named POSTGRES_PASSWORD, NEXTAUTH_SECRET, ENCRYPTION_KEY and LANGFUSE_PUBLIC_KEY. Our summary lists: Node.js; Docker; A credential in LANGFUSE_PUBLIC_KEY; A credential in LANGFUSE_SECRET_KEY. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(npm:*), Bash(docker:*), Bash(pnpm:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Langfuse Local Dev Loop access the network?

SKILL.md names 2 domains. In commands or code: cloud.langfuse.com; the agent is likely to contact it when it follows the instructions. As links in the text: langfuse.com. This is read from the text; nothing was executed.

Is Langfuse Local Dev Loop safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Langfuse Local Dev Loop use?

Langfuse Local Dev Loop is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Langfuse Local Dev Loop use?

About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Langfuse Local Dev Loop?

Skills that share tags, products or a category with Langfuse Local Dev Loop: Datadog Query Recipes (langfuse/langfuse, 36k stars), Linear Work Rhythm (langfuse/langfuse, 36k stars), Code Review (langfuse/langfuse, 36k stars) and Refactor React Effects (langfuse/langfuse, 36k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Langfuse Local Dev Loop?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,825 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 9, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.