shugo/textbringer / .claude/skills/sync
sync
VerifiedSwitch to main, pull, and delete the work branch once its pull request is merged
Bring the tree back to an up-to-date main after a pull request has been
merged, and clean up the branch it came from. Nothing here is
destructive as long as every step looks first; a branch is deleted only
after GitHub says its pull request is merged.
-
Look first:
git branch --show-current-- remember it; if it is notmain, it is the branch to clean up in step 3.git status --shortshows no tracked change. A change lying in the tree would follow the switch ontomain, or block it; commit it (thepushskill) or say so and stop. The untracked scratch files this tree habitually carries are fine to leave.
-
Switch and pull, fast-forward only:
git switch main git pull --ff-onlymainis never edited locally here, so a pull that cannot fast-forward means something is wrong; stop and report rather than merging or rebasing. Note the rangegit pullprints (old..new) and readgit log --oneline old..new-- the report names what came down, usually the merge of the pull request just finished plus any Dependabot merges that landed meanwhile. -
Delete the work branch, once it is known to be merged. Ask GitHub, not
git branch --merged, since a merged pull request is the fact that matters:gh pr list --head <branch> --state merged --json number,url --jq '.[0] | "\(.number) \(.url)"'An empty answer means no merged pull request for the branch; leave it alone and say so -- it may be open, or never have had one. When there is a merged pull request:
git branch -d <branch> git push origin --delete <branch>Pull requests here are merged with a merge commit, so
-daccepts the branch; if-drefuses, the branch has commits the merge did not carry -- report that instead of reaching for-D. Check the remote side first withgit ls-remote --heads origin <branch>; GitHub may already have deleted it, which is not an error. Finish withgit fetch --pruneso the stale remote-tracking ref goes too.Only the branch the tree was on is deleted. Other local or remote branches (
feature/*, old experiments) are not this skill's business, even when their pull requests are merged, unless they are named explicitly. -
Report: the branch that was left, the pulled range with the merge it carries, and which of the local and remote branches were deleted.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |