git-cleanup: worked example force-deletes a branch its own SUPERSEDED rule says to keep
The git-cleanup skill's worked example deletes a branch that its own rule says must be kept.
The rule (plugins/git-cleanup/skills/git-cleanup/SKILL.md, "SUPERSEDED requires evidence, not just shared prefix"): a branch counts as superseded only when a PR merged its work into main, or a newer branch contains all of its commits. "Name prefix alone is NOT sufficient."
The example (same file, the feature/api-* analysis and the resulting commands):
- The table lists
feature/api-finalwith 4 commits, PR "None found", status "Superseded by above PRs". - The categorized table marks it "Superseded — Older iteration, diverged".
- The recommendation is "Delete all 4 (work is in main)", followed by
git branch -D feature/api-final.
No PR merged feature/api-final and no newer branch is shown to contain its commits, so under the rule it has unmerged work. "Diverged" means it has commits of its own. Models follow worked examples closely, so this example teaches force-deleting unmerged branches on the strength of a shared name prefix, which is the data loss the rule exists to prevent.
Suggested fix: in the example, classify feature/api-final as needing a decision (for example "Diverged, no PR: unmerged commits, keep or review"), keep it out of the delete command block, and delete only the three branches with merged PRs using git branch -d.
Found during a prompt review of installed Claude Code skills (plugin version 1.0.1).
Source: trailofbits/skills