本文へ移動
cccskills
無料GitHub で公開

prune-branches

Cleans up local git branches marked as [gone] (deleted on the remote but still present locally), including removing any associated worktrees. Use when the user says "prune branches", "clean up gone branches", "/prune-branches", or asks to delete stale local branches whose remotes are gone.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md1.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Your task

Delete every local branch whose upstream is gone, removing any attached worktree first. If nothing is marked [gone], report that and stop.

Steps

  1. List branches with verbose status to surface [gone] markers and any + prefix indicating an attached worktree:

    git branch -v
    
  2. List worktrees so you know which paths will be removed:

    git worktree list
    
  3. Remove worktrees and delete [gone] branches in one pass. Strips the +/*/space prefix, finds the worktree (if any), and force-deletes the branch:

    git branch -v | grep '\[gone\]' | sed 's/^[+* ]//' | awk '{print $1}' | while read branch; do
      echo "Processing branch: $branch"
      worktree=$(git worktree list | grep "\\[$branch\\]" | awk '{print $1}')
      if [ ! -z "$worktree" ] && [ "$worktree" != "$(git rev-parse --show-toplevel)" ]; then
        echo "  Removing worktree: $worktree"
        git worktree remove --force "$worktree"
      fi
      echo "  Deleting branch: $branch"
      git branch -D "$branch"
    done
    

Reporting

  • Print which worktrees were removed and which branches were deleted.
  • If no [gone] branches exist, say "No cleanup needed" and stop.
  • Never delete branches that are not marked [gone].
  • Never touch the current working tree's root path.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.

日本語の概要は準備中です。原文の説明を表示しています。

samuelpatro/.claude32026年9月3日 更新

Monitor a pull request through review and CI until it's green: verify every bot claim against the code, fix what's real, push back on what's wrong, rerun flaky checks. Use when the user asks to babysit, monitor, watch, or shepherd a PR, says "get this PR green" or "handle the review comments". Accepts an optional PR number/URL; defaults to the current branch's open PR.

日本語の概要は準備中です。原文の説明を表示しています。

samuelpatro/.claude32026年9月3日 更新

changelog

無料

Generate a single unified changelog from git history that works for everyone in the company (managers and non-tech colleagues as well as developers). Outputs Slack mrkdwn so it can be pasted straight into Slack. Defaults to Slovak (English only on explicit request) and to comparing the release branch (main) against develop to show unreleased changes; also supports date ranges like "today", "yesterday", "last week", or an explicit git range. User-invoked only via /changelog.

日本語の概要は準備中です。原文の説明を表示しています。

samuelpatro/.claude32026年9月3日 更新

commit

無料

Create atomic git commits with terse, exact Conventional Commits messages. Cuts noise, preserves intent. Subject ≤50 chars. Body only when "why" isn't obvious. Use when the user says "commit", "commit this", "/commit", or asks to stage and commit changes.

日本語の概要は準備中です。原文の説明を表示しています。

samuelpatro/.claude32026年9月3日 更新

Create atomic git commits with terse Conventional Commits messages, then push to remote. Subject ≤50 chars, body only when "why" isn't obvious. Never force pushes. Use when the user says "commit and push", "commit & push", "/commit-push", or asks to stage, commit, and push in one flow.

日本語の概要は準備中です。原文の説明を表示しています。

samuelpatro/.claude32026年9月3日 更新

create-pr

無料

Create branch, atomic commits, push, and open a pull request with terse, exact messages. Conventional branch + commit format. PR title ≤70 chars, body says "why", not "what". Use when the user says "create pr", "create pullrequest", "create pull request", "make pr", "open pr", "open pullrequest", "open pull request", "submit pr", "raise pr", "/create-pr", or asks to ship/send changes as a pull request (PR/pullrequest/pull-request, any spelling).

日本語の概要は準備中です。原文の説明を表示しています。

samuelpatro/.claude32026年9月3日 更新

samuelpatro のスキルをすべて見る

このスキルの問題を報告する