Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Create a new Langfuse integration page in the langfuse-docs repo. Use this skill whenever the user wants to add, create, draft, or scaffold an integration page, cookbook, or docs page for a new tool/framework/model-provider/gateway in Langfuse — triggers include "new integration", "integration page", "docs page for <X>", "cookbook for <X>", "add <X> to langfuse docs", or any request that results in a new `cookbook/integration_*.ipynb`. Also use when the user pastes working integration code, a li
.claude/skills/langfuse-langfuse-integration-page/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 167% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 392% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 90% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 29% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 327% | 0% |
This skill scaffolds a new integration page for the langfuse-docs site. Integration pages live as Jupyter notebooks in cookbook/integration_<slug>.ipynb and are converted to MDX by scripts/update_cookbook_docs.sh using the mapping in cookbook/_routes.json. Getting the notebook metadata block, the STEPS_START/STEPS_END wrapper, and the routes entry right is the whole job — once those are correct, the build does the rest.
Three things, always, in the user's langfuse-docs checkout:
cookbook/integration_<slug>.ipynb that matches the house template (see "Notebook structure" below).cookbook/_routes.json pointing at the notebook and the target docsPath.public/images/integrations/<slug>_icon.<ext>. If fetching fails, leave a TODO for the user.Do not run scripts/update_cookbook_docs.sh yourself — that regenerates many files and is slow (~10 min build). The user runs it when they're ready.
Before writing anything, collect the following. Ask the user for what's missing using a single AskUserQuestion batch where possible. Some answers are mutually exclusive (pick-one); some can be inferred from context.
Always ask (these determine the template and the routes entry):
docsPath. Default to the name lowercased with spaces → hyphens, but confirm. Example: "Pydantic AI" → pydantic-ai; "Fireworks AI" → fireworks-ai.model-providers, frameworks, gateways, other. This is the <category> segment in docsPath: "integrations/<category>/<slug>". Guidance:model-providers: inference APIs (OpenAI-compatible or otherwise) — Anthropic, Cohere, Fireworks, Groq, Bedrock, Vertex, Gemini, etc.frameworks: agent/app frameworks — LangChain, CrewAI, Pydantic AI, Google ADK, Temporal, Semantic Kernel, etc.gateways: LLM proxies/routers — Portkey, LiteLLM proxy, TrueFoundry, OpenRouter, Kong AI, etc.other: anything else — scraping (Firecrawl, Exa), UIs (Gradio, LibreChat), dev tools, etc.python (default) or js. JS integrations use the filename prefix js_integration_<slug>.ipynb and commonly get a -js suffix in the slug when both exist (e.g., anthropic-js, claude-agent-sdk-js).references/patterns.md for full details and match it to the integration:openinference — OpenInference instrumentor library (e.g., openinference-instrumentation-google-adk). Most common for agent frameworks.openai-drop-in — The partner is OpenAI-compatible; use from langfuse.openai import openai. Common for inference providers (Fireworks, Groq, DeepSeek, etc.).framework-native — Framework has built-in instrumentation hook (e.g., Agent.instrument_all() for Pydantic AI).otel-direct — Partner emits OTel natively; configure an OTLP exporter pointing at Langfuse. Less common; used for things like Temporal, some MLflow setups.Ask if not obvious:
TODO: confirm.Use AskUserQuestion with options formatted as the four categories and four patterns. Keep the number of questions ≤ 4. If the user gave full context (e.g., they pasted a complete code example and mentioned the framework), skip questions you can answer confidently from context and just confirm in your response.
You have two ways to create the .ipynb:
scripts/build_notebook.py. It takes a structured JSON/YAML description of the cells and writes a properly formatted notebook. Using the script avoids subtle JSON errors (trailing commas, missing "source" arrays, line-split source strings) that break nbconvert.bash python3 <skill-dir>/scripts/build_notebook.py \ --out cookbook/integration_<slug>.ipynb \ --spec /tmp/<slug>_spec.json
See the script's --help for the spec schema. There are examples at the bottom of references/patterns.md.
.ipynb file directly. If you do this, open an existing notebook (e.g., cookbook/integration_pydantic_ai.ipynb) first and mirror its JSON shape exactly. Be careful: every source field is a list of strings, each ending in \n except the last; markdown cells carry "metadata": {"vscode": {"languageId": "raw"}}; code cells carry "execution_count": null, "outputs": [].Whichever route you pick, the cell structure must match the house template.
Every integration page has the same skeleton. Section order matters because the MDX converter in scripts/move_docs.py reads the NOTEBOOK_METADATA comment from the top of the first cell and wraps everything between STEPS_START and STEPS_END in a <Steps> component.
Cell 1 — markdown. Metadata + intro.
The first line is a single-line HTML comment with all the page metadata. Attribute format is key: "value" (double-quoted), space-separated, on one line. Required keys:
<!-- NOTEBOOK_METADATA source: "⚠️ Jupyter Notebook" title: "<Page title>" sidebarTitle: "<Short nav label>" logo: "/images/integrations/<slug>_icon.<ext>" description: "<1-sentence SEO description>" category: "Integrations" -->Then the page H1, a 1-sentence intro, and two blockquote callouts:
markdown# Integrate Langfuse with <Partner Name> This notebook shows how to integrate **Langfuse** with **<Partner>** to [monitor / debug / trace / evaluate] your LLM application. > **What is <Partner>?** [<Partner>](<partner url>) is <one sentence about the partner>. > **What is Langfuse?** [Langfuse](https://langfuse.com) is an open-source LLM engineering platform that helps teams trace, debug, and evaluate their LLM applications.
Title-writing notes: prefer "Observability for <Partner> with Langfuse" for model providers and inference APIs, "Integrate Langfuse with <Partner>" for frameworks, and "Trace <Partner> Workflows with Langfuse" for orchestration tools. Sidebar title is the short name (e.g., "Pydantic AI", "Fireworks AI", "Temporal").
Cell 2 — markdown. Start of steps.
markdown<!-- STEPS_START --> ## Step 1: Install Dependencies
Cell 3 — code. Install.
python%pip install langfuse <partner-package> -U
Use -U to upgrade. For JS notebooks, use npm install in a shell cell (see the JS examples in cookbook/js_integration_*.ipynb).
Cell 4 — markdown. Env var setup prose.
One short paragraph mentioning that keys come from Langfuse project settings, linking to Langfuse Cloud and https://langfuse.com/self-hosting.
Cell 5 — code. Env vars.
Always include the three Langfuse vars in this exact shape (EU active by default, other regions noted in a comment) plus whatever the partner needs. Every os.environ.setdefault line must end with ; — setdefault returns the live env value (a real key, if one is already set), and the semicolon keeps Jupyter from echoing it into the saved cell output:
pythonimport os # Get keys for your project from the project settings page: https://langfuse.com/cloud os.environ.setdefault("LANGFUSE_PUBLIC_KEY", "pk-lf-..."); os.environ.setdefault("LANGFUSE_SECRET_KEY", "sk-lf-..."); os.environ.setdefault("LANGFUSE_BASE_URL", "https://cloud.langfuse.com"); # 🇪🇺 EU region (API host) # Other Langfuse data regions include 🇺🇸 US: https://us.cloud.langfuse.com, 🇯🇵 Japan: https://jp.cloud.langfuse.com and ⚕️ HIPAA: https://hipaa.cloud.langfuse.com # <Partner> API key os.environ.setdefault("<PARTNER>_API_KEY", "...");
Cell 6 — markdown + cell 7 — code. Initialize Langfuse client with auth check. (Skip this pair for the openai-drop-in pattern, which relies on the langfuse OpenAI wrapper instead.)
pythonfrom langfuse import get_client langfuse = get_client() # Verify connection if langfuse.auth_check(): print("Langfuse client is authenticated and ready!") else: print("Authentication failed. Please check your credentials and host.")
Cells 8+ — Instrumentation + runnable example. These are pattern-specific. See references/patterns.md for the exact cell bodies for each of the four patterns.
Final steps cell — markdown. View traces.
markdown## Step N: View Traces in Langfuse After running the example, open [Langfuse Cloud](https://langfuse.com/cloud) to see the trace, including prompts, completions, tool calls, token usage, and latency.  <!-- TODO: replace with your actual trace screenshot (upload to langfuse.com images) and example trace link --> [Example trace in Langfuse](<example trace URL or placeholder>) <!-- STEPS_END -->
Last cell — markdown. LearnMore.
markdown<!-- MARKDOWN_COMPONENT name: "LearnMore" path: "@/components-mdx/integration-learn-more.mdx" -->
For JS integrations use @/components-mdx/integration-learn-more-js.mdx instead.
move_docs.py does five specific transforms on the raw markdown that nbconvert produces:
NOTEBOOK_METADATA HTML comment into YAML frontmatter.STEPS_START/STEPS_END into a <Steps> MDX component.TABS_START/TABS_END (if present) into <Tabs>.CALLOUT_START/CALLOUT_END (if present) into <Callout>.MARKDOWN_COMPONENT/COMPONENT comments into JSX imports + usages.Anything you write outside these transforms flows through unchanged, so standard markdown works. The three most common mistakes are: metadata not on the very first line of the first cell, STEPS_START or STEPS_END missing, and single quotes instead of double quotes in the metadata attributes.
cookbook/_routes.jsonRead cookbook/_routes.json, append a new object to the JSON array, and write it back. Use this shape for integration pages:
json{ "notebook": "integration_<slug>.ipynb", "docsPath": "integrations/<category>/<slug>", "isGuide": false }
Notes:
<slug> in notebook and in docsPath must match exactly."notebook": "js_integration_<slug>.ipynb"; the slug in docsPath typically has a -js suffix if a Python version also exists (e.g., anthropic + anthropic-js, claude-agent-sdk + claude-agent-sdk-js).isGuide: false for dedicated integration pages. Set isGuide: true only if the user explicitly wants the notebook to also appear under content/guides/cookbook/. Most integration pages are false; a handful of integration-adjacent notebooks (integration_anthropic.ipynb, integration_llama_index.ipynb) are true because they double as general guides.docsPath is omitted or null, the notebook is only published as a guide — not what you want for an integration page.If you can edit JSON by hand, do that. If you'd rather not eyeball it, there's scripts/add_route.py in this skill that does a safe append.
Heuristic, in order. Stop at the first one that succeeds:
https://<partner-domain>/favicon.svg, then favicon.png, then /apple-touch-icon.png.https://logo.clearbit.com/<partner-domain> (returns a PNG).Save to public/images/integrations/<slug>_icon.<ext> preserving the extension. SVG is preferred; PNG is fine. The logo: field in the notebook metadata needs to point at this path.
Use curl -sSfL -o <dest> <url> in bash. Check the result is non-empty and looks like a valid image before using it — if curl returns an HTML error page saved as .svg, that's worse than a missing file.
If the fetch fails, leave the notebook's logo: field pointing at the expected path anyway and tell the user they need to upload the logo manually.
End your turn with a short summary listing:
TODO: confirm)bash scripts/update_cookbook_docs.sh (run from the repo root)-U install line makes sense and to run the notebook end-to-end once before publishingreferences/patterns.md — exact cell bodies for each of the four instrumentation patterns, with real examples from the existing notebooks.references/routes-json-schema.md — fields in cookbook/_routes.json and when to use isGuide: true.references/notebook-template.md — a fill-in-the-blanks version of the full notebook.scripts/build_notebook.py — takes a spec JSON and produces a properly formatted .ipynb. Safer than hand-writing JSON.scripts/add_route.py — appends an entry to cookbook/_routes.json without breaking the existing formatting.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→fail | 9,328 | 31,194 | +234% | 1 | 1 | 0% | 1,909 | 4,996 | +162% | 0 | 0 | — |
case-02 | fail→fail | 4,131 | 4,831 | +17% | 1 | 1 | 0% | 210 | 4,015 | +1812% | 0 | 0 | — |
case-03 | fail→fail | 13,527 | 4,755 | -65% | 1 | 1 | 0% | 2,773 | 3,954 | +43% | 0 | 0 | — |
case-04 | pass→pass | 3,142 | 5,215 | +66% | 1 | 1 | 0% | 497 | 4,731 | +852% | 0 | 0 | — |
case-05 | fail→fail | 26,166 | 23,814 | -9% | 1 | 1 | 0% | 5,991 | 9,484 | +58% | 0 | 0 | — |
case-06 | fail→fail | 25,981 | 25,073 | -3% | 1 | 1 | 0% | 4,533 | 7,543 | +66% | 0 | 0 | — |
case-07 | fail→pass | 9,010 | 2,402 | -73% | 1 | 1 | 0% | 1,577 | 4,218 | +167% | 0 | 0 | — |
case-08 | pass→pass | 5,447 | 2,579 | -53% | 1 | 1 | 0% | 886 | 4,176 | +371% | 0 | 0 | — |
case-09 | fail→pass | 5,127 | 3,510 | -32% | 1 | 1 | 0% | 903 | 4,443 | +392% | 0 | 0 | — |
case-10 | pass→pass | 9,307 | 2,848 | -69% | 1 | 1 | 0% | 1,757 | 4,140 | +136% | 0 | 0 | — |
case-11 | fail→pass | 12,157 | 1,823 | -85% | 1 | 1 | 0% | 2,111 | 4,021 | +90% | 0 | 0 | — |
case-12 | pass→pass | 5,198 | 3,512 | -32% | 1 | 1 | 0% | 924 | 4,381 | +374% | 0 | 0 | — |
case-13 | pass→pass | 3,760 | 2,208 | -41% | 1 | 1 | 0% | 621 | 4,082 | +557% | 0 | 0 | — |
case-14 | fail→fail | 3,519 | 3,943 | +12% | 1 | 1 | 0% | 720 | 4,478 | +522% | 0 | 0 | — |
case-15 | fail→pass | 19,106 | 3,140 | -84% | 1 | 1 | 0% | 3,301 | 4,265 | +29% | 0 | 0 | — |
case-16 | fail→pass | 5,776 | 2,598 | -55% | 1 | 1 | 0% | 986 | 4,207 | +327% | 0 | 0 | — |
case-17 | fail→pass | 8,444 | 3,253 | -61% | 1 | 1 | 0% | 1,502 | 4,340 | +189% | 0 | 0 | — |
case-18 | fail→pass | 6,529 | 2,402 | -63% | 1 | 1 | 0% | 1,151 | 4,059 | +253% | 0 | 0 | — |
case-19 | fail→pass | 10,067 | 3,183 | -68% | 1 | 1 | 0% | 1,764 | 4,280 | +143% | 0 | 0 | — |
case-20 | pass→pass | 3,453 | 2,116 | -39% | 1 | 1 | 0% | 616 | 4,147 | +573% | 0 | 0 | — |
case-21 | fail→pass | 5,876 | 3,115 | -47% | 1 | 1 | 0% | 1,017 | 4,303 | +323% | 0 | 0 | — |
case-22 | fail→pass | 5,431 | 3,131 | -42% | 1 | 1 | 0% | 1,011 | 4,324 | +328% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +41 percentage points is the difference between those two pass rates over the 20 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.