Agent skill

Langfuse Hello World

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

Create a minimal working Langfuse trace example. An agent skill from jeremylongshore/tons-of-skills-marketplace.

MITAuto-check passedAI & LLM Engineering

Install Langfuse Hello World

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill langfuse-hello-world -a claude-code

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

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace langfuse-hello-world --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-hello-world .claude/skills/langfuse-hello-world && 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-hello-world
GitHub stars
2.8k
Token cost
~1.9k tokens
SKILL.md length
244 words
Files
1
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Create a minimal working Langfuse trace example. An agent skill from jeremylongshore/tons-of-skills-marketplace.

  • Works in 4 steps: Hello World with v4+ Modular SDK → Hello World with observe Wrapper → Hello World with Legacy v3 SDK → …
  • Starting a new Langfuse integration
  • SKILL.md covers Overview, Prerequisites, Instructions and Trace Hierarchy, plus 5 more sections
  • Calls npm; needs LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY

What it does

Langfuse Hello World is an agent skill from jeremylongshore/tons-of-skills-marketplace. Create a minimal working Langfuse trace example. Use when starting a new Langfuse integration, testing your setup, or learning basic Langfuse tracing patterns. Trigger with phrases like "langfuse hello world", "langfuse example", "langfuse quick start", "first langfuse trace", "simple langfuse code".

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, Python, OpenAI and OpenTelemetry. 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

  • Starting a new Langfuse integration
  • Testing your setup
  • Learning basic Langfuse tracing patterns
  • With phrases like langfuse hello world

Example prompts

  • “langfuse hello world”
  • “langfuse example”
  • “langfuse quick start”
  • “/langfuse-hello-world”

Requirements

  • Python 3
  • Node.js
  • 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

Workflow steps

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

  1. Hello World with v4+ Modular SDK
  2. Hello World with observe Wrapper
  3. Hello World with Legacy v3 SDK
  4. Python Hello World

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. 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

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

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

  • Network

    Links to these hosts (documentation or services it may open):

    • 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:

    • LANGFUSE_PUBLIC_KEY
    • LANGFUSE_SECRET_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 Hello World loads about 1.9k tokens when it runs. Until then it costs about 81 tokens; SKILL.md has 244 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~81
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 passed

The automated check found no risky patterns in SKILL.md.

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 cfae287, republished under its MIT licence (© jeremylongshore). 244 words, ~1,856 tokens.

