Agent skill

Opik Optimizer

by vincentkoc in vincentkoc/dotskills

Optimize LLM prompts, tools, and agents in Opik using standardized optimizer workflows (prompt optimization, tool optimization, and parameter tuning), dataset/metric wiring, and result interpretation.

MITAuto-check passedAI & LLM Engineering

Install Opik Optimizer

skills CLI
$ npx skills add vincentkoc/dotskills --skill opik-optimizer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vincentkoc/dotskills opik-optimizer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vincentkoc/dotskills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/opik-optimizer .claude/skills/opik-optimizer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
opik-optimizer
GitHub stars
107
Token cost
~1.7k tokens
SKILL.md length
521 words
Files
7 (incl. references, assets)
Skills in repo
19
Repo updated
First seen
Licence
MIT

At a glance

Optimize LLM prompts, tools, and agents in Opik using standardized optimizer workflows (prompt optimization, tool optimization, and parameter tuning), dataset/metric wiring, and result interpretation.

  • Works in 5 steps: Select optimizer strategy… → Build prompt/dataset/metric wiring and… → Run prompt, tool, or parameter… → …
  • Tasks that involve Prompt engineering
  • SKILL.md covers Purpose, When to use, Workflow and Inputs, plus 8 more sections
  • Calls pip

What it does

Opik Optimizer is an agent skill from vincentkoc/dotskills. Optimize LLM prompts, tools, and agents in Opik using standardized optimizer workflows (prompt optimization, tool optimization, and parameter tuning), dataset/metric wiring, and result interpretation.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including reference files and assets (for example `agents/openai.yaml`, `references/algorithms.md` and `references/datasets_and_setup.md`).

It sits in AI & LLM Engineering, covering Prompt engineering. The repository describes itself as: 🐙 A curated set of Codex and OpenClaw skills for workflow automation, technical debugging, and agent-assisted development patterns. The licence is MIT.

When your agent uses it

  • Tasks that involve Prompt engineering

Example prompts

  • “/opik-optimizer”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Select optimizer strategy (MetaPromptOptimizer, FewShotBayesianOptimizer, HRPO, etc.) based on the target optimization goal.
  2. Build prompt/dataset/metric wiring and validate placeholder-field alignment.
  3. Run prompt, tool, or parameter optimization with explicit controls (n_threads, n_samples, max_trials, seed).
  4. Inspect OptimizationResult and compare score deltas against initial baselines.
  5. Summarize recommendations, risks, and next experiments.

What it can do on your machine

Read from SKILL.md and the folder at commit b83ca13. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Opik Optimizer loads about 1.7k tokens when it runs, and up to ~4.9k if it reads all its reference files. Until then it costs about 54 tokens; SKILL.md has 521 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vincentkoc/dotskills at commit b83ca13, republished under its MIT licence (© vincentkoc). 521 words, ~1,684 tokens.

Download SKILL.mdSave it as .claude/skills/opik-optimizer/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
opik-optimizer
description
Optimize LLM prompts, tools, and agents in Opik using standardized optimizer workflows (prompt optimization, tool optimization, and parameter tuning), dataset/metric wiring, and result interpretation.
license
MIT
metadata.source
https://github.com/vincentkoc/dotskills

Opik Optimizer

Purpose

Design, run, and interpret Opik Optimizer workflows for prompts, tools, and model parameters with consistent dataset/metric wiring and reproducible evaluation.

When to use

Use this skill when a user asks for:

  • Choosing and configuring Opik Optimizer algorithms for prompt/agent optimization.
  • Writing ChatPrompt-based optimization runs and custom metric functions.
  • Optimizing with tools (function calling or MCP), selected prompt roles, or prompt segments.
  • Tuning LLM call parameters with optimize_parameter.
  • Comparing optimizer outputs and interpreting OptimizationResult.

Workflow

  1. Select optimizer strategy (MetaPromptOptimizer, FewShotBayesianOptimizer, HRPO, etc.) based on the target optimization goal.
  2. Build prompt/dataset/metric wiring and validate placeholder-field alignment.
  3. Run prompt, tool, or parameter optimization with explicit controls (n_threads, n_samples, max_trials, seed).
  4. Inspect OptimizationResult and compare score deltas against initial baselines.
  5. Summarize recommendations, risks, and next experiments.

Inputs

  • Target optimization objective (prompt/tool/parameter) and success metric.
  • Dataset source and expected schema fields.
  • Model/provider constraints and runtime limits.
  • Optional scope constraints (optimize_prompts segments, tool fields, project names).

Outputs

  • Optimizer run configuration and rationale.
  • Result interpretation (score, initial_score, history trends).
  • Recommended next changes and follow-up experiment plan.

Use the reference files in this skill for details before implementing code:

  • references/algorithms.md
  • references/prompt_agent_workflow.md
  • references/example_patterns.md

Opik Optimizer quickstart

  1. Install and import:
bash
pip install opik-optimizer
python
from opik_optimizer import ChatPrompt, MetaPromptOptimizer, HRPO, FewShotBayesianOptimizer
from opik_optimizer import datasets
  1. Build a prompt and metric:
python
from opik.evaluation.metrics import LevenshteinRatio

prompt = ChatPrompt(
    system="You are a concise answerer.",
    user="{question}",
)

def metric(dataset_item: dict, output: str) -> float:
    return LevenshteinRatio().score(
        reference=dataset_item["answer"],
        output=output,
    ).value
  1. Load dataset and run:
python
dataset = datasets.hotpot(count=30)

result = MetaPromptOptimizer(model="openai/gpt-5-nano").optimize_prompt(
    prompt=prompt,
    dataset=dataset,
    metric=metric,
    n_samples=20,
    max_trials=10,
)
result.display()

Core workflow you should follow

  1. Pick optimizer class:
    • Few-shot examples + Bayesian selection: FewShotBayesianOptimizer
    • LLM meta-reasoning: MetaPromptOptimizer
    • Genetic + MOO / LLM crossover: EvolutionaryOptimizer
    • Hierarchical reflective diagnostics: HierarchicalReflectiveOptimizer (HRPO)
    • Pareto-based genetic strategy: GepaOptimizer
    • Parameter tuning only: ParameterOptimizer
  2. Define a single ChatPrompt (or dict of prompts for multi-prompt cases).
  3. Provide a dataset from opik_optimizer.datasets.
  4. Provide metric callable with signature (dataset_item, llm_output) -> float (or ScoreResult/list of ScoreResult).
  5. Set optimizer controls (n_threads, n_samples, max_trials, seed, etc.).
  6. Run one of:
    • optimize_prompt(...) for prompt/system behavior changes.
    • optimize_parameter(...) for model-call hyperparameters.
  7. Inspect OptimizationResult (score, initial_score, history, optimization_id, get_optimized_parameters).
Show full SKILL.md (215 more words)Show less

Key execution details to enforce

  • Prefer explicit project_name for Opik tracking if you are using org-level observability.
  • Keep placeholders in prompts aligned with dataset fields (for example {question}).
  • Start with optimize_prompts="system" or "user" when scope should be constrained.
  • Keep model names in MetaPrompt/reasoning calls provider-compatible for your account.
  • Validate multimodal input payloads by preserving non-empty content segments only.
  • For small datasets, use n_samples and n_samples_strategy carefully; over-allocation auto-falls back to full set.

Tooling and segment-based control

  • Tools can be optimized with MCP/function schema fields, not only by changing prompt wording.
  • For fine-grained text updates, use optimize_prompts values and helper functions from prompt_segments:
    • extract_prompt_segments(ChatPrompt) to inspect stable segment IDs.
    • apply_segment_updates(ChatPrompt, updates) for deterministic edits.
  • Tool optimization is distinct from prompt optimization.

Runnable examples live upstream in the Opik repo:

If you need local runnable scripts, vendor the upstream examples into a scripts/ folder and keep references one level deep.

