/clean
Clean up merged branches locally and on remote, keeping only main, dev, and gh-pages.
$ npx -y skills add alirezarezvani/claude-skills --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/clean
Context preview
What this command does when you run it.
Clean up merged branches locally and on remote, keeping only main, dev, and gh-pages.
Command definition
clean.mddescription: Clean up merged branches locally and on remote, keeping only main, dev, and gh-pages.
Clean up stale branches that have been merged or are no longer needed.
Steps
1. **List local branches** to delete (excluding `main`, `dev`, `gh-pages`):
git branch | grep -v -E '^\*|main$|dev$|gh-pages$'
Report what will be deleted. If no branches found, say "No local branches to clean" and skip to step 3.
2. **Delete local branches** that are fully merged:
git branch -d <branch-name>
If a branch is not fully merged, report it to the user and ask whether to force-delete. Do NOT force-delete without confirmation.
3. **List remote branches** to delete (excluding `main`, `dev`, `gh-pages`, `HEAD`):
git branch -r | grep -v -E 'origin/main$|origin/dev$|origin/gh-pages$|origin/HEAD'
Report what will be deleted. If no branches found, say "No remote branches to clean" and skip to step 5.
4. **Confirm with the user** before deleting remote branches. Show the full list and wait for approval. Then delete:
git push origin --delete <branch-names>
5. **Prune stale remote refs**:
git remote prune origin
6. **Report final state**:
git branch # local
git branch -r # remote
Present a summary:
| Item | Count | |------|-------| | Local branches deleted | N | | Remote branches deleted | N | | Remaining local | main, dev | | Remaining remote | origin/main, origin/dev, origin/gh-pages |
Read more
description: Clean up merged branches locally and on remote, keeping only main, dev, and gh-pages.
Clean up stale branches that have been merged or are no longer needed.
Steps
1. **List local branches** to delete (excluding `main`, `dev`, `gh-pages`):
git branch | grep -v -E '^\*|main$|dev$|gh-pages$'
Report what will be deleted. If no branches found, say "No local branches to clean" and skip to step 3.
2. **Delete local branches** that are fully merged:
git branch -d <branch-name>
If a branch is not fully merged, report it to the user and ask whether to force-delete. Do NOT force-delete without confirmation.
3. **List remote branches** to delete (excluding `main`, `dev`, `gh-pages`, `HEAD`):
git branch -r | grep -v -E 'origin/main$|origin/dev$|origin/gh-pages$|origin/HEAD'
Report what will be deleted. If no branches found, say "No remote branches to clean" and skip to step 5.
4. **Confirm with the user** before deleting remote branches. Show the full list and wait for approval. Then delete:
git push origin --delete <branch-names>
5. **Prune stale remote refs**:
git remote prune origin
6. **Report final state**:
git branch # local git branch -r # remote
Present a summary:
| Item | Count | |------|-------| | Local branches deleted | N | | Remote branches deleted | N | | Remaining local | main, dev | | Remaining remote | origin/main, origin/dev, origin/gh-pages |
362 production-ready Claude Code skills, plugins, and agent skills for 13 AI coding tools. The most comprehensive open-source library of Claude Code skills and agent plugins — also works with OpenAI Codex, Gemini CLI, Cursor, and 9 more coding agents.
Repo: alirezarezvani/claude-skills
Other commands on alirezarezvani-claude-skills.
- /focused-fix
Deep-dive feature repair — systematically fix an entire feature/module across all its files and dependencies. Usage: /focused-fix <feature-path>
Open command - /cm
Stage working tree changes and create a Conventional Commit (no push).
Open command - /cp
Stage, commit, and push the current branch following git governance rules.
Open command - /pr
Create a pull request from the current branch.
Open command - /plugin-audit
Comprehensive audit pipeline for skills, plugins, agents, and commands. Validates structure, quality, security, marketplace compliance, cross-platform compatibility, and ecosystem integration. Runs all built-in validation tools, invokes domain-appropriate agents for code review,
Open command - /review
Run the local review gate before pushing.
Open command

