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

Acerca de este Skill

Escenario recomendado: Ideal for AI agents that need マージ済みローカル・リモートブランチの削除. Resumen localizado: 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.

Características

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

# Temas principales

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

Skill Overview

Start with fit, limitations, and setup before diving into the repository.

Escenario recomendado: Ideal for AI agents that need マージ済みローカル・リモートブランチの削除. Resumen localizado: 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.

¿Por qué usar esta habilidad?

Recomendacion: 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

Mejor para

Escenario recomendado: Ideal for AI agents that need マージ済みローカル・リモートブランチの削除.

Casos de uso accionables for delete-merged-branches

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

! Seguridad y limitaciones

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

About The Source

The section below comes from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.

Demo Labs

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 y pasos de instalación

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

? Preguntas frecuentes

¿Qué es delete-merged-branches?

Escenario recomendado: Ideal for AI agents that need マージ済みローカル・リモートブランチの削除. Resumen localizado: 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.

¿Cómo instalo delete-merged-branches?

Ejecuta el comando: npx killer-skills add otomatty/zedi/delete-merged-branches. Funciona con Cursor, Windsurf, VS Code, Claude Code y más de 19 IDE adicionales.

¿Cuáles son los casos de uso de delete-merged-branches?

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

¿Qué IDE son compatibles con delete-merged-branches?

Esta skill es compatible con 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. Usa la CLI de Killer-Skills para una instalación unificada.

¿Tiene limitaciones delete-merged-branches?

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

Cómo instalar este skill

  1. 1. Abre tu terminal

    Abre la terminal o línea de comandos en el directorio de tu proyecto.

  2. 2. Ejecuta el comando de instalación

    Ejecuta: npx killer-skills add otomatty/zedi/delete-merged-branches. La CLI detectará tu IDE o agente automáticamente y configurará la skill.

  3. 3. Empieza a usar el skill

    El skill ya está activo. Tu agente de IA puede usar delete-merged-branches de inmediato en el proyecto actual.

! Source Notes

This page is still useful for installation and source reference. Before using it, compare the fit, limitations, and upstream repository notes above.

Upstream Repository Material

The section below comes from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.

Upstream Source

delete-merged-branches

Install delete-merged-branches, an AI agent skill for AI agent workflows and automation. Explore features, use cases, limitations, and setup guidance.

SKILL.md
Readonly
Upstream Repository Material
The section below comes from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.
Upstream Source

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

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 の取得は行わない。

Habilidades relacionadas

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

Ver todo

openclaw-release-maintainer

Logo of openclaw
openclaw

Resumen localizado: 🦞 # 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
Inteligencia Artificial

widget-generator

Logo of f
f

Resumen localizado: 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

149.6k
0
Inteligencia Artificial

flags

Logo of vercel
vercel

Resumen localizado: 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
Navegador

pr-review

Logo of pytorch
pytorch

Resumen localizado: Usage Modes No Argument If the user invokes /pr-review with no arguments, do not perform a review . It covers autograd, deep-learning, gpu workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

98.6k
0
Desarrollador