delete-merged-branches — for Claude Code delete-merged-branches, community, for Claude Code, ide skills, collaborative-editing, knowledge-management, note-taking, tiptap, git branch --merged, headRefOid

v1.0.0

이 스킬 정보

적합한 상황: Ideal for AI agents that need マージ済みローカル・リモートブランチの削除. 현지화된 요약: AI-native note-taking app that lets you build knowledge through WikiLinks, AI scaffolding, and date-based organization. It covers ai, collaborative-editing, knowledge-management workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

기능

マージ済みローカル・リモートブランチの削除
事前に git fetch origin --prune と gh auth status が通ることを確認したうえで、以下で候補列挙・確認・削除まで行う。
git fetch origin --prune
./scripts/delete-merged-branches.sh [基準ブランチ] [--dry-run]
基準ブランチ : 省略時はローカルに develop があれば develop、なければ origin/HEAD の短縮名(例: main)。

# Core Topics

otomatty otomatty
[2]
[0]
Updated: 4/28/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 8/11

This page remains useful for teams, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution
Review Score
8/11
Quality Score
40
Canonical Locale
ja
Detected Body Locale
ja

적합한 상황: Ideal for AI agents that need マージ済みローカル・リモートブランチの削除. 현지화된 요약: AI-native note-taking app that lets you build knowledge through WikiLinks, AI scaffolding, and date-based organization. It covers ai, collaborative-editing, knowledge-management workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

이 스킬을 사용하는 이유

추천 설명: delete-merged-branches helps agents マージ済みローカル・リモートブランチの削除. AI-native note-taking app that lets you build knowledge through WikiLinks, AI scaffolding, and date-based organization. This AI agent skill supports

최적의 용도

적합한 상황: Ideal for AI agents that need マージ済みローカル・リモートブランチの削除.

실행 가능한 사용 사례 for delete-merged-branches

사용 사례: Applying マージ済みローカル・リモートブランチの削除
사용 사례: Applying 事前に git fetch origin --prune と gh auth status が通ることを確認したうえで、以下で候補列挙・確認・削除まで行う。
사용 사례: Applying git fetch origin --prune

! 보안 및 제한 사항

  • 제한 사항: feature/qux - merged PR #124 (remote-only)
  • 제한 사항: sub - closed PR #XXX (remote-only)
  • 제한 사항: Requires repository-specific context from the skill documentation

Why this page is reference-only

  • - Current locale does not satisfy the locale-governance contract.
  • - The underlying skill quality score is below the review floor.

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

After The Review

Decide The Next Action Before You Keep Reading Repository Material

Killer-Skills should not stop at opening repository instructions. It should help you decide whether to install this skill, when to cross-check against trusted collections, and when to move into workflow rollout.

Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is delete-merged-branches?

적합한 상황: Ideal for AI agents that need マージ済みローカル・リモートブランチの削除. 현지화된 요약: AI-native note-taking app that lets you build knowledge through WikiLinks, AI scaffolding, and date-based organization. It covers ai, collaborative-editing, knowledge-management workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

How do I install delete-merged-branches?

Run the command: npx killer-skills add otomatty/zedi/delete-merged-branches. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for delete-merged-branches?

Key use cases include: 사용 사례: Applying マージ済みローカル・リモートブランチの削除, 사용 사례: Applying 事前に git fetch origin --prune と gh auth status が通ることを確認したうえで、以下で候補列挙・確認・削除まで行う。, 사용 사례: Applying git fetch origin --prune.

Which IDEs are compatible with delete-merged-branches?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for delete-merged-branches?

제한 사항: feature/qux - merged PR #124 (remote-only). 제한 사항: sub - closed PR #XXX (remote-only). 제한 사항: Requires repository-specific context from the skill documentation.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add otomatty/zedi/delete-merged-branches. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use delete-merged-branches immediately in the current project.

! Reference-Only Mode

This page remains useful for installation and reference, but Killer-Skills no longer treats it as a primary indexable landing page. Read the review above before relying on the upstream repository instructions.

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

delete-merged-branches

Install delete-merged-branches, an AI agent skill for AI agent workflows and automation. Review the use cases, limitations, and setup path before rollout.

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

マージ済みローカル・リモートブランチの削除

git branch --merged は祖先関係のみ見るため、squash/rebase merge では未マージ扱いになる。本スキルでは祖先判定に加え、GitHub の merged PR の headRefOid 一致でローカル・リモート両方の削除対象を安全に決める。あわせて、クローズされた(未マージ)PR のブランチはリモートのみ削除候補とする(ローカルは対象にしない)。クローズ PR は gh pr list --state closed でリポジトリ全体から取得するため、基準以外のブランチ向けに作られた sub-PR(例: copilot/sub-pr-*)も候補になる。主 remote は origin を前提とする。

推奨: スクリプトで一括実行

事前に git fetch origin --prunegh auth status が通ることを確認したうえで、以下で候補列挙・確認・削除まで行う。

bash
1git fetch origin --prune 2./scripts/delete-merged-branches.sh [基準ブランチ] [--dry-run]
  • 基準ブランチ: 省略時はローカルに develop があれば develop、なければ origin/HEAD の短縮名(例: main)。
  • --dry-run: 削除はせず、削除候補一覧と理由だけ表示する。
  • 非対話で実行する場合(CI やエージェントから確認なしで削除する場合): echo y | ./scripts/delete-merged-branches.sh で確認プロンプトに自動で y を送る。