Common mistakes to avoid

  • Passing empty dataset or mismatched placeholder names.
  • Mixing deprecated constructor arg num_threads with n_threads.
  • Assuming tool optimization is the same as agent function-calling optimization.
  • Running ParameterOptimizer.optimize_prompt (it raises and should not be used).

Next actions

  • For in-depth behavior and per-class parameter tables: references/algorithms.md
  • For exact optimize_prompt signatures, prompts, tool constraints, and result usage: references/prompt_agent_workflow.md
  • For pattern examples and source-backed workflows: references/example_patterns.md

Flow

mermaid
stateDiagram-v2
    [*] --> SelectObjective
    SelectObjective --> ConfigurePromptOrTools: prompt, agent, or tool objective
    SelectObjective --> ConfigureParameters: parameter objective
    ConfigurePromptOrTools --> ValidateDatasetAndControls
    ConfigureParameters --> ValidateDatasetAndControls
    ValidateDatasetAndControls --> ReportBlocked: fields, metric, or limits invalid
    ValidateDatasetAndControls --> OptimizePrompt: prompt or tool strategy
    ValidateDatasetAndControls --> OptimizeParameter: ParameterOptimizer
    OptimizePrompt --> CompareBaseline
    OptimizeParameter --> CompareBaseline
    OptimizePrompt --> ReportBlocked: run fails
    OptimizeParameter --> ReportBlocked: run fails
    CompareBaseline --> ReportRecommendations
    ReportRecommendations --> [*]
    ReportBlocked --> [*]

© vincentkoc, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (references, assets) in skills/opik-optimizer of vincentkoc/dotskills.

  • SKILL.md
  • agents/openai.yaml
  • assets/icon.jpg
  • references/algorithms.md
  • references/datasets_and_setup.md
  • references/example_patterns.md
  • references/prompt_agent_workflow.md

Open the folder on GitHubat commit b83ca13

Compare with similar skills

Opik Optimizer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Opik Optimizer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Opik Optimizer this skillvincentkoc/dotskills107—~1.7kAutomated safety check: PassMIT
Prompt Improverseverity1/claude-code-prompt-improver1.9k2 repos~1.7kAutomated safety check: PassMIT
Prompt Engineering Patternsynulihao/AgentSkillOS61715 repos~1.7kAutomated safety check: PassNone
Patch CreationPiebald-AI/tweakcc2.5k—~1.6kAutomated safety check: PassMIT
LLM Application DevMoizIbnYousaf/ai-agent-skills1.1k2 repos~1.3kAutomated safety check: PassMIT
Senior Prompt Engineermaslennikov-ig/claude-code-orchestrator-kit2604 repos~1.4kAutomated safety check: PassCustom licence

Similar skills

  • Prompt Improver

    severity1/claude-code-prompt-improver

    This skill enriches vague prompts with targeted research and clarification before execution.

    1.9k GitHub starsUsed in 2 repos~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Prompt Engineering Patterns

    ynulihao/AgentSkillOS

    Master advanced prompt engineering techniques to maximize LLM performance, reliability, and controllability in production.

    617 GitHub starsUsed in 15 repos~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Patch Creation

    Piebald-AI/tweakcc

    Create and register new patches for tweakcc. An agent skill from Piebald-AI/tweakcc.

    2.5k GitHub stars~1.6k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • LLM Application Dev

    MoizIbnYousaf/ai-agent-skills

    Building applications with Large Language Models - prompt engineering, RAG patterns, and LLM integration.

    1.1k GitHub starsUsed in 2 repos~1.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Senior Prompt Engineer

    maslennikov-ig/claude-code-orchestrator-kit

    Provides reference guides and Python scripts for prompt optimization, RAG evaluation, and agent orchestration when building or tuning LLM systems.

    260 GitHub starsUsed in 4 repos~1.4k tokens
    AI & LLM EngineeringAuto-check passed
  • Codex Fable5

    baskduf/FableCodex

    Apply a Claude Fable 5 inspired operating style inside Codex.

    437 GitHub stars~1.6k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed

More from vincentkoc/dotskills

All 19 skills in this repo
  • Openclaw PR Batch Sweep

    vincentkoc/dotskills

    Select, review, repair, validate, and land batches of up to 20 low-risk OpenClaw contributor pull requests using Vincent's maintainer preferences and bounded sub-agent lanes.

    107 GitHub stars~4.1k tokensUpdated today
    Auto-check passed
  • Tmux Agent Lane Orchestrator

    vincentkoc/dotskills

    Monitor and coordinate one tmux agent lane, reconstruct worker state from panes and recent Codex logs, classify progress and blockers, and produce concise manager summaries.

    107 GitHub stars~967 tokensUpdated today
    Auto-check passed
  • Codebase Memory MCP

    vincentkoc/dotskills

    Resolve canonical Git checkouts, index and verify codebase-memory-mcp graphs through the guarded CLI, and safely audit duplicate worktree caches.

    107 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Org Branch Cleanup

    vincentkoc/dotskills

    Audit and safely prune stale branches across a GitHub organization with immutable snapshots, conservative merged-PR classification, live SHA/protection/open-PR revalidation, resumable deletion…

    107 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Session Done

    vincentkoc/dotskills

    Prepare a concise session handoff when the user asks to wrap up, capture continuation context, or use /done.

    107 GitHub stars~833 tokensUpdated today
    Auto-check passed
  • Codex Goal Mining

    vincentkoc/dotskills

    Mine structured Codex /goal history locally or across a configured machine fleet, measure active goal time and resumed thread spans, identify unfinished and recurring semantic runs, and turn them…

    107 GitHub stars~1.2k tokensUpdated today
    Auto-check passed

Questions about Opik Optimizer

What does Opik Optimizer do?

Optimize LLM prompts, tools, and agents in Opik using standardized optimizer workflows (prompt optimization, tool optimization, and parameter tuning), dataset/metric wiring, and result interpretation. Opik Optimizer is an agent skill from vincentkoc/dotskills. Optimize LLM prompts, tools, and agents in Opik using standardized optimizer workflows (prompt optimization, tool optimization, and parameter tuning), dataset/metric wiring, and result interpretation.

When should I use Opik Optimizer?

Opik Optimizer fits situations like: tasks that involve Prompt engineering.

How do I install Opik Optimizer in Claude Code?

Run `npx skills add vincentkoc/dotskills --skill opik-optimizer -a claude-code`. Or copy the skill folder (skills/opik-optimizer in vincentkoc/dotskills) into .claude/skills/opik-optimizer in your project. Claude Code loads it when a task matches its description.

How do I install Opik Optimizer in Codex?

Run `npx skills add vincentkoc/dotskills --skill opik-optimizer -a codex`. Or copy the skill folder (skills/opik-optimizer in vincentkoc/dotskills) into .agents/skills/opik-optimizer in your project. Codex loads it when a task matches its description.

Can I use Opik Optimizer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vincentkoc/dotskills --skill opik-optimizer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/opik-optimizer, .gemini/skills/opik-optimizer, .github/skills/opik-optimizer and .opencode/skills/opik-optimizer in your project.

What does Opik Optimizer need to run?

Going by SKILL.md and its folder, Opik Optimizer needs the command-line tools its instructions call (pip). Our summary lists: Python 3.

Does Opik Optimizer access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Opik Optimizer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Opik Optimizer use?

Opik Optimizer is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Opik Optimizer use?

About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.2k tokens, read only when the agent opens those files.

What are the alternatives to Opik Optimizer?

Skills that share tags, products or a category with Opik Optimizer: Prompt Improver (severity1/claude-code-prompt-improver, 1.9k stars), Prompt Engineering Patterns (ynulihao/AgentSkillOS, 617 stars), Patch Creation (Piebald-AI/tweakcc, 2.5k stars) and LLM Application Dev (MoizIbnYousaf/ai-agent-skills, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Opik Optimizer?

vincentkoc (a GitHub user) maintains it in vincentkoc/dotskills, which has 107 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 8, 2026.

Source: vincentkoc/dotskills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.