agent-device-lab
Prepare and check trusted macOS hosts for physical Android and iPhone tests with agent-device, ADB, and Xcode, or set up iPhone…
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.
$ npx -y skills add vincentkoc/dotskills --skill opik-optimizer --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/opik-optimizerContext preview
The summary Claude sees to decide when to auto-load this skill.
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.
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"
Design, run, and interpret Opik Optimizer workflows for prompts, tools, and model parameters with consistent dataset/metric wiring and reproducible evaluation.
Use this skill when a user asks for:
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.
Use the reference files in this skill for details before implementing code:
1. Install and import:
pip install opik-optimizer
from opik_optimizer import ChatPrompt, MetaPromptOptimizer, HRPO, FewShotBayesianOptimizer from opik_optimizer import datasets
2. Build a prompt and metric:
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,
).value3. Load dataset and run:
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()1. Pick optimizer class:
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:
7. Inspect `OptimizationResult` (`score`, `initial_score`, `history`, `optimization_id`, `get_optimized_parameters`).
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.
stateDiagram-v2
[*] --> SelectObjective
SelectObjective --> ConfigurePromptOrTools:We are moving from "prompt as text" to skill as runtime module. Each skill acts like a lightweight, containerized application for AI work: a stable interface, opinionated workflow, and bundled resources that can be installed, versioned, tested, and reused
Prepare and check trusted macOS hosts for physical Android and iPhone tests with agent-device, ADB, and Xcode, or set up iPhone…
Resolve canonical Git checkouts, index and verify codebase-memory-mcp graphs through the guarded CLI, open its browser viewer on…
Mine structured Codex /goal history locally or across a configured machine fleet, measure active goal time and resumed thread…
Recover Codex or Claude sessions from tmux panes, saved cockpit snapshots, session history, and recent agent logs without…
Interpret Crabpot and OpenClaw performance dashboard metrics, import-loop profiles, runtime profiles, and branch-to-branch perf…
Maintain and release the crawlkit Go library, preserving downstream compatibility for gitcrawl, slacrawl, discrawl, and notcrawl.