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.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/comet-ml/opik/analytics-instrumentationnpx skills add comet-ml/opik --skill analytics-instrumentationgit 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/analytics-instrumentation)<a href="https://agentmods.dev/skills/comet-ml/opik/analytics-instrumentation"><img src="https://agentmods.dev/badge/skills/comet-ml/opik/analytics-instrumentation.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00043 | $0.04131 |
| Opus 5 | $0.00022 | $0.02065 |
| Sonnet 5 | $0.00009 | $0.00826 |
| Haiku 4.5 | $0.00004 | $0.00413 |
Grade A, and why
analytics-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 5d 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 — 326 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Analytics Instrumentation
Event Naming
All events MUST be prefixed with opik_. Segment routes opik_* events to PostHog. The tooling enforces this automatically, but event names defined in code should already include the prefix.
Examples: opik_onboarding_agent_name_submitted, opik_eval_suite_created, opik_optimization_created
Frontend Events
Files
- Tracking utility:
apps/opik-frontend/src/lib/analytics/tracking.ts(mode-agnostic; safe to import from any project code) - Segment init:
apps/opik-frontend/src/plugins/comet/analytics/index.ts(comet-only) - Plugin init:
apps/opik-frontend/src/plugins/comet/init.tsx(comet-only)
Adding a new event
- Add the event name to the
OpikEventconst intracking.ts:
export const OpikEvent = {
ONBOARDING_AGENT_NAME_SUBMITTED: "opik_onboarding_agent_name_submitted",
} as const;
- Call
trackEventfrom the component or hook where the action happens:
import { trackEvent, OpikEvent } from "@/lib/analytics/tracking";
trackEvent(OpikEvent.ONBOARDING_AGENT_NAME_SUBMITTED, {
agent_name: agentName,
});
How it works
trackEvent()safely no-ops when Segment isn't loaded (OSS mode)opik_prefix is enforced at runtime as a safety netOPIK_ANALYTICS_ENVIRONMENTis injected into event properties automatically bytrackEvent()- Frontend custom events flow through Segment (same pipeline as backend): Segment → PostHog
- PostHog still handles automatic pageviews, user identification, and feature flags directly
Backend Events
Files
- Service:
apps/opik-backend/src/main/java/com/comet/opik/infrastructure/bi/AnalyticsService.java - Config:
apps/opik-backend/src/main/java/com/comet/opik/infrastructure/AnalyticsConfig.java - YAML config:
apps/opik-backend/config.yml(underanalytics:)
API
AnalyticsService exposes two overloads:
void trackEvent(String eventType, Map<String, String> properties);
void trackEvent(String eventType, Map<String, String> properties, String identity);
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.
- 5d ago First seen · 326 lines · 43 tokens per session scan A 5d5b2e16bd2a
analytics-instrumentation is a skill published in the GitHub repository comet-ml/opik (21,799 stars, last pushed today), licensed Apache-2.0. It adds 43 tokens to every session and 4,131 once invoked, about $0.0002 per session on Opus 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
swarms
Build agents and multi-agent systems with the Swarms framework — the Agent class, tools, autonomous loops, memory, and the 15+ multi-agent architectures (SequentialWorkflow, ConcurrentWorkflow, GraphWorkflow, HierarchicalSwarm, SwarmRouter, and more). Use whenever writing, reviewing, or debugging code that imports…
greeting-user
Explains how to properly greet the user.
gh-issues
Fetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5]…
canvas
Display HTML content on connected OpenClaw nodes (Mac app, iOS, Android).
peekaboo
Capture and automate macOS UI with the Peekaboo CLI.
taskflow
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting…