Agent skill

Langfuse Multi Env Setup

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

Configure Langfuse across development, staging, and production environments.

MITAuto-check: notesAI & LLM Engineering

Install Langfuse Multi Env Setup

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill langfuse-multi-env-setup -a claude-code

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

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

At a glance

Configure Langfuse across development, staging, and production environments.

  • Works in 5 steps: Environment-Specific Configuration → Environment Variable Files → Secret Management → …
  • Setting up multi-environment deployments
  • SKILL.md covers Overview, Prerequisites, Environment Strategy and Instructions, plus 5 more sections
  • Calls aws and gcloud; reaches cloud.langfuse.com; needs LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY

What it does

Langfuse Multi Env Setup is an agent skill from jeremylongshore/tons-of-skills-marketplace. Configure Langfuse across development, staging, and production environments. Use when setting up multi-environment deployments, configuring per-environment keys, or implementing environment-specific Langfuse configurations. Trigger with phrases like "langfuse environments", "langfuse staging", "langfuse dev prod", "langfuse environment setup", "langfuse config by env".

Its SKILL.md is about 2k 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 Deployment. It works with Langfuse and Zod. 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

  • Setting up multi-environment deployments
  • Configuring per-environment keys
  • Implementing environment-specific Langfuse configurations
  • With phrases like langfuse environments

Example prompts

  • “langfuse environments”
  • “langfuse staging”
  • “langfuse dev prod”
  • “/langfuse-multi-env-setup”

Requirements

  • 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(aws:*), Bash(gcloud:*), Bash(vault:*)

Workflow steps

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

  1. Environment-Specific Configuration
  2. Environment Variable Files
  3. Secret Management
  4. CI/CD Integration
  5. Startup Validation with Zod

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(aws:*)
    • Bash(gcloud:*)
    • Bash(vault:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • aws
    • gcloud

    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:

    • 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 Multi Env Setup loads about 2k tokens when it runs. Until then it costs about 99 tokens; SKILL.md has 292 words of instructions outside code blocks.

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

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:40
    | Development | `.env.local` | Dev project | Debug on, flush immediately, 100% sampling |
  • NoteMentions a .env fileSKILL.md:124
    # .env.local (development -- git-ignored)
  • NoteMentions a .env fileSKILL.md:130
    # .env.staging (used by CI/CD)
  • NoteMentions a .env fileSKILL.md:135
    # .env.production (used by CI/CD)
  • NoteMentions a .env fileSKILL.md:143
    .env
  • NoteMentions a .env fileSKILL.md:144
    .env.local
  • NoteMentions a .env fileSKILL.md:145
    .env.*.local
  • NoteMentions a .env fileSKILL.md:231
    | Leaked keys in git | `.env` in `.gitignore`, secret scanning in CI |

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). 292 words, ~1,989 tokens.

