跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
效率与协作

langfuse-integration-page

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 link to a partner's docs, or rough notes and wants them turned into the standard Langfuse integration notebook. The skill produces a correctly formatted Jupyter notebook, updates `cookbook/_routes.json`, and tries to fetch the partner logo into `public/images/integrations/`.

langfuse · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add langfuse/langfuse-docs --skill langfuse-integration-page

技能说明


name: langfuse-integration-page description: 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 ", "cookbook for ", "add to langfuse docs", or any request that results in a new cookbook/integration_*.ipynb. Also use when the user pastes working integration code, a link to a partner's docs, or rough notes and wants them turned into the standard Langfuse integration notebook. The skill produces a correctly formatted Jupyter notebook, updates cookbook/_routes.json, and tries to fetch the partner logo into public/images/integrations/.

Langfuse integration page creator

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.

What to produce

Three things, always, in the user's langfuse-docs checkout:

  1. A new notebook at cookbook/integration_<slug>.ipynb that matches the house template (see "Notebook structure" below).
  2. A new entry appended to cookbook/_routes.json pointing at the notebook and the target docsPath.
  3. A best-effort logo download into 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.

Step 1 — Gather what you need, up front

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):

  • Integration name — the human-readable name (e.g., "Pydantic AI", "Fireworks AI", "Temporal"). Used in the title and intro.
  • Slug — kebab-case, used in the filename, logo path, and docsPath. Default to the name lowercased with spaces → hyphens, but confirm. Example: "Pydantic AI" → pydantic-ai; "Fireworks AI" → fireworks-ai.
  • Category — one of: 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.
  • Language — 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).
  • Instrumentation pattern — pick one (this determines the template body). See 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:

  • Intro blurb about the partner — one sentence ("What is X?"). If the user didn't give one and there's a URL, you can draft it and confirm.
  • Logo source — if the user provided a URL, great; if not, see Step 4 for the fetch heuristic.
  • Install command, env vars beyond the Langfuse ones, and a minimal runnable example — needed for the code cells. If missing, draft from docs and mark as TODO: confirm.

How to ask

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.

Step 2 — Generate the notebook

You have two ways to create the .ipynb:

  1. Preferred: use the bundled builder script 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.

    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.

  2. Fallback: write the .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

阅读完整来源 ↗