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 skills add comet-ml/opik-claude-code-plugin --skill opik-optimizegit clone --depth 1 https://github.com/comet-ml/opik-claude-code-pluginWrote 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-claude-code-plugin/opik-optimize)<a href="https://agentmods.dev/skills/comet-ml/opik-claude-code-plugin/opik-optimize"><img src="https://agentmods.dev/badge/skills/comet-ml/opik-claude-code-plugin/opik-optimize/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-claude-code-plugin/opik-optimize"><img src="https://agentmods.dev/badge/skills/comet-ml/opik-claude-code-plugin/opik-optimize.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00143 | $0.03098 |
| Opus 5.5 | $0.00057 | $0.01239 |
| Sonnet 5.5 | $0.00029 | $0.00620 |
| Haiku 4.5 | $0.00014 | $0.00310 |
Grade A, and why
opik-optimize 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 18d 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.
This is a copy
100% identical to opik-optimize — 54 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Optimize — Improve a Prompt Against Data
Definition of done: an optimized prompt whose score on the metric beats the baseline on data it was not tuned on, the optimization run link in Opik, the cost of getting there, and the winner saved as a new prompt version (when the prompt lives in the library) — with the swap into code left as the next step. If the optimization can't run within a stated budget, stop at the first genuine blocker and return exactly one next step. A prompt that scores higher only on its own training items is not an improvement.
Operate: measure the baseline first, state the budget before spending it, hold data out, pick the algorithm for the failure you see, save the winner where it can be versioned — and change no application code. The only file this skill writes is a runner outside the repo; the prompt is saved to Opik, not into the codebase.
Inputs
The entry point is /opik-optimize <prompt-name> (a prompt-library prompt), /opik-optimize <path or function> (a prompt in code), or /opik-optimize (find the system prompt in this repo). Infer the rest; treat these as optional overrides:
- dataset (default: existing dataset for the project → export the regression suite → build from traces) · metric (default: heuristic on
expected_outputif present, else one binary judge) · algorithm (default:MetaPromptOptimizer) · budget (default:n_samples=50,max_trials=10) · model · validation split (default: hold out 20%).
Ask only at a genuine, non-inferable blocker (see Blockers).
Activation — the only in-scope work
1. Resolve the prompt
- Library:
client.get_chat_prompt(name)(orget_promptfor a text prompt). Note the currentversion— that is the baseline. - Code: grep for the system prompt /
messages=[...]; read it verbatim. Note where it lives; you will not edit it. - Trace: the
llmspan'sinput.messageson a representative trace.
The optimizer's opik_optimizer.ChatPrompt is a different class from the library's opik.ChatPrompt — build it from the raw messages yourself:
from opik_optimizer import ChatPrompt
prompt = ChatPrompt(name="<name>", system="<system text>", user="{question}") # or messages=[...]; {var} names must match dataset keys
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.
- 18d ago Changed 008305d6028f
- 22d ago First seen · 143 lines · 143 tokens per session scan A c5f7241f75fe
opik-optimize is a skill published in the GitHub repository comet-ml/opik-claude-code-plugin (23 stars, last pushed 7d ago), licensed Apache-2.0. It adds 143 tokens to every session and 3,098 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to opik-optimize, differing in 54 lines, and is treated as a copy.
Other skills, from other repositories
prompt-optimizer
Analyze raw prompts, identify intent and gaps, match ECC components (skills/commands/agents/hooks), and output a ready-to-paste optimized prompt. Advisory role only — never executes the task itself. TRIGGER when: user says "optimize prompt", "improve my prompt", "how to write a prompt for", "help me prompt", "rewrite…
n8n-agents
Design n8n AI agents the right way. Use when building or editing any @n8n/n8n-nodes-langchain. AI node — an AI Agent, LLM chain, Text Classifier, or Information Extractor — and whenever the user mentions AI agents, LLM with tools, tool calling, $fromAI, system prompts, agent memory, sessionId, structured/JSON output…
skill-meta-prompt
Craft better prompts using proven optimization techniques — use when your prompt needs refinement.
prompt-master
Generates optimized prompts for AI tools. Activates only when the user explicitly asks to write, fix, improve, or adapt a prompt for a specific AI tool (LLM, Cursor, Midjourney, image AI, video AI, coding agents, etc.). Does not activate for general conversation, coding tasks, document writing, or other…
ai-workflow-architect
Designs AI systems, automations, and agent workflows for a business — identifying which manual work is worth automating, how to structure the system, which tools fit, and what could go wrong. Use this to automate part of an operation, design an agent or MCP workflow, reduce repetitive manual work, connect tools into a…
coding-agents-prompt-authoring
To author, adapt, review, and validate prompts (skills, agents, workflows, rules, etc.) with brief, contracts, and a validation pack.