Download SKILL.mdSave it as .claude/skills/langfuse-hello-world/SKILL.md (or your agent's skills folder).
name
langfuse-hello-world
description
Create a minimal working Langfuse trace example. Use when starting a new Langfuse integration, testing your setup, or learning basic Langfuse tracing patterns. Trigger with phrases like "langfuse hello world", "langfuse example", "langfuse quick start", "first langfuse trace", "simple langfuse code".
allowed-tools
Read, Write, Edit
compatibility
Designed for Claude Code
version
1.17.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, langfuse, testing, tracing

Langfuse Hello World

Overview

Create your first Langfuse trace with real SDK calls. Demonstrates the trace/span/generation hierarchy, the observe wrapper, and the OpenAI drop-in integration.

Prerequisites

  • Completed langfuse-install-auth setup
  • Valid API credentials in environment variables
  • OpenAI API key (for the OpenAI integration example)

Instructions

Step 1: Hello World with v4+ Modular SDK
typescript
// hello-langfuse.ts
import { startActiveObservation, observe, updateActiveObservation } from "@langfuse/tracing";
import { LangfuseSpanProcessor } from "@langfuse/otel";
import { NodeSDK } from "@opentelemetry/sdk-node";

// Register OpenTelemetry processor (once at startup)
const sdk = new NodeSDK({
  spanProcessors: [new LangfuseSpanProcessor()],
});
sdk.start();

async function main() {
  // Create a top-level trace with startActiveObservation
  await startActiveObservation("hello-world", async (span) => {
    span.update({
      input: { message: "Hello, Langfuse!" },
      metadata: { source: "hello-world-example" },
    });

    // Nested span -- automatically linked to parent
    await startActiveObservation("process-input", async (child) => {
      child.update({ input: { text: "processing..." } });
      await new Promise((r) => setTimeout(r, 100));
      child.update({ output: { result: "done" } });
    });

    // Nested generation (LLM call tracking)
    await startActiveObservation(
      { name: "llm-response", asType: "generation" },
      async (gen) => {
        gen.update({
          model: "gpt-4o",
          input: [{ role: "user", content: "Say hello" }],
          output: { content: "Hello! How can I help you today?" },
          usage: { promptTokens: 5, completionTokens: 10, totalTokens: 15 },
        });
      }
    );

    span.update({ output: { status: "completed" } });
  });

  // Allow time for the span processor to flush
  await sdk.shutdown();
  console.log("Trace created! Check your Langfuse dashboard.");
}

main().catch(console.error);
Step 2: Hello World with observe Wrapper

The observe wrapper traces existing functions without modifying internals:

typescript
import { observe, updateActiveObservation } from "@langfuse/tracing";

// Wrap any async function -- it becomes a traced span
const processQuery = observe(async (query: string) => {
  updateActiveObservation({ input: { query } });

  // Simulate processing
  const result = `Processed: ${query}`;

  updateActiveObservation({ output: { result } });
  return result;
});

// Wrap an LLM call as a generation
const generateAnswer = observe(
  { name: "generate-answer", asType: "generation" },
  async (prompt: string) => {
    updateActiveObservation({
      model: "gpt-4o",
      input: [{ role: "user", content: prompt }],
    });

    const answer = "Langfuse is an open-source LLM observability platform.";

    updateActiveObservation({
      output: answer,
      usage: { promptTokens: 10, completionTokens: 20 },
    });
    return answer;
  }
);

// Both functions auto-nest when called within an observed context
const pipeline = observe(async () => {
  await processQuery("What is Langfuse?");
  await generateAnswer("Explain Langfuse in one sentence.");
});

await pipeline();
Step 3: Hello World with Legacy v3 SDK
typescript
import { Langfuse } from "langfuse";

const langfuse = new Langfuse();

async function helloLangfuse() {
  const trace = langfuse.trace({
    name: "hello-world",
    userId: "demo-user",
    metadata: { source: "hello-world-example" },
    tags: ["demo", "getting-started"],
  });

  // Span: child operation
  const span = trace.span({
    name: "process-input",
    input: { message: "Hello, Langfuse!" },
  });
  await new Promise((r) => setTimeout(r, 100));
  span.end({ output: { result: "Processed successfully!" } });

  // Generation: LLM call tracking
  trace.generation({
    name: "llm-response",
    model: "gpt-4o",
    input: [{ role: "user", content: "Say hello" }],
    output: { content: "Hello! How can I help you today?" },
    usage: { promptTokens: 5, completionTokens: 10, totalTokens: 15 },
  });

  await langfuse.flushAsync();
  console.log("Trace URL:", trace.getTraceUrl());
}

helloLangfuse();
Step 4: Python Hello World
python
from langfuse.decorators import observe, langfuse_context

@observe()
def process_query(query: str) -> str:
    return f"Processed: {query}"

@observe(as_type="generation")
def generate_response(prompt: str) -> str:
    langfuse_context.update_current_observation(
        model="gpt-4o",
        usage={"prompt_tokens": 10, "completion_tokens": 20},
    )
    return "Hello from Langfuse!"

@observe()
def main():
    result = process_query("Hello!")
    response = generate_response("Say hello")
    return response

main()

Trace Hierarchy

Trace: hello-world
  ├── Span: process-input
  │     input: { message: "Hello, Langfuse!" }
  │     output: { result: "Processed successfully!" }
  └── Generation: llm-response
        model: gpt-4o
        input: [{ role: "user", content: "Say hello" }]
        output: "Hello! How can I help you today?"
        usage: { promptTokens: 5, completionTokens: 10 }

Error Handling

ErrorCauseSolution
Import errorSDK not installednpm install @langfuse/tracing @langfuse/otel @opentelemetry/sdk-node
Auth error (401)Invalid credentialsVerify LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY
Trace not appearingData not flushedCall sdk.shutdown() (v4+) or langfuse.flushAsync() (v3)
Network errorHost unreachableCheck LANGFUSE_BASE_URL value
No auto-nestingMissing OTel setupRegister LangfuseSpanProcessor with NodeSDK

Output

Produce one trace URL or identifier with a root trace, child span, and generation. State the SDK version and whether token usage was recorded, but do not include the full prompt or generated content in the completion message.

Examples

Run the JavaScript hello-world example with test credentials, wait for the SDK flush, and open the resulting trace to confirm all three observations appear. Repeat the Python example with a non-sensitive synthetic query and verify decorator-created nesting before instrumenting production code.

Resources

Next Steps

Proceed to langfuse-core-workflow-a for real OpenAI/Anthropic tracing, or langfuse-local-dev-loop for development workflow setup.

© 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-hello-world of jeremylongshore/tons-of-skills-marketplace.

Open the folder on GitHubat commit cfae287

Compare with similar skills

Langfuse Hello World 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 Hello World compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Langfuse Hello World this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.9kAutomated safety check: PassMIT
Phoenix Integration SnippetsArize-ai/phoenix12k—~1.4kAutomated safety check: PassApache-2.0
Ag2 Telemetryag2ai/build-with-ag2252—~1.9kAutomated safety check: PassApache-2.0
Phoenix LLM ObservabilityOrchestra-Research/AI-Research-SKILLs13k2 repos~2.9kAutomated safety check: PassMIT
Agentsop Observability Setupagentsope/SkillAlchemy436—~4.4kAutomated safety check: PassMIT
Langfusedavila7/claude-code-templates33k5 repos~1.4kAutomated safety check: PassMIT

Similar skills

  • Generates onboarding code snippets for Phoenix tracing integrations and wires them into the project onboarding UI.

    12k GitHub stars~1.4k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Ag2 Telemetry

    ag2ai/build-with-ag2

    Add OpenTelemetry traces to an AG2 beta Agent via TelemetryMiddleware (autogen.beta.middleware.builtin).

    252 GitHub stars~1.9k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Phoenix LLM Observability

    Orchestra-Research/AI-Research-SKILLs

    Sets up Arize Phoenix to trace, evaluate and monitor LLM applications, with instrumentation for OpenAI, LangChain and LlamaIndex and a self-hosted server.

    13k GitHub starsUsed in 2 repos~2.9k tokens
    AI & LLM EngineeringAuto-check passed
  • Agentsop Observability Setup

    agentsope/SkillAlchemy

    Enhancement-overlay skill — the DECISION + WIRING layer for LM observability that the single-backend skills [[langsmith]], [[phoenix]], [[mlflow]] do NOT cover.

    436 GitHub stars~4.4k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Langfuse

    davila7/claude-code-templates

    Expert in Langfuse - the open-source LLM observability platform.

    33k GitHub starsUsed in 5 repos~1.4k tokens
    AI & LLM EngineeringAuto-check passed
  • Phoenix Release Please

    Arize-ai/phoenix

    Bump the next release-please version for a Phoenix Python package (arize-phoenix, arize-phoenix-client, arize-phoenix-evals, arize-phoenix-otel) by opening a PR with a Release-As commit footer.

    12k GitHub stars~708 tokensUpdated yesterday
    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 today
    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 today
    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 today
    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 today
    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 today
    Auto-check passed

Questions about Langfuse Hello World

What does Langfuse Hello World do?

Create a minimal working Langfuse trace example. An agent skill from jeremylongshore/tons-of-skills-marketplace. Langfuse Hello World is an agent skill from jeremylongshore/tons-of-skills-marketplace. Create a minimal working Langfuse trace example.

When should I use Langfuse Hello World?

Langfuse Hello World fits situations like: starting a new Langfuse integration; testing your setup; learning basic Langfuse tracing patterns; with phrases like langfuse hello world.

How do I install Langfuse Hello World in Claude Code?

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

How do I install Langfuse Hello World in Codex?

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

Can I use Langfuse Hello World 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-hello-world -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-hello-world, .gemini/skills/langfuse-hello-world, .github/skills/langfuse-hello-world and .opencode/skills/langfuse-hello-world in your project.

What does Langfuse Hello World need to run?

Going by SKILL.md and its folder, Langfuse Hello World needs the command-line tools its instructions call (npm) and credentials named LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY. Our summary lists: Python 3; Node.js; A credential in LANGFUSE_PUBLIC_KEY; A credential in LANGFUSE_SECRET_KEY. Its frontmatter pre-approves these tools: Read, Write, Edit. Compatibility (from SKILL.md): Designed for Claude Code.

Does Langfuse Hello World access the network?

SKILL.md names 1 domain. As links in the text: langfuse.com. This is read from the text; nothing was executed.

Is Langfuse Hello World safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Langfuse Hello World use?

Langfuse Hello World 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 Hello World use?

About 1.9k tokens (SKILL.md is roughly 7.4k 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 Hello World?

Skills that share tags, products or a category with Langfuse Hello World: Phoenix Integration Snippets (Arize-ai/phoenix, 12k stars), Ag2 Telemetry (ag2ai/build-with-ag2, 252 stars), Phoenix LLM Observability (Orchestra-Research/AI-Research-SKILLs, 13k stars) and Agentsop Observability Setup (agentsope/SkillAlchemy, 436 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Langfuse Hello World?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 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.