Download SKILL.mdSave it as .claude/skills/langfuse-multi-env-setup/SKILL.md (or your agent's skills folder).
name
langfuse-multi-env-setup
description
Configure Langfuse across development, staging, and production environments. Use when setting up multi-environment deployments, configuring per-environment keys, or implementing environment-specific Langfuse configurations. Trigger with phrases like "langfuse environments", "langfuse staging", "langfuse dev prod", "langfuse environment setup", "langfuse config by env".
allowed-tools
Read, Write, Edit, Bash(aws:*), Bash(gcloud:*), Bash(vault:*)
compatibility
Designed for Claude Code
version
1.17.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, langfuse, deployment

Langfuse Multi-Environment Setup

Overview

Configure Langfuse across dev/staging/production with isolated API keys, environment-specific SDK settings, secret management, and CI/CD integration to prevent cross-environment data leakage.

Prerequisites

  • Separate Langfuse API key pairs per environment (or separate projects)
  • Secret management solution (env vars, Vault, AWS/GCP secrets)
  • CI/CD pipeline with environment-aware deployment

Environment Strategy

EnvironmentAPI Key SourceLangfuse ProjectSettings
Development.env.localDev projectDebug on, flush immediately, 100% sampling
StagingCI/CD secretsStaging projectProd-like settings, 50% sampling
ProductionSecret managerProd projectOptimized batching, 10% sampling

Instructions

Step 1: Environment-Specific Configuration
typescript
// src/config/langfuse.ts
import { LangfuseSpanProcessor } from "@langfuse/otel";
import { NodeSDK } from "@opentelemetry/sdk-node";
import { LangfuseClient } from "@langfuse/client";

type Env = "development" | "staging" | "production";

interface LangfuseEnvConfig {
  exportIntervalMillis: number;
  maxExportBatchSize: number;
  debug: boolean;
  sampleRate: number;
}

const ENV_CONFIGS: Record<Env, LangfuseEnvConfig> = {
  development: {
    exportIntervalMillis: 1000,
    maxExportBatchSize: 1,
    debug: true,
    sampleRate: 1.0,
  },
  staging: {
    exportIntervalMillis: 5000,
    maxExportBatchSize: 25,
    debug: false,
    sampleRate: 0.5,
  },
  production: {
    exportIntervalMillis: 10000,
    maxExportBatchSize: 50,
    debug: false,
    sampleRate: 0.1,
  },
};

function detectEnvironment(): Env {
  const env = process.env.NODE_ENV || "development";
  if (env === "production") return "production";
  if (env === "staging" || process.env.VERCEL_ENV === "preview") return "staging";
  return "development";
}

export function initLangfuse() {
  const env = detectEnvironment();
  const config = ENV_CONFIGS[env];

  // Validate credentials
  const required = ["LANGFUSE_PUBLIC_KEY", "LANGFUSE_SECRET_KEY"];
  for (const key of required) {
    if (!process.env[key]) {
      throw new Error(`${key} not set for environment: ${env}`);
    }
  }

  // Initialize OTel with env-specific settings
  const processor = new LangfuseSpanProcessor({
    exportIntervalMillis: config.exportIntervalMillis,
    maxExportBatchSize: config.maxExportBatchSize,
  });

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

  // Client for prompts, datasets, scores
  const client = new LangfuseClient();

  console.log(`Langfuse initialized [${env}] (sample: ${config.sampleRate * 100}%)`);

  return { sdk, client, env, config };
}
Step 2: Environment Variable Files
bash
# .env.local (development -- git-ignored)
LANGFUSE_PUBLIC_KEY=pk-lf-dev-...
LANGFUSE_SECRET_KEY=sk-lf-dev-...
LANGFUSE_BASE_URL=https://cloud.langfuse.com
NODE_ENV=development

# .env.staging (used by CI/CD)
LANGFUSE_BASE_URL=https://cloud.langfuse.com
NODE_ENV=staging
# Keys injected via CI secrets

# .env.production (used by CI/CD)
LANGFUSE_BASE_URL=https://cloud.langfuse.com
NODE_ENV=production
# Keys injected via secret manager
gitignore
# .gitignore
.env
.env.local
.env.*.local
Step 3: Secret Management
bash
set -euo pipefail
# GitHub Actions: Add per-environment secrets
# Settings > Environments > staging > Secrets
# Settings > Environments > production > Secrets

# AWS Secrets Manager
aws secretsmanager create-secret \
  --name "langfuse/production/public-key" \
  --secret-string "pk-lf-prod-..."

aws secretsmanager create-secret \
  --name "langfuse/production/secret-key" \
  --secret-string "sk-lf-prod-..."

# GCP Secret Manager
echo -n "pk-lf-prod-..." | gcloud secrets create langfuse-public-key-prod --data-file=-
echo -n "sk-lf-prod-..." | gcloud secrets create langfuse-secret-key-prod --data-file=-
Step 4: CI/CD Integration
yaml
# .github/workflows/deploy.yml
name: Deploy

on:
  push:
    branches: [main, staging]

jobs:
  deploy-staging:
    if: github.ref == 'refs/heads/staging'
    runs-on: ubuntu-latest
    environment: staging
    env:
      LANGFUSE_PUBLIC_KEY: ${{ secrets.LANGFUSE_PUBLIC_KEY }}
      LANGFUSE_SECRET_KEY: ${{ secrets.LANGFUSE_SECRET_KEY }}
      LANGFUSE_BASE_URL: https://cloud.langfuse.com
      NODE_ENV: staging
    steps:
      - uses: actions/checkout@v4
      - run: npm ci && npm run build && npm run deploy:staging

  deploy-production:
    if: github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest
    environment: production
    env:
      LANGFUSE_PUBLIC_KEY: ${{ secrets.LANGFUSE_PUBLIC_KEY }}
      LANGFUSE_SECRET_KEY: ${{ secrets.LANGFUSE_SECRET_KEY }}
      LANGFUSE_BASE_URL: https://cloud.langfuse.com
      NODE_ENV: production
    steps:
      - uses: actions/checkout@v4
      - run: npm ci && npm run build && npm run deploy:production
Step 5: Startup Validation with Zod
typescript
import { z } from "zod";

const langfuseConfigSchema = z.object({
  LANGFUSE_PUBLIC_KEY: z.string().startsWith("pk-lf-", "Must start with pk-lf-"),
  LANGFUSE_SECRET_KEY: z.string().startsWith("sk-lf-", "Must start with sk-lf-"),
  LANGFUSE_BASE_URL: z.string().url().optional(),
  NODE_ENV: z.enum(["development", "staging", "production"]).default("development"),
});

// Validate at startup -- fail fast on misconfiguration
const config = langfuseConfigSchema.parse(process.env);
console.log(`Langfuse config validated for ${config.NODE_ENV}`);

Cross-Environment Safety

RiskMitigation
Dev traces in prod projectSeparate API keys per environment
Prod keys in dev envValidate key prefix at startup
Leaked keys in git.env in .gitignore, secret scanning in CI
Wrong env detectedExplicit NODE_ENV in deployment config
Config driftZod schema validation at startup

Error Handling

IssueCauseSolution
Wrong environmentMissing NODE_ENVSet explicitly in deployment config
Secret not foundWrong secret pathVerify secret manager paths match
Cross-env data leakShared API keyUse separate keys per environment
Startup crashMissing configAdd Zod validation with clear error messages

Output

Produce an environment matrix showing each deployment's Langfuse project, secret reference names, host, and startup-validation status. Include a synthetic trace result for each environment, never the credentials themselves.

Examples

Deploy development and staging with separate secret-manager entries, then verify each synthetic trace appears only in its designated project. Before production promotion, intentionally test a missing configuration value in staging and confirm startup fails with the safe validation message rather than sending traffic to another environment.

Resources

© 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-multi-env-setup of jeremylongshore/tons-of-skills-marketplace.

Open the folder on GitHubat commit 80f86df

Compare with similar skills

Langfuse Multi Env Setup 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 Multi Env Setup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Langfuse Multi Env Setup this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2kAutomated safety check: NotesMIT
Langfuse Previewslangfuse/langfuse36k—~2.8kAutomated safety check: NotesCustom licence
Backend Dev Guidelineslangfuse/langfuse36k—~1.9kAutomated safety check: PassCustom licence
Langfuselangfuse/skills300—~2.1kAutomated safety check: NotesMIT
Agentsop Observability Setupagentsope/SkillAlchemy466—~4.4kAutomated safety check: PassMIT
Agent Setup Maintenancelangfuse/langfuse36k—~799Automated safety check: PassCustom licence

Similar skills

  • Langfuse Previews

    langfuse/langfuse

    Use Langfuse's disposable per-PR previews at pr-N.preview.langfuse.com (synthetic data only).

    36k GitHub stars~2.8k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes
  • 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
  • Langfuse

    langfuse/skills

    Interact with Langfuse and access its documentation: tracing, monitoring, creating datasets, running experiments, and evaluating AI applications.

    300 GitHub stars~2.1k tokensUpdated 8 days ago
    AI & LLM EngineeringAuto-check: notes
  • 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.

    466 GitHub stars~4.4k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Agent Setup Maintenance

    langfuse/langfuse

    Shared workflow for editing Langfuse's repo-owned agent setup under .agents/.

    36k GitHub stars~799 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Langsmith Deployment

    soba-labs/langchain-agent-skills

    Deploy and operate production agent servers with LangSmith Deployment.

    107 GitHub stars~1.7k tokensUpdated 1 mo ago
    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 Multi Env Setup

What does Langfuse Multi Env Setup do?

Configure Langfuse across development, staging, and production environments. Langfuse Multi Env Setup is an agent skill from jeremylongshore/tons-of-skills-marketplace. Configure Langfuse across development, staging, and production environments.

When should I use Langfuse Multi Env Setup?

Langfuse Multi Env Setup fits situations like: setting up multi-environment deployments; configuring per-environment keys; implementing environment-specific Langfuse configurations; with phrases like langfuse environments.

How do I install Langfuse Multi Env Setup in Claude Code?

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

How do I install Langfuse Multi Env Setup in Codex?

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

Can I use Langfuse Multi Env Setup 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-multi-env-setup -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-multi-env-setup, .gemini/skills/langfuse-multi-env-setup, .github/skills/langfuse-multi-env-setup and .opencode/skills/langfuse-multi-env-setup in your project.

What does Langfuse Multi Env Setup need to run?

Going by SKILL.md and its folder, Langfuse Multi Env Setup needs the command-line tools its instructions call (aws and gcloud) and credentials named LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY. Our summary lists: A credential in LANGFUSE_PUBLIC_KEY; A credential in LANGFUSE_SECRET_KEY. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(aws:*), Bash(gcloud:*), Bash(vault:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Langfuse Multi Env Setup 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 Multi Env Setup 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 Multi Env Setup use?

Langfuse Multi Env Setup 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 Multi Env Setup use?

About 2k tokens (SKILL.md is roughly 8k 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 Multi Env Setup?

Skills that share tags, products or a category with Langfuse Multi Env Setup: Langfuse Previews (langfuse/langfuse, 36k stars), Backend Dev Guidelines (langfuse/langfuse, 36k stars), Langfuse (langfuse/skills, 300 stars) and Agentsop Observability Setup (agentsope/SkillAlchemy, 466 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Langfuse Multi Env Setup?

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.