Agent skill

Langfuse Core Workflow A

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

Execute Langfuse primary workflow: Tracing LLM calls and spans.

MITAuto-check passedAI & LLM Engineering

Install Langfuse Core Workflow A

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

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

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

At a glance

Execute Langfuse primary workflow: Tracing LLM calls and spans.

  • Works in 6 steps: OpenAI Drop-In Wrapper (Zero-Code Tracing) → Manual Tracing -- RAG Pipeline (v4+ SDK) → Manual Tracing -- RAG Pipeline (v3 Legacy) → …
  • Implementing LLM tracing
  • SKILL.md covers Overview, Prerequisites, Instructions and Error Handling, plus 4 more sections
  • Calls npm

What it does

Langfuse Core Workflow A is an agent skill from jeremylongshore/tons-of-skills-marketplace. Execute Langfuse primary workflow: Tracing LLM calls and spans. Use when implementing LLM tracing, building traced AI features, or adding observability to existing LLM applications. Trigger with phrases like "langfuse tracing", "trace LLM calls", "add langfuse to openai", "langfuse spans", "track llm requests".

Its SKILL.md is about 2.3k 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 and Observability. It works with Langfuse, 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

  • Implementing LLM tracing
  • Building traced AI features
  • Adding observability to existing LLM applications
  • With phrases like langfuse tracing

Example prompts

  • “langfuse tracing”
  • “trace LLM calls”
  • “add langfuse to openai”
  • “/langfuse-core-workflow-a”

Requirements

  • Python 3
  • Node.js
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(npm:*), Grep

Workflow steps

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

  1. OpenAI Drop-In Wrapper (Zero-Code Tracing)
  2. Manual Tracing -- RAG Pipeline (v4+ SDK)
  3. Manual Tracing -- RAG Pipeline (v3 Legacy)
  4. Streaming Response Tracking
  5. Anthropic Claude Tracing (Manual)
  6. LangChain Integration (Python)

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
    • Bash(npm:*)
    • Grep

    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 no API keys, tokens, secrets or passwords.

    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 Core Workflow A loads about 2.3k tokens when it runs. Until then it costs about 84 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
~84
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

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, ~2,256 tokens.

