Help us improve
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
npx claudepluginhub langfuse/claude-observability-plugin --plugin langfuse-observabilityThis plugin requires configuration values that are prompted when the plugin is enabled. Sensitive values are stored in your system keychain.
LANGFUSE_USER_IDOptional user identifier attached to every trace (shown as the user in Langfuse). Leave empty to omit.
${user_config.LANGFUSE_USER_ID}CC_LANGFUSE_DEBUGWrite verbose logs to ~/.claude/state/langfuse_hook.log
${user_config.CC_LANGFUSE_DEBUG}LANGFUSE_BASE_URLLangfuse host. Use https://us.cloud.langfuse.com for US, https://cloud.langfuse.com for EU, or your self-hosted URL.
${user_config.LANGFUSE_BASE_URL}Share bugs, ideas, or general feedback.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
LANGFUSE_PUBLIC_KEYYour Langfuse project public key (pk-lf-...)
${user_config.LANGFUSE_PUBLIC_KEY}LANGFUSE_SECRET_KEYYour Langfuse project secret key (sk-lf-...)
${user_config.LANGFUSE_SECRET_KEY}CC_LANGFUSE_MAX_CHARSTruncate captured inputs/outputs to this many characters
${user_config.CC_LANGFUSE_MAX_CHARS}CC_LANGFUSE_SKILL_TAGSAdd a skill:<name> tag to traces for every skill invoked in the turn
${user_config.CC_LANGFUSE_SKILL_TAGS}CC_LANGFUSE_CAPTURE_SKILL_CONTENTInclude the injected skill instruction text in the Skill tool span output
${user_config.CC_LANGFUSE_CAPTURE_SKILL_CONTENT}Ultra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Memory compression system for Claude Code - persist context across sessions
Multi-model consensus engine integrating OpenAI Codex CLI, Gemini CLI, and Claude CLI for collaborative code review and problem-solving.
Curate auto-memory, promote learnings to CLAUDE.md and rules, extract proven patterns into reusable skills.
Skills for working with Langfuse, the open-source LLM engineering platform for tracing, prompt management, and evaluation.
Trace every Claude Code session to Langfuse — turns, generations, tool calls, and token usage — with zero code changes.
claude plugin marketplace add langfuse/Claude-Observability-Plugin
claude plugin install langfuse-observability@langfuse-observability
Restart Claude Code after install.
On enable, you'll be prompted for:
| Field | Description |
|---|---|
LANGFUSE_SECRET_KEY | Your Langfuse secret key (sk-lf-...). Stored in your OS keychain. |
LANGFUSE_PUBLIC_KEY | Your Langfuse public key (pk-lf-...). |
LANGFUSE_BASE_URL | https://us.cloud.langfuse.com (default), https://cloud.langfuse.com for EU, or your self-hosted URL. |
LANGFUSE_USER_ID | Optional. User identifier attached to every trace (shown as the user in Langfuse). |
CC_LANGFUSE_DEBUG | Verbose logging to ~/.claude/state/langfuse_hook.log. |
CC_LANGFUSE_MAX_CHARS | Truncate captured inputs/outputs to this many characters (default 20000). |
CC_LANGFUSE_SKILL_TAGS | Tag traces with skill:<name> for every skill invoked in the turn (default true). |
CC_LANGFUSE_CAPTURE_SKILL_CONTENT | Include injected skill instruction text in the Skill tool span output (default false). |
Get keys from your Langfuse project settings → API Keys.
One of:
python3 with pip install "langfuse>=4.0,<5" (fallback when uv is not on PATH).If neither is set up, the hook exits silently — no impact on Claude Code.
A hook reads the session transcript incrementally on every turn (Stop) and at session end (SessionEnd), and emits a Langfuse trace with one span per turn, nested generations per assistant message, and child tool spans for every tool call. Token usage is captured when present.
State is kept in ~/.claude/state/langfuse_state.json so re-runs only emit new turns.
This plugin transmits your Claude Code session data — conversation turns, assistant
generations, tool calls, and token-usage statistics — to the Langfuse endpoint you
configure (LANGFUSE_BASE_URL, default https://us.cloud.langfuse.com; EU and
self-hosted endpoints are supported). Data is sent at the end of each turn (the
Stop hook) and at session end (SessionEnd) using the Langfuse API keys you
provide, which are stored in your OS keychain. No data is sent anywhere other than
the endpoint you configure.
For how Langfuse Cloud handles data it receives, see the Langfuse privacy policy: https://langfuse.com/privacy . When using a self-hosted Langfuse instance, your data stays within your own infrastructure.
claude plugin disable langfuse-observability
claude plugin enable langfuse-observability
claude plugin uninstall langfuse-observability
~/.claude/state/langfuse_hook.log (enable CC_LANGFUSE_DEBUG).claude plugin list that langfuse-observability is enabled; restart Claude Code.python3 on your PATH has the SDK installed, or install uv.MIT