- Inspect the current branch and local branches.
- Delete all local branches except the current branch and
main. - Run
git pull --prune. - Report deleted and preserved branches.
Clean Branches
Clean local Git branches and prune remote-tracking references. Use when asked to remove merged or stale local branches while preserving the current branch and main.
Clean Branches by dyoshikawa · fe5bdb3
npx skillmds@latest add dyoshikawa/clean-branches-3 File contents
---name: clean-branches-3description: Clean local Git branches and prune remote-tracking references. Use when asked to remove merged or stale local branches while preserving the current branch and main.---1. Inspect the current branch and local branches.2. Delete all local branches except the current branch and `main`.3. Run `git pull --prune`.4. Report deleted and preserved branches.
dyoshikawa/ghactivities/tree/main/.rulesync/skills/clean-branches commit fe5bdb3ee1
Frequently asked questions
Run npx skillmds@latest add dyoshikawa/clean-branches-3 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Clean local Git branches and prune remote-tracking references. Use when asked to remove merged or stale local branches while preserving the current branch and main. It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
dyoshikawa (@dyoshikawa) published this skill. Their other Agent Skills are listed on their SkillMD profile.