スクリプトは (1) merged PR を gh pr list --state merged --base <基準> で一括取得し headRefName / headRefOid で照合する。(2) クローズ済み未マージ PR を gh pr list --state closed--base なし、リポジトリ全体)から mergedAt == null かつ同一リポジトリ(fork は isCrossRepository で除外)で抽出する。ローカル候補は祖先 or merged PR の headRefOid 一致のみ。リモート専用候補は「merged PR で tip 一致」に加え、クローズ済み未マージ PR については origin の tip が当該 PR の headRefOid と一致する場合のみ(かつ mergedAt == null)削除候補に含め、さらに同名ブランチに open PR がある場合は削除しない。確認後にローカル削除 → リモート削除の順で実行する。

手動で行う場合(フォールバック)

スクリプトを使わないときは以下を参考にする。

  1. 事前確認
    git fetch origin --prunegh auth status。主 remote が origin でない場合はユーザーに確認する。

  2. 基準ブランチ
    ユーザー指定 > ローカル develop > origin/HEAD の短縮名。base_remote=origin/<基準> が存在しない場合は中断して確認。

  3. merged PR の一括取得
    ブランチごとに gh pr list を叩かず、1 回だけ取得する。

    bash
    1gh pr list --state merged --base "$base_branch" --limit 200 --json headRefName,headRefOid,number
  4. ローカル候補
    git for-each-ref refs/heads --format='%(refname:short)' で一覧。現在ブランチ・基準・main/master/develop・origin/HEAD 先は除外。各ブランチについて:

    • git merge-base --is-ancestor <branch> "$base_remote" で成功 → 削除可(merged by ancestry)
    • 失敗時は上記 JSON からそのブランチ名の headRefOid を探し、$(git rev-parse <branch>) と一致する場合のみ削除可(merged PR #N)。
  5. リモート専用候補
    git for-each-ref refs/remotes/origin --format='%(refname:short)' | sed 's|^origin/||' で一覧。保護ブランチ・ローカルに存在するブランチは除外。(a) merged PR の JSON でそのブランチの headRefOid が origin の tip と一致する場合。(b) 別途 gh pr list --state closed(--base なし)から mergedAt == null かつ同一リポジトリの PR の headRefNameheadRefOid を取得し、origin の tip が headRefOid と一致するリモートブランチのみ対象とする。このとき、同名ブランチに open PR がある場合は削除しない(基準以外向けの sub-PR や Copilot ブランチを含む)。

  6. 削除
    候補を提示し確認後、ローカルは git branch -d(必要なら -D)、リモートは git push origin --delete <branch>

報告形式

markdown
1基準ブランチ: develop 2 3Deleted (local): 4 5- `feature/foo` - merged by ancestry 6- `feature/bar` - merged PR #123 (squash/rebase-safe) 7 8Deleted (remote): 9 10- `feature/qux` - merged PR #124 (remote-only) 11- `sub` - closed PR #XXX (remote-only) 12 13削除: ローカル 2 件、リモート 2 件

削除件数を必ず添える。

現状把握(調査時)

リモートブランチ一覧と PR 状態を確認する例:

bash
1git fetch origin --prune 2git for-each-ref refs/remotes/origin --format='%(refname:short)' | sed 's|^origin/||' | grep -v '^HEAD$' | sort 3# 各ブランチの PR 状態: gh pr list --state all --head <branch> --limit 1 --json state,number,mergedAt,baseRefName

削除候補の洗い出しには ./scripts/delete-merged-branches.sh --dry-run が使える。

注意点

  • merged PR があっても、ローカルまたはリモートの tip が headRefOid と一致しない場合は削除しない(merge 後に進んだ可能性あり)。
  • クローズ済み未マージ PR のブランチはリモート削除のみ対象。ローカルに同じ名前のブランチがあっても、merged でない限りローカルは削除しない(安全のため)。
  • 主 remote が origin でない構成では手順を流用するかユーザーに確認する。
  • gh が使えない場合は、祖先で merged と判定できるローカルブランチと、その同名の origin 上のリモートブランチを ancestry ベースでのみ削除し、PR の headRefOid による squash/rebase 判定およびクローズ済み PR の取得は行わない。

관련 스킬

Looking for an alternative to delete-merged-branches or another community skill for your workflow? Explore these related open-source skills.

모두 보기

openclaw-release-maintainer

Logo of openclaw
openclaw

현지화된 요약: 🦞 # OpenClaw Release Maintainer Use this skill for release and publish-time workflow. It covers ai, assistant, crustacean workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

333.8k
0
인공지능

nextjs-turbopack

[ 추천 ]
Logo of affaan-m
affaan-m

현지화된 요약: Next.js 16+ and Turbopack — incremental bundling, FS caching, dev speed, and when to use Turbopack vs webpack. It covers ai-agents, anthropic, claude workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

169.5k
0
생산성

widget-generator

Logo of f
f

현지화된 요약: Generate customizable widget plugins for the prompts.chat feed system # Widget Generator Skill This skill guides creation of widget plugins for prompts.chat . It covers ai, artificial-intelligence, awesome-list workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf

149.6k
0
인공지능

flags

Logo of vercel
vercel

현지화된 요약: The React Framework # Feature Flags Use this skill when adding or changing framework feature flags in Next.js internals. It covers blog, browser, compiler workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

138.4k
0
브라우저