跳到正文
Skillpedia
通用编程23k · #10133

opik-external-integrations

它能做什么

这项技能指导 AI 智能体构建位于 Opik 仓库之外的 Opik 集成,可以是独立的软件包,也可以是为另一个项目添加的支持。适合希望把 Opik 连接到自有工具的开发者。

适用场景

  • ✓当你想构建一个单独的 opik-* 软件包或插件,并使用已发布的 Opik SDK 时。
  • ✓当你想为已有自身日志或插件系统的第三方项目添加 Opik 支持时。
  • ✓当你的集成应放在外部仓库,而不是 Opik 本身中时。

技能链接

https://github.com/comet-ml/opik/blob/main/.agents/skills/opik-external-integrations/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/comet-ml/opik/blob/main/.agents/skills/opik-external-integrations/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请为我们内部的编码智能体构建一个 Opik 插件,放在它自己的仓库中。”

每周 5 个新技能,1 分钟读完。

工作原理

技能会遵循宿主项目自身的约定,并且只使用已发布的 Opik SDK 的公开接口,而不使用 Opik 仓库的内部代码。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Opik External Integrations

This skill builds Opik integrations whose code does not live in this repository. Two shapes:

  • Standalone opik-* package / plugin — its own repo or package that depends on the published Opik SDK. Examples: opik-openclaw, opik-claude-code-plugin.
  • Upstream contribution — Opik support added into a third-party project that already has its own logging/callback/plugin system. Examples: an Opik callback in LiteLLM, an Opik integration in Dify.

Activation gate — read this first. Use this skill only when the target lives in an external repo or external package. If the user wants an integration that ships inside sdks/python/src/opik/integrations/ or sdks/typescript/src/opik/integrations/, this is the wrong skill — use opik-integrations. When in doubt, ask the "where does it live" question (below) and route accordingly.

Two principles that make external work different

  1. Follow the HOST repo's conventions, not this repo's. Structure, dependency management, lint/format, test framework, docs, and the contribution guide are dictated by the target project. Do not impose sdks/ layout, fake_backend, or Fern docs on an external repo. Read its CONTRIBUTING/AGENTS.md and mirror its closest existing integration/plugin.
  2. Consume Opik through its PUBLISHED public API. Use the released opik (Python) / opik (TypeScript) SDK or the REST API — the same surface end users get. Never import this repo's internal modules (opik.decorator.*, rest_api, message-processing internals); they are not available outside this repo and are not a stable contract.

Start with the questionnaire

Collect everything up front, free-form — do not propose a target. See workflow.md Phase 0 for the full list. The essentials: which external repo/package (URL + links), integration shape (standalone package vs. upstream contribution vs. plugin), host language/stack, where the Opik code goes, how the host tests and documents, and how to run it to verify.

Once you know the target, check references.md — a curated list of known external integrations (standalone opik-* plugins incl. the cookiecutter template, and third-party host repos like LiteLLM / Dify / n8n) with their repo and Opik-docs URLs. If the target is listed or resembles one, start from its links and clone the closest sibling instead of researching blind.

The workflow

Multi-step and autonomous by default (front-load preparation, run through, self-verify, end with a report); ask for the interactive variant to approve the design first. Full playbook in workflow.md. At a glance:

  1. Questionnaire + acquire the external repo (clone/checkout into the scratchpad).
  2. Investigate the host — its integration/plugin conventions, dep management, test framework, docs, contribution guide. Find the closest existing integration to clone.
  3. Investigate the Opik surface — pick the public API to use: @opik.track / track_* wrappers, the low-level client, or REST. Lean on the opik and instrument skills for the public API.
  4. Design how Opik plugs into the host's extension point (callback hook, plugin entrypoint, middleware). Map host data → Opik trace/span fields.
  5. Implement in the host checkout, mirroring its closest sibling and its style.
  6. Verify via the Opik MCP — run the host with the integration active, log to the workspace the MCP reads, and read the trace/spans back. Loop until correct.
  7. Test using the host's test framework and conventions.
  8. Document following the host's docs conventions; optionally add/point an Opik docs page (write-docs).
  9. Report — what was done, verification evidence, a per-flow supported/tested table, limitations, and how to open the upstream PR.

How this maps to the internal skill

The mechanism knowledge is shared — how a provider/framework exposes hooks, streaming, and usage is the same problem as in opik-integrations. Read that skill's python.md / typescript.md for the patterns (method patching, callback handler, OTel), but apply them against the published SDK surface and inside the host repo's structure.

Skills this one builds on (do not duplicate them)

  • opik / instrument — the user-facing public API surface (the right way to consume Opik from outside
常见问题

这适用于 Opik 仓库内部的集成吗?

不适用。对于 SDK 文件夹下的集成,技能建议改用独立的 opik-integrations 技能。

它举了哪些项目作为示例?

它列举了 opik-openclaw、opik-claude-code-plugin、LiteLLM 回调和 Dify 集成等示例。

它需要已发布的 SDK 吗?

需要。它说明,外部集成应只通过已发布的公开 API 使用 Opik。

详情

作者的原始描述

Build or update an Opik integration that lives OUTSIDE this repo — a standalone opik-* package (e.g. opik-openclaw, opik-claude-code-plugin) or Opik support contributed into a third-party project (e.g. LiteLLM, Dify). Use ONLY when the user names an external repository or external package as the target; for integrations under sdks/ use the opik-integrations skill instead.

repo: comet-ml/opik

热度

GitHub 星标
23k
排名
#10133
许可证
Apache-2.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

相似技能