Download SKILL.mdSave it as .claude/skills/langfuse-core-workflow-a/SKILL.md (or your agent's skills folder).
name
langfuse-core-workflow-a
description
Execute Langfuse primary workflow: Tracing LLM calls and spans. Use when implementing LLM tracing, building traced AI features, or adding observability to existing LLM applications. Trigger with phrases like "langfuse tracing", "trace LLM calls", "add langfuse to openai", "langfuse spans", "track llm requests".
allowed-tools
Read, Write, Edit, Bash(npm:*), Grep
compatibility
Designed for Claude Code
version
1.17.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, langfuse, observability, llm, workflow

Langfuse Core Workflow A: Tracing LLM Calls

Overview

End-to-end tracing of LLM calls, chains, and agents. Covers the OpenAI drop-in wrapper, manual tracing with startActiveObservation, RAG pipeline instrumentation, streaming response tracking, and LangChain integration.

Prerequisites

  • Completed langfuse-install-auth setup
  • OpenAI SDK installed (npm install openai)
  • For v4+: @langfuse/openai, @langfuse/tracing, @langfuse/otel, @opentelemetry/sdk-node

Instructions

Step 1: OpenAI Drop-In Wrapper (Zero-Code Tracing)
typescript
import OpenAI from "openai";
import { observeOpenAI } from "@langfuse/openai";

// Wrap the OpenAI client -- all calls are now traced automatically
const openai = observeOpenAI(new OpenAI());

// Every call captures: model, input, output, tokens, latency, cost
const response = await openai.chat.completions.create({
  model: "gpt-4o",
  messages: [
    { role: "system", content: "You are a helpful assistant." },
    { role: "user", content: "What is Langfuse?" },
  ],
});

// Add metadata to traces
const res = await observeOpenAI(new OpenAI(), {
  generationName: "product-description",
  generationMetadata: { feature: "onboarding" },
  sessionId: "session-abc",
  userId: "user-123",
  tags: ["production", "onboarding"],
}).chat.completions.create({
  model: "gpt-4o-mini",
  messages: [{ role: "user", content: "Describe this product" }],
});
Step 2: Manual Tracing -- RAG Pipeline (v4+ SDK)
typescript
import { startActiveObservation, updateActiveObservation } from "@langfuse/tracing";

async function ragPipeline(query: string) {
  return await startActiveObservation("rag-pipeline", async () => {
    updateActiveObservation({ input: { query }, metadata: { pipeline: "rag-v2" } });

    // Span: Query embedding
    const embedding = await startActiveObservation("embed-query", async () => {
      updateActiveObservation({ input: { text: query } });
      const vector = await embedText(query);
      updateActiveObservation({
        output: { dimensions: vector.length },
        metadata: { model: "text-embedding-3-small" },
      });
      return vector;
    });

    // Span: Vector search
    const documents = await startActiveObservation("vector-search", async () => {
      updateActiveObservation({ input: { dimensions: embedding.length } });
      const docs = await searchVectorDB(embedding);
      updateActiveObservation({
        output: { documentCount: docs.length, topScore: docs[0]?.score },
      });
      return docs;
    });

    // Generation: LLM call with context
    const answer = await startActiveObservation(
      { name: "generate-answer", asType: "generation" },
      async () => {
        updateActiveObservation({
          model: "gpt-4o",
          input: { query, context: documents.map((d) => d.content) },
        });

        const result = await generateAnswer(query, documents);

        updateActiveObservation({
          output: result.content,
          usage: {
            promptTokens: result.usage.prompt_tokens,
            completionTokens: result.usage.completion_tokens,
          },
        });
        return result.content;
      }
    );

    updateActiveObservation({ output: { answer } });
    return answer;
  });
}
Step 3: Manual Tracing -- RAG Pipeline (v3 Legacy)
typescript
import { Langfuse } from "langfuse";

const langfuse = new Langfuse();

async function ragPipeline(query: string) {
  const trace = langfuse.trace({
    name: "rag-pipeline",
    input: { query },
    metadata: { pipeline: "rag-v1" },
  });

  const embedSpan = trace.span({ name: "embed-query", input: { text: query } });
  const embedding = await embedText(query);
  embedSpan.end({ output: { dimensions: embedding.length } });

  const searchSpan = trace.span({ name: "vector-search" });
  const documents = await searchVectorDB(embedding);
  searchSpan.end({ output: { count: documents.length, topScore: documents[0]?.score } });

  const generation = trace.generation({
    name: "generate-answer",
    model: "gpt-4o",
    modelParameters: { temperature: 0.7, maxTokens: 500 },
    input: { query, context: documents.map((d) => d.content) },
  });

  const answer = await generateAnswer(query, documents);

  generation.end({
    output: answer.content,
    usage: {
      promptTokens: answer.usage.prompt_tokens,
      completionTokens: answer.usage.completion_tokens,
      totalTokens: answer.usage.total_tokens,
    },
  });

  trace.update({ output: { answer: answer.content } });
  await langfuse.flushAsync();
  return answer.content;
}
Step 4: Streaming Response Tracking
typescript
import OpenAI from "openai";
import { observeOpenAI } from "@langfuse/openai";

// The wrapper handles streaming automatically
const openai = observeOpenAI(new OpenAI());

const stream = await openai.chat.completions.create({
  model: "gpt-4o",
  messages: [{ role: "user", content: "Tell me a story" }],
  stream: true,
  stream_options: { include_usage: true }, // Required for token tracking
});

let fullContent = "";
for await (const chunk of stream) {
  const content = chunk.choices[0]?.delta?.content || "";
  fullContent += content;
  process.stdout.write(content);
}
// Token usage and latency are captured automatically by the wrapper
Step 5: Anthropic Claude Tracing (Manual)
typescript
import Anthropic from "@anthropic-ai/sdk";
import { startActiveObservation, updateActiveObservation } from "@langfuse/tracing";

const anthropic = new Anthropic();

async function callClaude(prompt: string) {
  return await startActiveObservation(
    { name: "claude-call", asType: "generation" },
    async () => {
      updateActiveObservation({
        model: "claude-sonnet-4-20250514",
        input: [{ role: "user", content: prompt }],
      });

      const response = await anthropic.messages.create({
        model: "claude-sonnet-4-20250514",
        max_tokens: 1024,
        messages: [{ role: "user", content: prompt }],
      });

      updateActiveObservation({
        output: response.content[0].text,
        usage: {
          promptTokens: response.usage.input_tokens,
          completionTokens: response.usage.output_tokens,
        },
      });

      return response.content[0].text;
    }
  );
}
Step 6: LangChain Integration (Python)
python
from langfuse.callback import CallbackHandler
from langchain_openai import ChatOpenAI
from langchain_core.prompts import ChatPromptTemplate

langfuse_handler = CallbackHandler()

llm = ChatOpenAI(model="gpt-4o")

prompt = ChatPromptTemplate.from_messages([
    ("system", "You are a helpful assistant."),
    ("human", "{input}"),
])

chain = prompt | llm

# All LangChain operations are automatically traced
result = chain.invoke(
    {"input": "What is Langfuse?"},
    config={"callbacks": [langfuse_handler]},
)

Error Handling

IssueCauseSolution
Missing generationsOpenAI wrapper not appliedUse observeOpenAI() from @langfuse/openai
Orphaned spansMissing end or callback finishUse startActiveObservation (auto-ends) or .end() in finally
No token usage on streamStream usage not requestedAdd stream_options: { include_usage: true }
Flat trace (no nesting)Missing OTel contextEnsure NodeSDK is started with LangfuseSpanProcessor

Output

Produce a trace with a named root observation, nested spans or generations, model and usage metadata, and a final output value. Record the trace identifier or dashboard URL so the implementation can be verified without exposing prompt contents.

Examples

After wrapping a single OpenAI client with observeOpenAI, make one test request and verify that its generation has model, latency, input/output, and token usage. For a RAG path, verify that embed-query, vector-search, and generate-answer appear under the same root trace.

Resources

Next Steps

For evaluation and scoring workflows, see langfuse-core-workflow-b.

© 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-core-workflow-a of jeremylongshore/tons-of-skills-marketplace.

Open the folder on GitHubat commit cfae287

Compare with similar skills

Langfuse Core Workflow A 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 Core Workflow A compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Langfuse Core Workflow A this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2.3kAutomated safety check: PassMIT
Ag2 Telemetryag2ai/build-with-ag2252—~1.9kAutomated safety check: PassApache-2.0
Agentsop Observability Setupagentsope/SkillAlchemy436—~4.4kAutomated safety check: PassMIT
Ak Dev New Tracing Provideryaalalabs/agent-kernel192—~3.5kAutomated safety check: PassApache-2.0
Backend Dev Guidelineslangfuse/langfuse36k—~1.9kAutomated safety check: PassCustom licence
Observability Architecturemajiayu000/litellm-rs118—~1.3kAutomated safety check: PassMIT

Similar skills

  • 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
  • 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
  • Ak Dev New Tracing Provider

    yaalalabs/agent-kernel

    Step-by-step guide for adding a new observability/tracing provider to Agent Kernel.

    192 GitHub stars~3.5k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Backend Dev Guidelines

    langfuse/langfuse

    Build or review Langfuse backend code. An agent skill from langfuse/langfuse.

    36k GitHub stars~1.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • Observability Architecture

    majiayu000/litellm-rs

    LiteLLM-RS Observability Architecture. An agent skill from majiayu000/litellm-rs.

    118 GitHub stars~1.3k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Sentry Elixir SDK

    getsentry/sentry-for-ai

    Official

    Full Sentry SDK setup for Elixir. An agent skill from getsentry/sentry-for-ai.

    268 GitHub stars~3.5k 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 Core Workflow A

What does Langfuse Core Workflow A do?

Execute Langfuse primary workflow: Tracing LLM calls and spans. Langfuse Core Workflow A is an agent skill from jeremylongshore/tons-of-skills-marketplace. Execute Langfuse primary workflow: Tracing LLM calls and spans.

When should I use Langfuse Core Workflow A?

Langfuse Core Workflow A fits situations like: implementing LLM tracing; building traced AI features; adding observability to existing LLM applications; with phrases like langfuse tracing.

How do I install Langfuse Core Workflow A in Claude Code?

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

How do I install Langfuse Core Workflow A in Codex?

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

Can I use Langfuse Core Workflow A 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-core-workflow-a -a cursor` (or -a -a, -a or -a for the others). To copy it by hand, put the folder in .cursor/skills/langfuse-core-workflow-a, .gemini/skills/langfuse-core-workflow-a, .github/skills/langfuse-core-workflow-a and .opencode/skills/langfuse-core-workflow-a in your project.

What does Langfuse Core Workflow A need to run?

Going by SKILL.md and its folder, Langfuse Core Workflow A needs the command-line tools its instructions call (npm). Our summary lists: Python 3; Node.js. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(npm:*), Grep. Compatibility (from SKILL.md): Designed for Claude Code.

Does Langfuse Core Workflow A 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 Core Workflow A 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 Core Workflow A use?

Langfuse Core Workflow A 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 Core Workflow A use?

About 2.3k tokens (SKILL.md is roughly 9k 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 Core Workflow A?

Skills that share tags, products or a category with Langfuse Core Workflow A: Ag2 Telemetry (ag2ai/build-with-ag2, 252 stars), Agentsop Observability Setup (agentsope/SkillAlchemy, 436 stars), Ak Dev New Tracing Provider (yaalalabs/agent-kernel, 192 stars) and Backend Dev Guidelines (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 Core Workflow A?

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.