git stale branch reporter

    1

    Identify and audit inactive Git branches with commit metadata and merge status suggestions.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    git stale branch reporter

    Example session with this skill installed

    Find all local branches that haven't been touched in over 60 days. Check if they are merged into 'main' and give me a summary of what can be deleted.

    • Read your context and instructions
    • Compiled the git stale branch

    I have analyzed the local branches in your repository that have not had a commit in the last 60 days. I checked these against the 'main' branch to determine their merge status.

    Stale Branch Report (60+ Days)

    Branch NameLast CommitAuthorMergedSuggestion
    feature/old-ui-fix2023-11-12Alice ChenYesSafe to delete
    fix/issue-4022023-12-05Bob SmithYesSafe to delete
    experiment/alpha-test2023-08-20Alice ChenNoConsider deleting (Over 1 year old)
    tmp-debug-logs2024-01-15Charlie DayNoReview: check if still needed
    patch-v1.22023-05-10Bob SmithNoConsider deleting (Over 1 year old)

    Summary:

    • 2 branches are already merged into main and are safe to delete immediately.
    • 3 branches are stale and not merged, including 2 that are over a year old and likely abandoned.

    Next steps

    1. Run git branch -d feature/old-ui-fix fix/issue-402 to safely remove the merged branches.
    2. Review experiment/alpha-test and patch-v1.2 to ensure no critical unmerged code is being lost.
    3. If you want to check remote branches as well, run the command again with the --remote flag.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Repositories accumulate stale branches that clutter the local environment and hide abandoned work. This skill identifies inactive local and remote branches based on custom time thresholds, providing commit metadata and merge status without modifying your repository.

    What it does

    • Staleness detection filters branches by days since the last commit.
    • Merge status checking compares stale branches against a base branch to see if they are safe to prune.
    • Commit metadata retrieval extracts the last author, date, subject, and SHA for every inactive branch.
    • Smart suggestions categorizes branches as safe to delete, orphaned, or requiring manual review.
    • Protected branches excludes core branches like main, master, and develop from results automatically.

    How it works

    1. Run the reporter with a specific day threshold, for example --days 60.
    2. Include the --remote flag to scan tracking branches from your origin.
    3. Specify a --base branch to check which inactive branches are already merged.
    4. Review the generated list, grouped by merge status and suggested actions.

    Frameworks & tools

    This skill uses Python 3.8+ and standard Git CLI. It requires no third-party libraries and works with any valid Git repository.

    Why this beats prompting it yourself

    Writing complex Git log and merge-base commands is error-prone and tedious. This skill encapsulates the logic for date calculations and merge verification in a read-only script, ensuring you never accidentally delete work while auditing your repo.

    Use cases

    • Identify local branches that were merged weeks ago but never deleted.
    • Audit remote branches for work abandoned by former contributors.
    • Prepare a cleanup report before a major release or repository migration.
    • Locate orphaned branches that no longer have an upstream counterpart.

    Known limitations

    Remote branch accuracy depends on your last git fetch. Merge status is checked against only one base branch per execution. Requires Python 3.8+ and Git on the PATH.

    Accuracy of remote branches depends on the last git fetch. Requires Python 3.8+ and Git on the system PATH. Only one base branch can be checked per run.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 3 days ago

    • Free with an Agensi account

    Requires

    Python
    Git

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed3 days ago

    What's inside

    Frequently Asked Questions

    No, this skill is strictly read-only. It generates a detailed audit report and suggests actions, but it will never delete or modify your local or remote branches, ensuring your code remains safe during the audit process.

    The skill uses the standard Git CLI and Python 3.8+, making it compatible with any AI agent that has access to a terminal environment and a local file system, such as AutoGPT, BabyAGI, or custom LangChain agents.

    By default, the skill automatically excludes 'main', 'master', and 'develop'. You can also specify additional branches to protect when running the tool to ensure critical long-lived branches are never flagged as stale.

    You receive the complete Python-based skill source code, documentation for CLI flags, and a guide for integrating the output into your agent's workflow. It is a one-time purchase with all necessary logic included.

    Yes, the skill allows you to define a custom day threshold (e.g., 30, 60, or 90 days). This flexibility ensures the reporter matches your team's specific definition of 'stale' based on your release cycle.

    The skill performs a merge-base comparison against your specified base branch. It will explicitly label branches as 'Merged' (safe to delete) or 'Unmerged' (potential abandoned work), helping you avoid losing progress.

    New in Testing & Debugging