branch-inspector

Inspect a Git branch against main and output a cleanup action plan.

9|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/Montimage/skills --skill branch-inspector
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: branch-inspector
Source: https://github.com/Montimage/skills/tree/main/skills/branch-inspector
Command: npx skills add https://github.com/Montimage/skills --skill branch-inspector

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Inspects a single Git branch against main to help teams decide whether to delete, archive, open a PR, or keep it. It surfaces a comprehensive overview of identity, activity, diff scope, and staleness, then grounds the decision in the actual changes the branch introduces.

Core Features & Use Cases

  • Branch resolution: Resolves local and remote refs and fetches fresh data to ensure up-to-date context.
  • Comprehensive overview: Presents identity, activity, merge status, diff scope, and staleness signals in a single report.
  • Implementation depth analysis: Reads the diff and commit messages to explain what the branch implements rather than just metrics.
  • Decision guidance with an action plan: Offers four options (delete, archive, open PR, keep) and emits a detailed step-by-step plan for user execution.
  • Safety and governance: Avoids performing destructive actions; only outputs commands for user execution with required safeguards.

Quick Start

Provide the branch name to inspect, for example feature/cleanup.

Frequently Asked Questions about branch-inspector

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decide whether to delete or keep a stale Git branch?

To decide on Git branch cleanup, inspect the branch against main to evaluate its merge status, diff scope, and staleness. This generates an actionable plan recommending whether to delete, archive, open a PR, or keep the branch safely.

What is the best way to analyze a Git branch diff before cleanup?

Analyzing a Git branch diff involves reading commit messages and code changes to explain what the branch implements. This grounds the cleanup decision in actual implementation details rather than just metrics like age or activity.

Can I get a comprehensive overview of local and remote Git branches?

Yes, you can resolve local and remote refs by fetching fresh data to ensure up-to-date context. This builds a comprehensive overview presenting identity, activity, merge status, diff scope, and staleness signals in a single report.

Does this Git branch inspection approach perform destructive deletion actions automatically?

No, this approach avoids performing destructive actions automatically. It only outputs user-actionable commands with required safeguards, ensuring you execute the final delete, archive, or keep decisions manually with safety gates.

How do I create a step-by-step action plan for archiving Git branches?

Creating an action plan for archiving Git branches involves evaluating the branch against main and emitting a detailed step-by-step plan for user execution. The plan includes one of four options: delete, archive, open PR, or keep.

When do I need to fetch fresh Git refs for branch evaluation?

You need to fetch fresh Git refs when evaluating a branch against main to ensure you have up-to-date context. This resolves both local and remote references accurately before analyzing the diff scope and staleness signals.