AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Git Local Branches Summary

skill-vrallev-agent-skills-git-local-branches-summary · by vRallev

Refresh a Git repository and conservatively identify local branches whose work is already present in the remote default branch, including direct ancestors and patch-equivalent rebases or cherry-picks. Use when cleaning up local branches after pull requests merge, checking branches with deleted or gone upstreams, or auditing which local branches can be removed without losing unique commits; always…

No reviews yet
0 installs
36 views
0.0% view→install

Install

$ agentstack add skill-vrallev-agent-skills-git-local-branches-summary

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-vrallev-agent-skills-git-local-branches-summary)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Git Local Branches Summary? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Git Local Branches Summary

Workflow

  1. Resolve the repository from the user's path or the current directory.
  2. Refresh remote refs and local main or master with the installed git-update skill:

``bash bash "${CODEX_HOME:-$HOME/.codex}/skills/git-update/scripts/git_update.sh" ``

Preserve all staged and unstaged work. If sandboxing blocks Git metadata, rerun with approval. If temporary worktree creation fails because git-lfs is unavailable, rerun the same script with LFS filters disabled only for that process:

``bash GIT_CONFIG_COUNT=3 \ GIT_CONFIG_KEY_0=filter.lfs.process GIT_CONFIG_VALUE_0= \ GIT_CONFIG_KEY_1=filter.lfs.smudge GIT_CONFIG_VALUE_1=cat \ GIT_CONFIG_KEY_2=filter.lfs.required GIT_CONFIG_VALUE_2=false \ bash "${CODEX_HOME:-$HOME/.codex}/skills/git-update/scripts/git_update.sh" ``

  1. Run the bundled read-only audit:

``bash bash scripts/summarize_local_branches.sh [base-ref] ``

Omit base-ref to prefer origin/HEAD, then origin/main, then origin/master.

  1. Report direct-ancestor and patch-equivalent rows as content-safe cleanup candidates. Explain the evidence for each.
  2. Highlight every attached worktree, its path, and whether it is clean. A checked-out branch cannot be deleted until its worktree is removed or detached; a dirty worktree requires explicit user review.
  3. Report that retain and manual-review rows are not safe automatic cleanup candidates. Include their unique-patch or merge-commit counts.

Classification Rules

  • direct-ancestor: the local tip is an ancestor of the refreshed base ref.
  • patch-equivalent: the branch is not an ancestor, has no unique git cherry patches, and contains no merge commits outside the base. This covers ordinary rebases and cherry-picks with unchanged patches.
  • retain: at least one patch is not represented in the base.
  • manual-review: merge commits make patch-ID analysis insufficient.

Treat squash merges whose patch IDs changed as unproven, not safe. Never infer safety merely from a missing remote or [gone] upstream.

Safety

  • Do not delete branches, remove worktrees, detach worktrees, or use git branch -D unless the user explicitly requests it.
  • Exclude local main and master from cleanup candidates.
  • Distinguish content safety from deletion mechanics: Git may reject git branch -d for a patch-equivalent branch even though its patch is present upstream.
  • If refresh fails, report the exact failure and label any subsequent audit as based on stale refs.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.