Opik is an open-source platform for tracing, evaluating, and monitoring applications that use large language models, retrieval systems, or AI agents. Teams use it to inspect agent activity, manage prompts, run evaluations, and monitor these applications in production.
Borrowing it
Nothing to install: this file belongs to comet-ml/opik. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/comet-ml/opik/main/.agents/skills/metrics-instrumentation/SKILL.mdgit clone --depth 1 https://github.com/comet-ml/opikWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/comet-ml/opik/metrics-instrumentation)<a href="https://agentmods.dev/skills/comet-ml/opik/metrics-instrumentation"><img src="https://agentmods.dev/badge/skills/comet-ml/opik/metrics-instrumentation/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/comet-ml/opik/metrics-instrumentation"><img src="https://agentmods.dev/badge/skills/comet-ml/opik/metrics-instrumentation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Snyk pass
- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Agent Snooping · line 92 Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00093 | $0.02974 |
| Opus 5.5 | $0.00037 | $0.01190 |
| Sonnet 5.5 | $0.00019 | $0.00595 |
| Haiku 4.5 | $0.00009 | $0.00297 |
Grade A, and why
metrics-instrumentation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Metrics Instrumentation
Normative spec for the backend half of operational observability: per-stage OpenTelemetry metrics in apps/opik-backend. The metrics are designed so a flow-ordered Grafana dashboard can read top-to-bottom — the failing stage is the one whose numbers break — with a per-workspace drill. Building that dashboard (layout, query contracts, per-customer name resolution, dependency panels, validation) is a separate concern, specified by the dashboard-authoring skill in comet monitoring tooling; this skill covers only what to emit.
Patterns applied in this implementation (online scoring is the worked example):
- Producer metrics — every stage that emits work is counted at the source: sampler decisions (
sampler_decisions_total{decision}) and enqueue-to-Redis (enqueue_total{result}). A producer that emits nothing makes downstream starvation explainable rather than mysterious. - Consumer metrics — throughput and per-stage timing on the side that drains the queue (
processing_time, plus per-Redis-opread/claim/ack_and_remove/list_pending_time). - Entrypoint RED — the workflow's front door (the HTTP ingest route) is measured Rate / Errors / Duration from
http_server_request_duration_seconds, with 5xx broken down by endpoint ×error_type× workspace, so an ingestion problem is never mistaken for a scoring problem. - Errors — a dedicated error counter per stage, dimensioned by
error_type(the exception class) and, for shared async plumbing, by component (listener/subscriber):processing_errors_total,unexpected_errors_total, andenqueue_total{result="error"}(a push failure = real loss). - Success — success is derived, never double-counted: throughput − errors, surfaced as one "success rate" headline tile.
- Queue time & end-to-end latency —
queue_delay(enqueue→pickup) is kept separate fromprocessing_time(scorer/LLM work) so a backlog is distinguishable from a slow scorer; end-to-end = queue_delay + processing_time. - Backpressure — poll-tick skips are counted but are benign (consumer busy), never lost work.
- Saturation & resource levels — gauges for in-flight work (max per pod) and JVM heap used-vs-limit per pod expose the pipeline approaching a ceiling before it starts failing (the USE method — utilization / saturation / errors — complementing RED).
- Volume & payload size — byte/char counters (bandwidth, total bytes) and payload-size distributions, broken down by content type and workspace, for cost and impact attribution.
- Per-workspace dimensioning — the customer drill (§1.3) is a first-class label, not an afterthought.
- Infrastructure dependencies — the datastores the flow leans on (Redis streams, ClickHouse, locks, MySQL) are surfaced on the dashboard from their exporters and
system.query_log, so a "slow pipeline" resolves to the dependency causing it.
To see these conventions already in practice, grep apps/opik-backend for the existing metric families rather than specific classes (metric names are the stable contract; class locations move): the online-scoring *_sampler_decisions_total, *_enqueue_total{result}, *_processing_time_milliseconds, *_queue_delay_milliseconds, *_processing_errors_total{error_type} / *_unexpected_errors_total, the per-Redis-op *_{read,claim,ack_and_remove,list_pending}_time_milliseconds, and the attachment upload byte/size families.
Apply alongside the opik-backend skill (general conventions, logging rule).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 125 lines · 93 tokens per session scan A 937490bb1311
metrics-instrumentation is a skill published in the GitHub repository comet-ml/opik (22,998 stars, last pushed today), licensed Apache-2.0. It adds 93 tokens to every session and 2,974 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
discord-app-setup
Connect a Discord bot to the assistant via the Discord Gateway with guided application creation and intent configuration.
vellum-oauth-integrations
Act on behalf of your user in any third-party software that supports OAuth 2.0.
api-mapping
Record and analyze API surfaces of web services.
rust-gateway
Add or change an HTTP route, extractor, response envelope, stream or router mount in the litellm-rust gateway crates (crates/gateway and crates/gateway-). Use when adding an endpoint, parsing a request body, choosing an error envelope for an API surface, relaying SSE, or writing a router-level test.
mailgun-setup
Set up and send emails via a user-provided Mailgun account (BYO email provider).
resend-setup
Set up and send emails via a user-provided Resend account (BYO email provider).