dyoshikawa/rulesync/.rulesync/skills/clean-branches/SKILL.md
clean-branches
Clean up unnecessary local branches and prune stale remote-tracking branches
- Source repository stars
- 1,263
- Declared platforms
- 0
- Static risk flags
- 1
- Last source update
- 2026-07-28
- Source checked
- 2026-07-28
Decision brief
What it does—and where it fits
Clean up unnecessary local branches and prune stale remote-tracking branches.
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/dyoshikawa/rulesync --skill ".rulesync/skills/clean-branches"Inspect the Agent Skill "clean-branches" from https://github.com/dyoshikawa/rulesync/blob/310b711fbe8cffc14debb276ade8a384c2b89083/.rulesync/skills/clean-branches/SKILL.md at commit 310b711fbe8cffc14debb276ade8a384c2b89083. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Step 1: Inspect Current State
After identifying the default branch, list branches already merged into it:
git branch --show-currentgit branch --format='%(refname:short)'git remote show origin - 02
Step 2: Refresh Remote State
Update remote refs and prune deleted remote branches:
Update remote refs and prune deleted remote branches: - 03
Step 3: Select Branches to Delete
Delete only branches that are clearly unnecessary.
Local branches already merged into the default branch you identified aboveLocal branches whose upstream branch is gone and are no longer neededThe current branch - 04
Step 4: Delete Branches
For merged branches, delete them safely:
For merged branches, delete them safely:Only if the user explicitly approves force deletion for unmerged branches, use:Delete branches one by one, not with a broad wildcard command.
Permission review
Static risk signals and limitations
Runs scripts
The documentation asks the agent to run terminal commands or scripts.
git fetch --pruneRuns scripts
The documentation asks the agent to run terminal commands or scripts.
git remote prune originEvidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 72/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 1,263 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- dyoshikawa/rulesync
- Skill path
- .rulesync/skills/clean-branches/SKILL.md
- Commit
- 310b711fbe8cffc14debb276ade8a384c2b89083
- License
- MIT
- Collected
- 2026-07-28
- Default branch
- main
View the original SKILL.md
Clean Branches
Clean up unnecessary local branches and prune stale remote-tracking branches.
Step 1: Inspect Current State
Run the following:
git branch --show-currentgit branch --format='%(refname:short)'git remote show origingit branch -vv
Identify:
- The current branch
- The default branch (for example
mainormaster) - Branches whose upstream has been deleted
After identifying the default branch, list branches already merged into it:
git branch --merged <default-branch>
If you want to use the remote-tracking branch as the source of truth, use:
git branch --merged origin/<default-branch>
Step 2: Refresh Remote State
Update remote refs and prune deleted remote branches:
git fetch --prune
If needed, also run:
git remote prune origin
Step 3: Select Branches to Delete
Delete only branches that are clearly unnecessary.
Safe candidates include:
- Local branches already merged into the default branch you identified above
- Local branches whose upstream branch is gone and are no longer needed
Never delete:
- The current branch
- The default branch
- Branches that are not fully merged unless the user explicitly asks for force deletion
If there is any ambiguity, show the candidate branches to the user and ask for confirmation.
Step 4: Delete Branches
For merged branches, delete them safely:
git branch -d <branch-name>
Only if the user explicitly approves force deletion for unmerged branches, use:
git branch -D <branch-name>
Delete branches one by one, not with a broad wildcard command.
Step 5: Report Result
Summarize:
- Which branches were deleted
- Which branches were skipped and why
- Whether stale remote-tracking branches were pruned
Alternatives
Compare before choosing
coreyhaines31/marketingskills
ab-testing
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program
coreyhaines31/marketingskills
churn-prevention
When the user wants to reduce churn, build cancellation flows, set up save offers, recover failed payments, or implement retention strategies. Also use when the user mentions 'churn,' 'cancel flow,' 'offboarding,' 'save offer,' 'dunning,' 'failed payment recovery,' 'win-back,' 'retention,' 'exit survey,' 'pause subscription,' 'involuntary churn,' 'people keep canceling,' 'churn rate is too high,' 'how do I keep users,' or 'customers are leaving.' Use this whenever someone is losing subscribers o
event4u-app/agent-config
design-review
Use when the user says "review the design", "check the UI", or wants a comprehensive UI/UX review. Uses a 7-phase methodology covering interaction, responsiveness, accessibility, and more.
K-Dense-AI/scientific-agent-skills
dask
Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.