Skillopt logo

Skillopt

Organization
skillberry-ai
skillopt

Runs the SkillOpt single-lineage optimization loop, which organizes a hill-climb into epochs over mini-batches of train tasks under a textual learning rate — an integer edit budget that decays on a constant|linear|cosine schedule — and ends each epoch with one extra gated consolidation step. Parent is always the current best; acceptance is the val significance gate. Use when a run should anneal from broad early edits to small late ones and consolidate once per epoch, rather than hill-climb's one-shot whole-trainset proposals or gepa's Pareto frontier.

Overview

Publisherskillberry-ai
Repositorycap-evolve
Skill nameskillopt
Stars
67
Forks
18
Bundled files
6
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 6 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by skillberry-ai on GitHub. Read the source before you install it.

Installation

Install the Skillopt AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/skillberry-ai/cap-evolve/tree/main/skills/algorithms/skillopt
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/skillberry-ai/cap-evolve.git /tmp/cap-evolve
mkdir -p .claude/skills
cp -r /tmp/cap-evolve/skills/algorithms/skillopt .claude/skills/skillopt
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Skillopt in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Skillopt on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Skillopt is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

skillopt — annealed single-lineage climb (epochs × mini-batches)

SkillOpt (arXiv:2605.23904, Executive Strategy for Self-Evolving Agent Skills) organizes a hill-climb into epochs × mini-batches under a decaying integer edit budget. The name is the paper's; the algorithm edits whatever the selected capability owns — a prompt, a tool surface, a skill package — and never assumes which.

Read the shared step first, then this file. Parent materialization, the optimizer call, the val evaluation, the significance gate, accept/reject, snapshot/best, the memory and handover files: all of that is harness.run_step, documented once in algorithms/hill-climb/SKILL.md § "One iteration, end to end" and algorithms/hill-climb/references/run-step.md. This file states only what SkillOpt does differently.

Know the bound before reaching for this algorithm: run_step lets a caller vary exactly two things — parent_dir and instructions. SkillOpt pins parent_dir to the current best, identical to hill-climb, so everything novel lives in the instructions string plus the choice to run one extra step per epoch. It is prompt shaping and step scheduling, not a different search.

What SkillOpt does differently

  1. A decaying integer edit budget L. lr_schedule.build_schedule emits one integer per step over constant | linear | cosine, clamped to [--min-edit-budget, --edit-budget] (core/cap_evolve/lr_schedule.py:42-55). L is stated to the optimizer in prose — "at most L bounded edits" — and is never mechanically enforced. See the next section before you tune it.
  2. A per-epoch rejected-edit list. Each reject appends its candidate id and val Δ, and the next step's prompt asks the optimizer to avoid them (skillopt.py:120-125, :330-335). It carries no description of what the rejected edit changed, so treat it as a weak signal — the run-global LEDGER.md that run_step already injects names the tasks each prior edit broke and fixed, which is strictly more useful.
  3. One extra gated step per epoch boundary (from epoch 2). It compares the epoch-start candidate against the current best, buckets tasks as regressed / persistent-failure / stable-success, and asks for a consolidating edit that fixes regressions without breaking the stable passes. It goes through the same run_step and the same val gate — it is never force-accepted (skillopt.py:493-499). Disable with --no-slow-update. A fourth bucket, improved, is computed and logged but is not exclusive with the others and never reaches the prompt (skillopt.py:184-191, :139-166).

Epochs shuffle the train ids seeded by epoch number, so a rerun is reproducible. steps_per_epoch = ceil(len(train) / (batch_size × accumulation)).

The textual learning rate, stated without the analogy

The knob is real: L decays, it is an integer, and the schedules are correct. The justification is weaker than the ML vocabulary implies, and pretending otherwise would mislead anyone tuning it.

What plausibly holds: the gate accepts or rejects a whole candidate. A candidate bundling six edits where five help and one hurts is rejected entirely, and you learn nothing about which edit was the problem. Fewer edits per candidate means an accepted candidate is more likely to contain only good edits and a rejected one is cheaper to attribute and revert. That argues for small edits — it does not by itself argue for decay.

What does not transfer: in SGD, LR decay exists because nothing stops a large step from overshooting near an optimum. Here the val significance gate already rejects an overshooting edit before it can become the parent. The overshoot protection is the gate, so the decay is not doing that job.

What is unmeasured: no ablation in this repo isolates the schedule's effect. At realistic step counts the choice barely exists — over 12 steps from 4 down to 2, linear and cosine differ at 2 of 12 positions. Prefer constant or linear and spend your tuning budget on --n-trials and the gate instead. This is a heuristic that has not been isolated; do not present it as a proven one.

Known gaps

