← ClaudeAtlas

langfuselisted

Interact with Langfuse and access its documentation. Use when needing to (1) query or modify Langfuse data programmatically via the CLI — traces, prompts, datasets, scores, sessions, and any other API resource, (2) look up Langfuse documentation, concepts, integration guides, or SDK usage, or (3) understand how any Langfuse feature works. This skill covers CLI-based API access (via bunx) and multiple documentation retrieval methods.
KonghaYao/peri · ★ 43 · Data & Documents · score 86
Install: claude install-skill KonghaYao/peri
# Langfuse ## 1. Langfuse API via CLI Use `langfuse-cli` to interact with the full Langfuse REST API. Run via bunx (auto-loads `.env`): ```bash bunx langfuse-cli api __schema # Discover all resources bunx langfuse-cli api <resource> --help # List actions for a resource bunx langfuse-cli api <resource> <action> --help # Show args for an action bunx langfuse-cli api <resource> <action> [options] # Execute ``` ### Credentials bunx automatically loads `.env`. Ensure it contains: ```bash LANGFUSE_PUBLIC_KEY=pk-lf-... LANGFUSE_SECRET_KEY=sk-lf-... LANGFUSE_HOST=https://cloud.langfuse.com # Required ``` If credentials are missing, ask the user to add them to `.env`. Do not ask to paste keys in chat. ### CLI Tips - Use `--json` for machine-readable output - Use `--curl` to preview HTTP request without executing - Prefer `observations-v2s` over `observations`, `score-v2s` over `scores` ## 2. Cost Analysis ### Analyze Script ```bash bun .claude/skills/langfuse/scripts/analyze.ts [N] # Overview + trace table + flags bun .claude/skills/langfuse/scripts/analyze.ts --tools [N] # Tool call analysis bun .claude/skills/langfuse/scripts/analyze.ts --growth [N] # Context growth trend bun .claude/skills/langfuse/scripts/analyze.ts --report [N] # Full report (all 7 sections) bun .claude/skills/langfuse/scripts/analyze.ts --trace-id <id> # Single trace detail ``` ### Report Sections | # |