skillopt

A command that runs a local process-skill optimizer, which improves the written procedure an agent follows for a task. It can either print a command for a separate terminal or run the process in the current session.

In plain words
What is it for?
Use it to optimize a named process skill, inspect its fixtures, or run the optimizer after creating a clean Git checkpoint.
Why use it?
It provides a safer default for a process that can make destructive file or repository changes when run with broad permissions.

Command for Claude Code

Install

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.

agentmods
npx agentmods add commands/iliaal/whetstone/skillopt
Clone the repo
git clone --depth 1 https://github.com/iliaal/whetstone

Made for: Claude Code.

Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,578 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
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 $0.00040 $0.01578
Opus 5 $0.00020 $0.00789
Sonnet 5 $0.00008 $0.00316
Haiku 4.5 $0.00004 $0.00158

Measured 3d ago against content hash 85244f295d5a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

skillopt scanned grade C with 1 finding 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 3d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

hazard that has let a target agent `rm -rf` fixtures and `git commit` in the host
.claude/commands/skillopt.md · 99 lines

How it starts

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

/skillopt — run the SkillOpt process-skill optimizer

Optimize a Whetstone process skill via distillery/skillopt/. Full procedure and rationale: distillery/skillopt/SKILLOPT-RUNBOOK.md.

Safety — read before --run

The optimizer drives a bypassPermissions target agent with its bash sandbox disabled. Running it nested inside a Claude Code session is the documented hazard that has let a target agent rm -rf fixtures and git commit in the host repo (see the Safety section of distillery/skillopt/SKILLOPT-RUNBOOK.md). Therefore:

  • Default mode does NOT run the agent in-session — it validates + prints the exact command to run in a bare terminal.
  • --run executes in-session only after the rollout's _ensure_unsandboxed unsets CLAUDE_CODE_COORDINATOR_MODE (confines each nested agent's Bash root to its out-of-repo tmpdir) AND a clean git checkpoint exists. Relative-path escape is closed by design; absolute-path access still is not — use --run only on your own curated fixtures, and prefer the default.

Arguments

  • skill (default ia-debugging) — the process skill to optimize.
  • --fixtures <dir> (advanced) — override the fixture set named in the skill's config; defaults to whatever configs/whetstone/<skill>.yaml points at.
  • --target <model> (default: the config's weak target) — override the weak target to optimize for; capable models saturate hard, leaving no room.
  • --weight <λ> (default auto) — soft blend weight; must be < 1/n_val.
  • --epochs N (default 2).
  • --run — execute in-session (hardened) instead of printing the command.

Procedure (follow exactly)

  1. Resolve the per-skill config. CONFIG = distillery/skillopt/configs/whetstone/<skill>.yaml. If it does not exist, the skill is not onboarded — SkillOpt needs four pieces per skill: fixtures, a RUBRICS[<skill>] entry in skillopt/envs/whetstone/rubric.py, this config, and a seed (env.skill_init). Tell the user to onboard it (see the runbook §5) and STOP. Do not fall back to default.yaml — that silently optimizes ia-debugging's skill against the wrong fixtures. Read FIXDIR from the config's env.tasks_root (a tasks/ dir) and set SETDIR to its parent — the fixture-set root, where build_fixtures.py and splits/ live (not inside tasks/). Confirm FIXDIR, the sibling splits/{train,val,test}/items.json, and $SETDIR/build_fixtures.py exist.

Read the full file on GitHub · 99 lines

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. 3d ago First seen · 99 lines · 40 tokens per session scan C 85244f295d5a

Subscribe to this mod's changes

skillopt is a command published in the GitHub repository iliaal/whetstone (32 stars, last pushed 4d ago), licensed MIT. It adds 40 tokens to every session and 1,578 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.