langfuse-tracing

langfuse-tracing is a skill for Claude Code, Codex from Ampli-Group/agentic-mobile-blueprint. It costs 41 tokens per session (868 once invoked), scanned A, original, MIT.

A tracing setup for monitoring language-model calls made by Supabase Edge Functions. It records details such as inputs, users, sessions, metadata, tags, and model usage through shared wrappers for Gemini, Anthropic, and OpenAI.

In plain words
What is it for?
Use it when adding monitored text, tool, or image model calls to Edge Functions, including Gemini, Claude, or OpenAI integrations.
Why use it?
It helps developers see what AI operations ran, investigate failures, and track usage and costs. Without tracing, these details can be difficult to reconstruct after a request finishes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { withTrace, traceLLMGemini } from '../_shared/langfuse/gemini.ts';.

Good fit Use it when adding monitored text, tool, or image model calls to Edge Functions, including Gemini, Claude, or OpenAI integrations.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Ampli-Group/agentic-mobile-blueprint
agentmods
npx agentmods add skills/ampli-group/agentic-mobile-blueprint/langfuse-tracing

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for langfuse-tracing

README.md
[![agentmods](https://agentmods.dev/badge/skills/ampli-group/agentic-mobile-blueprint/langfuse-tracing/github.svg)](https://agentmods.dev/skills/ampli-group/agentic-mobile-blueprint/langfuse-tracing)
Your own site
<a href="https://agentmods.dev/skills/ampli-group/agentic-mobile-blueprint/langfuse-tracing"><img src="https://agentmods.dev/badge/skills/ampli-group/agentic-mobile-blueprint/langfuse-tracing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for langfuse-tracing

Your own site · 80×15
<a href="https://agentmods.dev/skills/ampli-group/agentic-mobile-blueprint/langfuse-tracing"><img src="https://agentmods.dev/badge/skills/ampli-group/agentic-mobile-blueprint/langfuse-tracing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 868 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.00868
Opus 5 $0.00020 $0.00434
Sonnet 5 $0.00008 $0.00174
Haiku 4.5 $0.00004 $0.00087

Measured 10d ago against content hash d5c81dc80e68, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

langfuse-tracing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/langfuse-tracing/SKILL.md · 123 lines

How it starts

The opening of the file, as written. The whole thing — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Langfuse Tracing for AI Operations

Available Modules

_shared/langfuse/
├── shared.ts      # Base: Tracer, withTrace()
├── gemini.ts      # Gemini: text, tools, images
├── anthropic.ts   # Anthropic: Claude text, tools
└── openai.ts      # OpenAI: text, tools, images

Basic Usage

Wrap Function with Tracing

import { withTrace, traceLLMGemini } from '../_shared/langfuse/gemini.ts';

Deno.serve(async (req: Request) => {
  return await withTrace(
    {
      name: 'my-function',
      userId: user.id,
      sessionId: item_id,
      input: { prompt: 'analyze this' },
      metadata: { function: 'my-function' },
      tags: ['ai', 'analysis'],
    },
    async (tracer) => {
      // Your AI calls here
      const { text } = await traceLLMGemini(tracer, {
        model: 'gemini-2.5-flash',
        messages: [{ role: 'user', content: 'Hello' }],
      });
      
      return new Response(JSON.stringify({ result: text }));
    }
  );
});

Gemini: Text Completion

const { text, usage } = await traceLLMGemini(tracer, {
  model: 'gemini-2.5-flash',
  messages: [{ role: 'user', content: 'Summarize this' }],
  temperature: 0.7,
  maxTokens: 500,
});

Gemini: Structured Output

const { data } = await traceLLMGemini<{ title: string; price: number }>(tracer, {
  model: 'gemini-2.5-flash',
  messages: [{ role: 'user', content: 'Extract product info' }],
  schema: {
    type: 'object',
    properties: {
      title: { type: 'string' },
      price: { type: 'number' },
    },
    required: ['title', 'price'],
  },
});
// data.title, data.price are typed!

Gemini: Function Calling

const result = await traceLLMWithToolsGemini(tracer, 'agent-name', {
  model: 'gemini-2.5-flash',
  messages: [{ role: 'user', content: 'Get weather in SF' }],
  tools: [{
    name: 'get_weather',
    description: 'Get current weather',
    parameters: {
      type: 'object',
      properties: { location: { type: 'string' } },
      required: ['location'],
    },
  }],
});

if (result.message.tool_calls) {
  // Execute tools
}

Read the full file on GitHub · 123 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 123 lines · 41 tokens per session scan A d5c81dc80e68

Subscribe to this mod's changes

langfuse-tracing is a skill published in the GitHub repository Ampli-Group/agentic-mobile-blueprint (4 stars, last pushed 1mo ago), licensed MIT. It adds 41 tokens to every session and 868 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.