These are shipped-behavior defects in core/cap_evolve/skillopt.py. The skill describes what the code does today, not what it intends to do. Line numbers are against current main — check them; if one no longer says what it is cited for, the gap has moved and this section is what needs re-deriving.

  • The mini-batch never reaches the optimizer (issue #371). Mini-batch ids come from train (skillopt.py:237, sliced at :291) but are handed to ctx.instructions (:300) to filter the parent's val rows (harness.py:2270-2272; the same train-vs-val mismatch at :323, :327), and splits are disjoint slices (splits.py:117-119). So the focus summary always renders 0 solid / 0 flaky / 0 failing of 0 focused task(s) of N on val, the failure index is empty, and ## Failure patterns still unsolved never appears — while the (mini-batch of N train tasks, L=…) label still prints, which is why it looked healthy. (The whole-val protect-these-ids block is populated, from harness.py:2279 — that is the only per-task content a step gets, and #391 added the of N on val scope precisely so those two numbers stop contradicting each other.) Until #371 lands the per-step signal is the label plus the L sentence, so the epoch/mini-batch structure is bookkeeping rather than focus. PR #370 fixed the same defect in hill-climb's cyclic/hardest-first modes.
  • The epoch-boundary re-evaluation scores the whole train split, not a sample. skillopt.py:467-472 calls evaluate_candidate(..., split="train") twice with no ids=, then discards everything outside the ~20 sampled ids (:473-475). Budget it as 2 × len(train) × n_trials rollouts per boundary.
  • When an epoch accepted nothing, the comparison is vacuous. The re-eval is guarded by prev_epoch_best_id != run_dir.best_id (skillopt.py:464); if nothing moved, both sides stay current_val — the same list — so 0 regressed and 0 improved are reported over val tasks while the log line claims a train sample size (:478-482). The consolidation step still runs.
  • requested_edits vs applied_changes surfaces nothing, and the number is wrong. _changed_components (skillopt.py:406-435) counts files whose bytes differ, not edits, and applied_changes is written at :346/:353 and read nowhere — no dashboard column, no check, no warning. It also over-counts, because its ignore list (:420) matches seven .md basenames while run_step injects a whole read-context — guidance/, trajectories/, prior_iterations/*/diff.patch — that _SNAPSHOT_IGNORE keeps out of the parent snapshot, so every injected file reads as an applied edit. Measured zero-API on examples/toy_calc at L=4: a step whose optimizer edited exactly one file logged applied_changes: 10 (9 injected + 1 real), and the next step logged 10 again with the capability file byte-identical to its parent. The metric has no zero, so it cannot detect the one thing it exists to detect: an optimizer that made no edit at all.
  • "skill" leaks into the live prompt. skillopt.py:147 tells the optimizer to compare "the skill" regardless of which capability is under optimization. An algorithm must be capability-agnostic; this text is not.

Key flags

--epochs, --batch-size, --accumulation (mini-batches per step; multiplies the effective batch), --edit-budget / --min-edit-budget / --lr-schedule, --slow-update-sample, --no-slow-update. --resume, --no-regression, --n-trials, --workers, --gate-mode, --k-se, --protected-paths, --store behave as in hill-climb.

--max-iterations is accepted and ignored — the loop is epoch-driven, so cap-evolve run's iteration cap has no effect here (scripts/run.py:42-43, whose help text now says so). Control the step count with --epochs/--batch-size.

bash
python scripts/run.py --run-dir .capevolve/run_X --project .capevolve/project \
  --optimizer 'python .../run-optimizer/scripts/run.py --name mock --workdir {workdir} --prompt {prompt}' \
  --epochs 4 --batch-size 8 --accumulation 1 \
  --edit-budget 4 --lr-schedule linear --min-edit-budget 2 --n-trials 4

Requires baseline.json first, like its sibling algorithms.

References

  • references/concepts.md — the loop step by step, the schedule shapes with worked values, and the buffer / consolidation mechanics. Load it when you need to change the loop or reason about its rollout cost, not to run it.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Skillopt AI skill do?

Runs the SkillOpt single-lineage optimization loop, which organizes a hill-climb into epochs over mini-batches of train tasks under a textual learning rate — an integer edit budget that decays on a constant|linear|cosine schedule — and ends each epoch with one extra gated consolidation step. Parent is always the current best; acceptance is the val significance gate. Use when a run should anneal from broad early edits to small late ones and consolidate once per epoch, rather than hill-climb's one-shot whole-trainset proposals or gepa's Pareto frontier.

Why use Skillopt on TypingMind?

Because you install it once and use it with any model. Skillopt is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Skillopt in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/skillberry-ai/cap-evolve/tree/main/skills/algorithms/skillopt. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Skillopt?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Skillopt?

As many as you like. As long as a model supports skills, you can use Skillopt with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Skillopt AI skill free?

Yes. It is published on GitHub by skillberry-ai under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