langfuse-integration
Replaces Phoenix observability with Langfuse Cloud (EU) traceability for pharmaceutical test generation. Adds @observe decorators to existing code, configures LlamaIndex callbacks, propagates GAMP-5 compliance attributes, and removes Phoenix dependencies. Use PROACTIVELY when implementing Task 2.3 (LangFuse setup), migrating observability systems, or ensuring ALCOA+ trace attribution. MUST BE USED for pharmaceutical compliance monitoring requiring persistent cloud storage.
npx skills add majiayu000/claude-skill-registry --skill langfuse-integration --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Replaces Phoenix observability with Langfuse Cloud EU for pharmaceutical-grade traceability and monitoring.
How it works
- Migrates from Phoenix to Langfuse Cloud EU, enabling persistent traces and analytics.
- Adds @observe decorators to workflow entry points and instrumented agent methods to create spans with compliance metadata.
- Replaces LlamaIndex callback handling to use LangfuseCallbackHandler for trace propagation.
- Configures a Langfuse configuration module with functions like setup_langfuse(), get_langfuse_client(), get_langfuse_callback_handler(), and add_compliance_attributes().
- Propagates user/session attributes (user_id, session_id) and attaches GAMP-5/ALCOA+ metadata to traces.
- Removes Phoenix dependencies, imports, and server commands, updating monitoring initialization to Langfuse.
When to use it
- When implementing Task 2.3 (LangFuse Integration and Dashboard)
- When migrating from Phoenix to production observability
- When adding traceability to pharmaceutical workflows
- When ensuring ALCOA+ attributable traces for regulatory compliance
- When preparing for AWS production deployment
What it can touch
- Uses Langfuse SDK and LlamaIndex integration components.
- Interacts with files under main/src/, including monitoring, core workflow, and agents.
- Expects environment variables LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, and LANGFUSE_HOST to be set.
Caveats
- Requires Langfuse Cloud (EU) account and valid API keys.
- Phase-driven migration; ensure no dual observability remains.
- Baseline span counts should be within ±10% of Phoenix baseline; exact numbers depend on implementation.
# Langfuse Integration Skill **Purpose**: Replace Phoenix observability with Langfuse Cloud (EU) for pharmaceutical-grade traceability and monitoring. **Target Architecture**: - **From**: Phoenix (local-only, ephemeral traces) - **To**: Langfuse Cloud EU (persistent storage, analytics, GAMP-5 compliant) - **Strategy**: Complete replacement (no dual observability) --- ## When to Use This Skill ✅ **Use when**: - Implementing PRP Task 2.3 (LangFuse Integration and Dashboard) - Migrating from Phoenix to production observability - Adding traceability to new pharmaceutical workflows - Ensuring ALCOA+ attributable traces for regulatory compliance - Preparing for AWS production deployment ❌ **Do NOT use when**: - Extracting existing traces from Langfuse (use `langfuse-extraction` skill) - Automating dashboard interactions (use `langfuse-dashboard` skill) - Phoenix is required for local development (conflicts with replacement strategy) --- ## Prerequisites Before invoking this skill, verify: 1. **Langfuse Cloud (EU) Account**: - Project URL: `https://cloud.langfuse.com/project/cmhuwhcfe006yad06cqfub107` - API keys available (public + secret) - EU data residency confirmed 2. **Environment Va
- When to Use This Skill
- Prerequisites
- Workflow Phases
- Phase 1: Assessment and Analysis (5-10 minutes)
- Phase 2: Langfuse Configuration Setup (10-15 minutes)
- Phase 3: Code Instrumentation (20-30 minutes)
- Phase 4: Phoenix Removal (10-15 minutes)
- Phase 5: Validation and Testing (15-20 minutes)
- Phase 6: Documentation and Finalization (5-10 minutes)
- Success Criteria
- Functional Requirements
- Observability Requirements
- Compliance Requirements
- Quality Requirements
export LANGFUSE_PUBLIC_KEY="pk-lf-..." export LANGFUSE_SECRET_KEY="sk-lf-..." export LANGFUSE_HOST="https://cloud.langfuse.com" grep -r "phoenix" main/src/monitoring/ --include="*.py" grep -r "from phoenix" main/src/ --include="*.py" grep -r "import phoenix" main/src/ --include="*.py" uv add langfuse uv add llama-index-instrumentation-langfuse python .claude/skills/langfuse-integration/scripts/add_instrumentation.py \ grep -r "@observe" main/src/ --include="*.py" | wc -l
What does the langfuse-integration skill do?
Replaces Phoenix observability with Langfuse Cloud (EU) traceability for pharmaceutical test generation. Adds @observe decorators to existing code, configures LlamaIndex callbacks, propagates GAMP-5 compliance attributes, and removes Phoenix dependencies. Use PROACTIVELY when implementing Task 2.3 (LangFuse setup), migrating observability systems, or ensuring ALCOA+ trace attribution. MUST BE USED for pharmaceutical compliance monitoring requiring persistent cloud storage.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill langfuse-integration --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
