Token导航 LogoToken导航

Agent Skill · 研究检索

instrument(instrument 搜索)

instrument 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

instrument 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 31,786。

总安装 2,642周安装 109GitHub Stars 2下载 863核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:instrument(instrument 搜索)
来源仓库:https://github.com/comet-ml/opik-skills
仓库路径:skills/instrument
安装命令:
npx skills add https://github.com/comet-ml/opik-skills --skill instrument
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/comet-ml/opik-skills --skill instrument

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

instrument 用于查找、检索和筛选相关信息,适合快速定位候选结果。适用于需要根据关键词或任务场景从来源线索中筛选信息的场景。通过关键词、任务场景或来源线索进行信息检索和筛选。安装前需确认权限范围、维护状态及是否触发联网或文件读写操作。

instrument 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/instrument

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/comet-ml/opik-skills --skill instrument;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

instrument 怎么安装?

在终端执行 npx skills add https://github.com/comet-ml/opik-skills --skill instrument。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

instrument 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

instrument 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

instrument 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

instrument 用的人多吗?

公开数据是累计安装 2,642 次,近一周安装 109 次,下载 863 次,GitHub 2 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

instrument 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
instrument

instrument 搜索 · 本页

2,6422需要联网未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Instrument — Add Opik Tracing to a Codebase

You are instrumenting an existing codebase with Opik observability. Follow these steps precisely.

Step 1 — Scope

If $ARGUMENTS is provided, scope your work to those files or directories. Otherwise, discover the project root and instrument the main application code.

Step 2 — Detect Language & Frameworks

Scan the codebase to determine:

  1. Language: Python (look for *.py, pyproject.toml, requirements.txt) or TypeScript (look for *.ts, *.tsx, package.json)
  2. LLM frameworks in use — search imports for these patterns:
Import patternFrameworkIntegration
from openai / import OpenAIOpenAItrack_openai
import anthropicAnthropictrack_anthropic
from langchain / @langchainLangChainOpikTracer callback
from langgraphLangGraphOpikTracer with graph=
from crewaiCrewAItrack_crewai
import dspyDSPyOpikCallback
from google … genaiGoogle Geminitrack_genai
import boto3 … bedrockAWS Bedrocktrack_bedrock
from llama_indexLlamaIndexLlamaIndexCallbackHandler
import litellmLiteLLMOpikLogger callback
from pydantic_aiPydantic AILogfire OTLP bridge
from opik.integrations.adk / from google.adkGoogle ADKtrack_adk_agent_recursive
import ollamaOllamatrack_openai with localhost base_url or manual @opik.track
from agents import / from openai.agentsOpenAI Agents SDKOpikTracingProcessor
from haystackHaystackOpikConnector
opik-openai / trackOpenAI (TS)OpenAI (TS)trackOpenAI
opik-vercel / OpikExporter (TS)Vercel AI SDKOpikExporter
opik-langchain / OpikCallbackHandler (TS)LangChain.jsOpikCallbackHandler
opik-gemini / trackGemini (TS)Gemini (TS)trackGemini
  1. Existing Opik usage — check if opik or @opik.track is already imported. If so, audit rather than re-instrument.

Step 3 — Identify the Call Graph

