Skip to main content
ClaudeWave
ES, Spanish
Slash Command2.9k estrellas del repoactualizado 29d ago

skill-optimize

The /skill-optimize command runs an offline training loop that iteratively improves a skill's SKILL.md file by testing candidate refinements against accumulated learning trajectories. Use this command when a skill has gathered eight or more learn-rule corrections and you want to automatically propose and validate bounded patches that increase performance on held-out validation data, with budget and epoch controls to manage optimization costs.

Instalar en Claude Code
Copiar
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/rohitg00/pro-workflow/HEAD/commands/skill-optimize.md -o ~/.claude/commands/skill-optimize.md
Después abre una sesión nueva de Claude Code; el slash command carga automáticamente.

skill-optimize.md

# /skill-optimize - SkillOpt-flavored offline training

Run an offline, budget-capped optimization loop over a skill's accumulated `learn-rule` trajectories. Proposes bounded patches via an optimizer LLM, validates each candidate against a held-out portion of the same trajectories, and overwrites SKILL.md only when the candidate strictly improves the weighted score.

## Quick Start

```text
/skill-optimize <slug> [--epochs 3] [--budget-usd 0.50]
```

## What it does

1. Pulls recent `learnings` rows scoped to the skill slug (or global)
2. Splits them into train + validation (~25% holdout, freezes validation set)
3. Runs `epochs` x `minibatches` rounds of: reflect → aggregate → clip → apply → evaluate → gate
4. Stops on: budget exhausted, kill switch (`~/.pro-workflow/STOP`), no improvement, or epochs done
5. If any candidate beat the baseline, overwrites SKILL.md and stamps the new hash

## Requirements

- 8 or more existing `learnings` rows for the slug
- `ANTHROPIC_API_KEY` (or `OPENAI_API_KEY` / `OPENROUTER_API_KEY` / `FIREWORKS_API_KEY` with matching `--optimizer-provider`)
- `npm run build` has been run in the pro-workflow plugin directory at least once

## Examples

```text
/skill-optimize pro-workflow
/skill-optimize wiki-research-loop --budget-usd 1.0 --epochs 5
/skill-optimize wrap-up --optimizer-model claude-opus-4-7 --evaluator-model gpt-4o-mini
```

The third example mixes providers. The CLI infers the provider from the model id (`claude-*` → anthropic, `gpt-*` / `o*` → openai), so you do not need `--evaluator-provider openai` for `gpt-4o-mini`. Pass an explicit `--optimizer-provider` / `--evaluator-provider` to override inference.

See [skills/skill-optimizer/SKILL.md](../skills/skill-optimizer/SKILL.md) for full mechanics, defaults, and the SkillOpt provenance.
agent-teamsSkill

Coordinate multiple Claude Code sessions as a team — lead + teammates with shared task lists, mailbox messaging, and file-lock claiming. Patterns for team sizing, task decomposition, and when to use teams vs sub-agents vs worktrees.

auto-setupSkill

Auto-configure quality gates, hooks, and settings for a new project. Detects project type and sets up appropriate tooling. Use when onboarding a new codebase.

batch-orchestrationSkill

Decompose large-scale changes into independent units and spawn parallel agents in isolated worktrees. Use for migrations, refactors, codemods, and any change touching 10+ files with the same pattern.

bug-captureSkill

Capture a user-reported defect as a durable GitHub issue written in the project's own domain language. Explores the codebase in parallel for context but never leaks file paths or line numbers into the issue. Use when the user reports a bug conversationally, runs a QA pass, or says "file an issue", "log this as a bug", "capture this".

compact-guardSkill

Smart context compaction with state preservation. Saves critical files, task progress, and working state before compaction, restores after. Use before manual compact or when auto-compact triggers.

context-engineerSubagent

Analyzes and optimizes context window usage across sessions. Use when context feels bloated, sessions run slow, or approaching compaction limits.

context-engineeringSkill

Master the four operations of context engineering — Write, Select, Compress, Isolate. Manage token budgets, compaction strategies, and context partitioning to keep AI sessions sharp and efficient.

context-optimizerSkill

Optimize token usage and context management. Use when sessions feel slow, context is degraded, or you're running out of budget.