Files
trailofbits__skills/plugins/skill-improver
Paweł Płatek cfea213cce skill-improver: remove the trash dependency and the duplicate command surface (#249)
* skill-improver: remove the trash dependency and the duplicate command surface

Fixes two issues:

- #244: hooks/stop-hook.sh and scripts/cancel-skill-improver.sh called
  `trash`, which is absent on stock Linux; under `set -e` the stop hook
  died before removing the state file even when the completion marker
  was detected, so the loop could never terminate, and the cancel
  escape hatch failed too. lib.sh now provides remove_state_file(),
  preferring trash and falling back to rm -f. The helper is not named
  `trash` because `command -v` resolves shell functions, so a
  same-named wrapper would always take the trash branch and still die.
  A hermetic regression suite runs both scripts on a stub PATH without
  trash; it fails 5/8 assertions on the old code.

- #199: commands/skill-improver.md and skills/skill-improver/SKILL.md
  both registered as skill-improver:skill-improver, listing twice in
  the model-facing skill index. Commands are the legacy surface since
  the commands/skills unification, so the command's path-resolution
  and setup steps moved into SKILL.md (argument-hint, scoped Bash rule
  for the setup script) and the command file is gone. Invocation stays
  /skill-improver. SKILL.md now also tells the model to skip setup on
  stop-hook continuation prompts so a mid-loop re-trigger cannot start
  a second parallel session.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* pr-review done

* rm regression test

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 09:15:34 -04:00
..

Skill Improver Plugin

Iteratively reviews and fixes Claude Code skill quality issues until they meet standards. Runs automated fix-review cycles using the skill-reviewer agent from the plugin-dev plugin.

Requirements

  • plugin-dev plugin must be installed (provides skill-reviewer agent)

Usage

/skill-improver <SKILL_PATH> [--max-iterations N]

Start an improvement loop for a skill. Claude can also trigger it from natural language like "fix my skill". (Shipped as a skill rather than a command so it lists once in the skill index.)

/skill-improver ./plugins/my-plugin/skills/my-skill
/skill-improver ./skills/my-skill/SKILL.md --max-iterations 15

/cancel-skill-improver [SESSION_ID]

Stop the active improvement loop. Changes made during the loop are preserved.

How It Works

  1. /skill-improver resolves the skill path and creates a session state file
  2. The skill-improver methodology reviews, fixes, and re-reviews iteratively
  3. A stop hook continues the loop until the quality bar is met or max iterations (default: 20) are reached
  4. The loop ends when Claude outputs <skill-improvement-complete> or the limit is hit

Multiple sessions can run simultaneously on different skills. Each gets a unique session ID and separate state file in .claude/.

See SKILL.md for detailed methodology and issue categorization.

Troubleshooting

  • "subagent not found": Install the plugin-dev plugin
  • Loop never completes: Check state with cat .claude/skill-improver.*.local.md, cancel with /cancel-skill-improver
  • Orphaned state files: Remove with rm -f .claude/skill-improver.*.local.md