Find:

  • Entrypoint: the top-level function that kicks off the agent (e.g., main, run, agent, handle_message, a route handler, or whatever the user's main orchestration function is)
  • LLM call sites: functions that call an LLM provider directly
  • Tool functions: retrieval, search, API calls, or other tool-like operations
  • Existing config classes: dataclasses, Pydantic models, or plain classes holding model names, temperatures, prompts, or other tunable parameters

Entrypoint Parameter Rules

The function marked with entrypoint=True must only accept primitive-typed parameters: str, int, float, bool, and list/dict of primitives. This is because:

  • Opik reads the function's type hints to build an input form in the UI
  • Users will type these values manually in a text field via the Local Runner
  • Complex types (Pydantic models, dataclasses, request objects, custom classes) cannot be entered in a UI input field

If the candidate entrypoint accepts complex types (e.g., a request model, a config object, a dataclass):

  1. Look higher in the call chain for a function that already accepts primitives
  2. If none exists, create a thin wrapper function that accepts only primitives, unpacks them, and calls the original function. Move the entrypoint=True decorator to this wrapper.

Example — bad entrypoint (complex parameter):

# ❌ DO NOT mark this as entrypoint — RecommendRequest is a Pydantic model
@app.post("/recommend")
async def recommend(request: RecommendRequest):
    summary, tool_results = await run_agent(user_message=build_user_message(request))
    return RecommendResponse(city=request.city, recommendations=_extract_recommendations(tool_results), summary=summary)

Example — good entrypoint (primitives only):

@opik.track(name="recommend-agent", entrypoint=True)
async def _run_entrypoint(user_message: str) -> tuple[str, list[dict]]:
    """Opik entrypoint — receives only the user message for Local Runner schema."""
    return await run_agent(user_message=user_message)

@app.post("/recommend")
async def recommend(request: RecommendRequest):
    summary, tool_results = await _run_entrypoint(user_message=build_user_message(request))
    return RecommendResponse(city=request.city, recommendations=_extract_recommendations(tool_results), summary=summary)

The wrapper extracts the primitive values from the complex object and delegates to the existing logic. The HTTP handler calls the wrapper instead of the inner function directly, so the trace captures the full execution.

Step 4 — Add Framework Integrations

For each detected framework, add the appropriate integration at the module level. See the integration table above and references/integrations.md for the exact patterns.

Python examples:

# OpenAI
from opik.integrations.openai import track_openai
client = track_openai(OpenAI())  # wrap existing client

# Anthropic
from opik.integrations.anthropic import track_anthropic
client = track_anthropic(anthropic.Anthropic())

# LangChain / LangGraph
from opik.integrations.langchain import OpikTracer
tracer = OpikTracer()
# pass config={"callbacks": [tracer]} to invoke()

# LiteLLM inside @opik.track — CRITICAL: pass span context
from opik.opik_context import get_current_span_data
# in every litellm.completion() call, add:
#   metadata={"opik": {"current_span_data": get_current_span_data()}}

TypeScript examples:

// OpenAI
import { trackOpenAI } from "opik-openai";
const trackedClient = trackOpenAI(openai);

// Vercel AI SDK
import { OpikExporter } from "opik-vercel";
// set up NodeSDK with OpikExporter

Step 5 — Add @opik.track Decorators (Python) or Client Tracing (TypeScript)

Python

Add import opik at the top of each file you instrument.

Function roleDecorator
Entrypoint (top-level agent)@opik.track(entrypoint=True, name="<agent-name>")
LLM call@opik.track(type="llm")
Tool / retrieval@opik.track(type="tool")
Guardrail / validation@opik.track(type="guardrail")
Other helper in the call chain@opik.track
  • Entrypoint parameters must be primitives only (str, int, float, bool, list, dict). If the natural entrypoint takes a complex type, create a wrapper — see Step 3 "Entrypoint Parameter Rules".
  • Config access must happen inside @opik.track: Any call to client.get_or_create_config() and subsequent access of config fields must occur inside a @opik.track-decorated function, or in a function called downstream from one. This is how Opik injects config metadata into the current trace. Calling it at module level or outside the traced call stack will raise an error.
  • Place the decorator above any existing decorators (e.g., above @app.route)
  • For async functions, @opik.track works the same way — no changes needed
  • If the function is a script entrypoint (not a long-running server), add opik.flush_tracker() after the top-level call

TypeScript

Use the client-based approach:

import { Opik } from "opik";
const client = new Opik({ projectName: "<project-name>" });

// In the entrypoint function:
const trace = client.trace({ name: "<agent-name>", input: { ... } });
const span = trace.span({ name: "<operation>", type: "tool", input: { ... } });
// ... logic
span.end({ output: { ... } });
trace.end({ output: { ... } });
await client.flush();

For entrypoints that should be discoverable by opik connect — note that params must only use primitive types (string, number, boolean) since users enter these values in a UI text field:

import { track } from "opik";

const myAgent = track(
  { name: "<agent-name>", entrypoint: true, params: [{ name: "query", type: "string" }] },
  async (query: string) => { /* ... */ }
);

Step 6 — Conversational Agents: Add thread_id

If the agent handles multi-turn conversations (chat bots, support agents, multi-step assistants), wire thread_id:

@opik.track(entrypoint=True)
def handle_message(session_id: str, message: str) -> str:
    opik.update_current_trace(thread_id=session_id)
    return generate_response(session_id, message)

Skip this for single-shot agents or batch processing.

Step 7 — Environment Config

Follow the setup decision tree from the main opik skill:

  1. If the project has .env / .env.local → append OPIK_API_KEY, OPIK_WORKSPACE, OPIK_URL_OVERRIDE (if missing)
  2. If no .env exists → Python: create/update ~/.opik.config; TypeScript: create .env or .env.local
  3. Never introduce a second config mechanism
  4. Never overwrite existing values
  5. Update .env.example / .env.sample if one exists
  6. Set project_name in code, not in env files

OPIK_URL_OVERRIDE path rules

The URL suffix depends on where Opik is hosted:

DeploymentURL formatExample
Opik Cloud / managed<base>/opik/apihttps://www.comet.com/opik/api
Self-hosted (local)<base>/apihttp://localhost:5173/api
  • Cloud/managed: always append /opik/api
  • Self-hosted (typically localhost or an internal hostname): append only /api — no /opik prefix
  • When writing or suggesting an OPIK_URL_OVERRIDE value, apply this rule so users don't have to remember it

Step 8 — Install Dependencies

Print the install command but do NOT run it automatically. Let the user decide.

Python:

pip install opik

Plus any integration packages if needed (most are included in opik).

TypeScript:

npm install opik

Plus framework-specific packages: opik-openai, opik-vercel, opik-langchain, opik-gemini as needed.

Step 9 — Verify

After instrumentation, do a quick audit:

  • Every LLM call site is traced (via integration wrapper or @opik.track)
  • Exactly one function has entrypoint=True
  • The entrypoint function accepts only primitive parameters (str, int, float, bool, list, dict) — no Pydantic models, dataclasses, or custom classes
  • All get_or_create_config() calls and config field access happen inside @opik.track-decorated functions (or downstream from one)
  • Script entrypoints call opik.flush_tracker() (Python) or await client.flush() (TypeScript)
  • LiteLLM calls inside @opik.track pass current_span_data via metadata
  • No hardcoded API keys were introduced
  • Existing tests still import correctly (no circular imports introduced)

Anti-Patterns to Avoid

  • Double-wrapping: Don't add @opik.track(type="llm") to a function that already uses a framework integration (e.g., track_openai). The integration handles tracing.
  • Orphaned LiteLLM traces: Always pass current_span_data when OpikLogger is used inside @opik.track code.
  • Complex entrypoint parameters: The entrypoint function must only accept primitives (str, int, float, bool, list, dict). Pydantic models, dataclasses, or custom classes can't be typed into a UI input field. If the natural entrypoint takes a complex type, create a thin wrapper that accepts primitives.
  • Config access outside @opik.track: get_or_create_config() and config field reads must happen inside a @opik.track-decorated function or downstream from one. Module-level or untraced calls will fail and won't attach config metadata to the trace.
  • Missing entrypoint: Without entrypoint=True, Local Runner (opik connect) won't discover the agent.
  • Missing flush: Scripts that exit without flushing lose trace data.
  • Overwriting config: Check before writing to .env or ~/.opik.config.

References

For detailed API signatures and advanced patterns, see:

  • ../opik/references/tracing-python.md — Python SDK reference
  • ../opik/references/tracing-typescript.md — TypeScript SDK reference
  • ../opik/references/integrations.md — All framework integrations
  • ../opik/references/observability.md — Core concepts (traces, spans, threads)

平台分布

Codex

35.48%
按下载量换算306

Claude

29.35%
按下载量换算253

Cursor

17.46%
按下载量换算151

Gemini CLI

9.42%
按下载量换算81

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills