refactor(me): simplify write-skill and split SkillOpt into a reference - #753
Merged
Conversation
added 2 commits
August 4, 2026 15:47
SKILL.md was 205 lines of dense prose with no examples, 12 sections (including two named "Common mistakes"), and it covered only SkillOpt operation despite being named write-skill. Rewrite it as general skill-authoring guidance in 94 lines / 4 sections, and move SkillOpt operation to references/skillopt.md so it costs nothing when unused. Verified by invoking the skill in real `claude` sessions: - Authoring produced a 96-line single-file skill with no SkillOpt leakage. - A/B against no-skill and against the 193-line draft showed the shorter version drove tighter output and was the only one that ran a scored baseline. - The SkillOpt path initially failed: the model announced it would read the reference, then answered from memory and invented flags. Replacing the passive "See references/..." with an explicit prohibition plus the three silent failure modes fixed it (0 -> 5 correct fact mentions). Correct facts checked against the runner and its source: - OpenCode is not a supported source; the repo ships OpenClaw. Removed. - Add Cursor source/backend and its disabled tool-aware replay. - `--scope invoked` matches parent directories, so `~` sessions leak in, and sibling worktrees under other parents are unreachable. Only an explicit `projects` path list in config is correct. - `--max-sessions` is a global cap, not per project; it silently drops whole projects. - An existing `last_harvest` checkpoint takes precedence over `--lookback-hours`, so `0` does not rescan history on a known path. - `harvest --output` plus per-task provenance tags is the only way to merge Claude and Codex into one holdout split. - Document protected regions, real spend under `dry-run`, and rollback from the backup `adopt` writes. Also drop agents/openai.yaml: nothing references it, Codex manifests are generated per plugin by scripts/generate-codex-plugin-manifests.sh, and the project plan explicitly forbids adding it. Replace the SKILL.md prose assertions in tests with a structural check, per the CLAUDE.md rule against asserting skill content.
baleen37
enabled auto-merge (squash)
August 4, 2026 06:57
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe Changeswrite-skill generalization
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
write-skillwas 205 lines of dense prose with no examples, 12 sections (two ofthem both named "Common mistakes"), and it covered only SkillOpt operation
despite being named
write-skill.It is now general skill-authoring guidance in 94 lines / 4 sections, with
SkillOpt operation moved to
references/skillopt.mdso it costs nothing whenunused.
Changes
SKILL.md: 205 → 94 lines (~2674 → ~1038 tokens), 12 → 4 sections.references/skillopt.md(249 lines) for SkillOpt operation and its traps.agents/openai.yaml— nothing references it, Codex manifests aregenerated per plugin by
scripts/generate-codex-plugin-manifests.sh, anddocs/superpowers/plans/2026-07-18-story-loop-skills.mdexplicitly forbidsadding it.
SKILL.mdprose assertions intests/me/me-specific.batswith astructural check, per the CLAUDE.md rule against asserting skill content.
plugins/me/README.mdentry, which described the old scope.Corrected facts
Checked against the runner and its source, not from memory:
adaptation, a different thing. Removed the target path and the flag warning.
tool-aware replay.
--scope invokedmatches parent directories._project_matches()acceptsa session when either path prefixes the other, so
~and~/devsessionsleak into a repo-scoped harvest; sibling worktrees under other parents are
unreachable. Only an explicit
projectspath list in config is correct.--max-sessionsis a global cap, not per project. With 3 paths andlimit=2it returned 2 sessions from 1 project and dropped the rest silently.last_harvestcheckpoint takes precedence over--lookback-hours, so0does not rescan history on an already-harvestedpath.
harvest --outputplus per-task provenance tags is the only way to mergeClaude and Codex into one holdout split;
transcript_sourceis file-level, soconcatenating loses the provider.
SLOW_UPDATE/APPENDIXregions, real spend underdry-run, and rollback from the backupadoptwrites.Tests
bats tests/— 70 pass, 0 fail.pre-commitclean on all changed files.Verified by invoking the skill in real
claude -psessions, not just subagents:description and zero SkillOpt leakage.
shorter version drove tighter output (65 vs 99 lines) and was the only arm
that ran a scored baseline. Notably the no-skill baseline was already strong,
which is why the surviving sections target what it actually missed.
below.
One bug only real sessions caught
Subagent trigger simulation scored 6/6, but in a live session the model
announced it would read
references/skillopt.md, then answered from memory andinvented flags — every verified fact absent. Replacing the passive
"See references/..." with an explicit prohibition plus the three silent failure
modes fixed it: 0 → 5 correct fact mentions, with the parent-directory leak,
--source autostopping early, and provenance loss all stated correctly.Note
The installed
me:write-skill17.41.1 plugin cache still wins skill selectionlocally until this releases. Per the known stale-cache behavior,
marketplace updatealone may not pick it up — a reinstall may be needed.Summary by CodeRabbit
SKILL.mdfiles and baseline validation.