Skip to content
cccskills
FreePublished on GitHub

clean-bak-branches

Delete the `-bak` backup branches that `/prepare-merge` leaves behind, local and on origin, once the work they back up has merged. Use when the user says "remove my bak branches", "clean up bak branches", "delete the backups", or "/clean-bak-branches".

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md2.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

/clean-bak-branches — Delete merged -bak backup branches

/prepare-merge saves the pre-squash history as <branch>-bak (-bak2, -bak-20260917, … on reruns) and pushes it. Nothing removes those refs after the PR merges, so they pile up. This skill removes the current user's ones.

Arguments

  • none — every -bak branch of the current user whose source PR is merged.
  • --dry-run — list what would be deleted and stop.
  • <pattern> — only branches whose name contains it (e.g. an issue number).

Steps

1. Collect

git fetch --prune origin
me=$(git config user.email)
git for-each-ref --format='%(refname)|%(objectname:short)|%(authoremail)' \
    refs/heads refs/remotes/origin \
  | grep -E -- '-bak[0-9a-z-]*\|' | grep -F "<$me>"

Ownership is the author of the branch tip. The -bak refs of other people are theirs to delete — never touch them, even when asked for "all".

A branch checked out in a worktree (git worktree list) is skipped and reported.

2. Check that the backup is no longer needed

Strip the -bak… suffix to get the source branch, then:

gh pr list --head <source-branch> --state all --json number,state
Source PRAction
MERGEDdelete
OPEN, CLOSED unmerged, or no PRkeep, unless the user confirms via AskUserQuestion — the backup may be the only copy of the unsquashed history

3. Delete

Print the name sha list first: it is the only way back (git branch <name> <sha> works while the commits are still unreachable but not yet collected).

git branch -D <local names…>
git push origin --delete <remote names…>

One git push --delete for all remote names, not one per branch.

4. Report

Counts of local and remote refs deleted, what was kept and why, and a rerun of step 1 showing nothing of the user's is left.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Use when work on a branch is finished and the next step is a pull request — "create a PR", "open a PR", "push and PR this", "/create-pr" — when a draft PR should be marked ready for review — "mark the PR ready", "undraft it", "it's ready for review" — or right after either has happened and the team has not been told about it yet.

The English summary is being prepared. Showing the original description.

Actual-Chat/actual-chat57Updated Oct 23, 2026

Design a new UI icon in Voxt's style as an SVG and add it to the icon font. Use whenever a new icon is needed and no existing glyph fits — "create an icon", "make an icon for X", "draw an icon", "design an icon", "we need an icon for …", "add an icon", "there is no icon for …", a request for an SVG glyph, or when a feature needs `<i class="icon-…">` and `src/nodejs/icons/` has nothing suitable. Covers matching the existing line width and contoured (not solid) style, the Figma "UI Icons" reference, and regenerating the font. Do not use it to pick an existing icon, or for multi-color art (that is a `.lit.ts` SVG component, see docs/ui/components.md).

The English summary is being prepared. Showing the original description.

Actual-Chat/actual-chat57Updated Oct 23, 2026

Search Google Cloud (GKE) server logs of the DEV environment (dev.voxt.ai). Use when troubleshooting anything that needs the server side of the story — stream stalls, RPC peer changes / reconnects, watchdog closures, mesh/node churn, pod restarts — or when the user says "check GCP logs", "check server logs on dev", or gives a dev.voxt.ai timeline from a client console log.

The English summary is being prepared. Showing the original description.

Actual-Chat/actual-chat57Updated Oct 23, 2026

Search Google Cloud (GKE) server logs of the PROD environment. Use when troubleshooting a production incident that needs the server side of the story — stream stalls, RPC peer changes / reconnects, watchdog closures, mesh/node churn, pod restarts — or when the user says "check PROD logs", "check production server logs", or gives a production timeline from a client console log.

The English summary is being prepared. Showing the original description.

Actual-Chat/actual-chat57Updated Oct 23, 2026

What this project has already learned the hard way, and where any new such fact belongs. Two jobs. (1) Routing: this project keeps NO per-project Claude memories — read this before writing anything down, and pick a durable home from the list here. (2) An index, by area, of non-obvious facts worth knowing before you guess: debugging rigs and measurements that lie, iOS/WebKit and the tethered iPhone, the Windows app, production and deployment, and general codebase traps. Use before setting up a browser- or server-driven debugging session, when a bug reproduces only on iPhone, in Safari or in the Windows app, before changing deployment configuration or reading store/crash data, when something behaves unexpectedly and you are about to guess why, and whenever you are tempted to record a fact for later.

The English summary is being prepared. Showing the original description.

Actual-Chat/actual-chat57Updated Oct 23, 2026

Merge the current release branch forward into `dev` and push `dev`, so fixes committed straight to `release/vX.Y` reach `dev` and the issues their `Closes #N` lines name get closed. Use when the user says "merge release into dev", "merge the release forward", "bring my release fixes to dev", "are my release fixes on dev?", "/merge-release-to-dev", or right after a release fix lands on `release/*`. `--dry-run` only reports what is missing.

The English summary is being prepared. Showing the original description.

Actual-Chat/actual-chat57Updated Oct 23, 2026

See all skills by Actual-Chat

Report a problem with this skill