opik: Skill for Claude Code

.agents/skills/query-performance/SKILL.md

query-performance is a skill for Claude Code, Codex from comet-ml/opik. It costs 71 tokens per session (1,971 once invoked), scanned A, original, Apache-2.0.

A method for measuring the real cost of ClickHouse database queries before they are merged. ClickHouse is a database designed for large-scale analytics.

In plain words
What is it for?
Use it when changing a data-access query, investigating a slow endpoint, or answering how a query will behave with larger datasets.
Why use it?
It replaces guesses about query speed and resource use with measurements, while checking that a changed query still returns the same results and order.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is comet-ml/opik's own configuration. It tells Claude Code and Codex how to work on opik itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything opik configures →

About the project

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.

comet-ml/opik · 22,998 stars · on GitHub · comet.com

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/comet-ml/opik/main/.agents/skills/query-performance/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/comet-ml/opik

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for query-performance

README.md
[![agentmods](https://agentmods.dev/badge/skills/comet-ml/opik/query-performance/github.svg)](https://agentmods.dev/skills/comet-ml/opik/query-performance)
Your own site
<a href="https://agentmods.dev/skills/comet-ml/opik/query-performance"><img src="https://agentmods.dev/badge/skills/comet-ml/opik/query-performance/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.

agentmods 80×15 button for query-performance

Your own site · 80×15
<a href="https://agentmods.dev/skills/comet-ml/opik/query-performance"><img src="https://agentmods.dev/badge/skills/comet-ml/opik/query-performance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,971 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00071 $0.01971
Opus 5.5 $0.00028 $0.00788
Sonnet 5.5 $0.00014 $0.00394
Haiku 4.5 $0.00007 $0.00197

Measured 2mo ago against content hash 406bfad0cf11, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

query-performance 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.

.agents/skills/query-performance/SKILL.md · 128 lines

How it starts

The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Query Performance Validation

Turn "this query looks expensive" into numbers a reviewer can act on. The output is a verdict per clause — change, keep, or caller's call — each attached to a measurement, plus the negative results so nobody retries them.

Ground rules

  1. Measure, never infer. Every claim needs a number that would differ if the claim were false.
  2. Equivalence gate first. No variant's cost is quotable until you have ensured it returns the same result as the query it varies, on every shape you measure. Where the query defines an order — anything with ORDER BY, and anything paginated, where order decides which rows land on the page — the comparison must include that order; compare order-independently only when the result genuinely has no defined order. A faster query that answers a different question is not an optimization. (Equivalence holds between the candidate and its variants. A candidate is often meant to change results versus main; main is the cost reference, not a result reference.)
  3. Collect the whole picture per run: latency, peak memory, CPU time, and what was scanned (parts, granules, marks, rows read). The first three are what the system pays; the scan numbers are the evidence that explains why they moved. A variant can read fewer rows and still cost more memory, more CPU and the same wall time — so no single number decides anything on its own.
  4. Two data shapes minimum, since rankings flip with density and skew. A win on one shape is a hypothesis.
  5. One variable per variant, including deleting a clause outright to see if it earns its keep.
  6. ≥5 runs; report p50, p90, p95 and min. Differences smaller than the spread are not differences, and the tail is where a polled endpoint hurts. Tail quantiles are only as good as the run count — if p90/p95 is what you are deciding on, run more than five.
  7. Write down what you could not measure — quotas, unreachable shapes, cache state. Those caveats bound the finding.

Read the full file on GitHub · 128 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 2mo ago First seen · 128 lines · 71 tokens per session scan A 406bfad0cf11

Subscribe to this mod's changes

query-performance is a skill published in the GitHub repository comet-ml/opik (22,998 stars, last pushed today), licensed Apache-2.0. It adds 71 tokens to every session and 1,971 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

notion

Notion API for creating and managing pages, databases, and blocks.

the-open-agent/openagent · 17 tokens

supabase-operations

Design, deploy, and operate Supabase projects with explicit schema, migration, security, backup, and observability checks. Use for Supabase architecture, Postgres changes, auth, storage, edge functions, or deployment operations.

TIKAZI/TIKAZ-AI-Skills · 50 tokens

deepagents-thread-inspector

Inspect and explain conversations in the local Deep Agents Code SQLite session store. Use to look up the current thread's title or name, as a fallback when LangSmith trace tooling is unavailable, for offline or untraced sessions, or when asked to identify or summarize a local dcode thread, inspect checkpoint metadata…

langchain-ai/deepagents · 93 tokens

query-writing

Writes and executes SQL queries from simple SELECTs to complex multi-table JOINs, aggregations, and subqueries. Use when the user asks to query a database, write SQL, run a SELECT statement, retrieve data, filter records, or generate reports from database tables.

langchain-ai/deepagents · 57 tokens

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…

kyegomez/swarms · 73 tokens

sqli

SQL Injection — automated and manual exploitation of unsanitized SQL queries. Covers Union-based, Error-based, Blind (Boolean/Time-based), and Stacked queries. Includes sqlmap automation with WAF bypass tamper scripts.

PurpleAILAB/Decepticon · 48 tokens