cleanup-branches — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited cleanup-branches (Agent Skill) and scored it 92/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 2 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 2 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Wraps bin/cleanup-branches.sh. Lists local branches whose tip is reachable from the base branch (main / develop / wherever the profile points), then either previews the list or actually deletes them with git branch -d (safe — refuses unmerged work).
Mirrors the same preview-then-mutate contract as undo and migrate-profile: nothing is deleted unless the caller passed --yes AND --dry-run was absent.
Always invoke without --yes first:
bin/cleanup-branches.sh --target <cwd>Output is a CleanupBranchesResult JSON (see schemas/cleanup-branches-result.schema.json). Show the user:
base_branch).candidates[]), one per merged branch,with last-commit timestamp + short SHA so they can sanity-check.
summary.candidates_count.--yes to delete.If summary.candidates_count == 0, tell the user there's nothing to clean up and exit. Don't prompt.
Ask: "Delete N merged branch(es)?" — list the names if there are 5 or fewer, or summarise if more. On confirmation:
bin/cleanup-branches.sh --target <cwd> --yesThe script uses git branch -d (lowercase d, the safe form) so even if a candidate's merge state changed between the preview and the apply, git will refuse the unsafe delete and the entry lands in errors[] instead of deleted[]. Surface any errors verbatim.
summary.deleted_count and any entries in errors[].maintain a personal fork branch list:
git push --delete origin <branch> # per branchDon't run this for them — pushing is a high-blast-radius action and the user should pick which deletions to mirror.
/nyann:doctor and look at the LOCAL BRANCHES row for stale_unmerged count, or invoke bin/check-stale-branches.sh directly to see the full classification.
git branch -D <name>.This skill is for the bulk-merged case.
git remote prune originis what they want; not in scope here.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.