local-branches-status

local-branches-status is a skill for Claude Code, Codex from rlespinasse/agent-skills. It costs 65 tokens per session (2,419 once invoked), scanned A, original, MIT.

A report of local Git branches showing their remote sync state, differences from the main branch, worktree paths, recent activity, and contents. Git branches are separate lines of development in a repository.

In plain words
What is it for?
Use it when onboarding to a repository, resuming work, preparing to push or rebase, checking worktrees, or deciding which branches to clean up.
Why use it?
It gives a single overview of branch health and activity, so you can understand what is current, diverged, or unused before changing branches.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/user/projects/proj-feat-x.

Good fit Use it when onboarding to a repository, resuming work, preparing to push or rebase, checking worktrees, or deciding which branches to clean up.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for local-branches-status

README.md
[![agentmods](https://agentmods.dev/badge/skills/rlespinasse/agent-skills/local-branches-status/github.svg)](https://agentmods.dev/skills/rlespinasse/agent-skills/local-branches-status)
Your own site
<a href="https://agentmods.dev/skills/rlespinasse/agent-skills/local-branches-status"><img src="https://agentmods.dev/badge/skills/rlespinasse/agent-skills/local-branches-status/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for local-branches-status

Your own site · 80×15
<a href="https://agentmods.dev/skills/rlespinasse/agent-skills/local-branches-status"><img src="https://agentmods.dev/badge/skills/rlespinasse/agent-skills/local-branches-status.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,419 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00065 $0.02419
Opus 5 $0.00032 $0.01210
Sonnet 5 $0.00013 $0.00484
Haiku 4.5 $0.00006 $0.00242

Measured 12d ago against content hash f3e1cbbe796d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

local-branches-status scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/local-branches-status/SKILL.md · 220 lines

How it starts

The opening of the file, as written. The whole thing — 220 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Local Branches Status Report

You are helping the user get a comprehensive overview of all local git branches in their repository. The report shows each branch's sync state, divergence from main, worktree usage, last activity, and a brief description of what the branch contains.

When to Use

  • Before deciding which branches to clean up or delete
  • When resuming work after time away from a project
  • Before pushing or rebasing to understand the current state
  • When onboarding to a repository with multiple active branches
  • When reviewing worktree usage across branches

Report Process

Step 1: Gather Branch Data

Collect all branch information in a single shell invocation using the batch loop in Step 3. Do not make N separate tool calls per branch — one loop gathers every column for every branch.

Data collected per branch:

  • Remote sync state (ahead/behind upstream)
  • Divergence from the main branch (ahead/behind)
  • Worktree association (with path)
  • Last activity date
  • Unique commits (commits not on main)
  • Whether this is the current branch (HEAD)

Step 2: Determine the Main Branch

Identify the main branch automatically:

git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@'

If that fails, fall back to checking for main or master.

Step 3: Batch Data Collection

Gather all per-branch data in a single shell loop rather than making separate tool calls for each branch and column. This is critical for efficiency — one invocation collects everything:

main_branch=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo "main")
current_branch=$(git symbolic-ref --short HEAD 2>/dev/null || echo "")
worktree_list=$(git worktree list)

for branch in $(git for-each-ref --format='%(refname:short)' refs/heads/); do
  # Remote sync state
  upstream=$(git for-each-ref --format='%(upstream:short)' "refs/heads/$branch")
  if [ -n "$upstream" ] && git rev-parse --verify "refs/remotes/$upstream" &>/dev/null; then
    counts=$(git rev-list --left-right --count "$upstream...$branch" 2>/dev/null || echo "0 0")
  else
    upstream=""
    counts="no_upstream"
  fi

  # Main branch diff
  if [ "$branch" = "$main_branch" ]; then
    main_diff="—"
  else
    main_diff=$(git rev-list --left-right --count "$main_branch...$branch" 2>/dev/null || echo "0 0")
  fi

  # Last activity
  last_activity=$(git log -1 --format='%cr' "$branch" 2>/dev/null || echo "unknown")

  # Worktree path
  wt_path=$(echo "$worktree_list" | grep "\[$branch\]" | awk '{print $1}')

  # Unique commits summary
  unique=$(git log "$main_branch..$branch" --oneline 2>/dev/null)

  echo "BRANCH:$branch|UPSTREAM:$upstream|COUNTS:$counts|MAIN_DIFF:$main_diff|LAST:$last_activity|WT:$wt_path|CURRENT:$([ "$branch" = "$current_branch" ] && echo yes || echo no)"
  echo "COMMITS:$unique"
  echo "---"
done

Read the full file on GitHub · 220 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 220 lines · 65 tokens per session scan A f3e1cbbe796d

Subscribe to this mod's changes

local-branches-status is a skill published in the GitHub repository rlespinasse/agent-skills (10 stars, last pushed 6d ago), licensed MIT. It adds 65 tokens to every session and 2,419 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

repo-standardizer

Polish any GitHub repository's surface — labels (emoji rating tiers, P0–P3 priority, impact severity), issue forms, PR template, CI workflows, CODEOWNERS, rulesets, docs. Repo meta & config only — no code logic touched. Use when creating a new repo or polishing an existing one.

programmingWTF/repo-standardizer · 70 tokens

conventional-commit

Prompt and workflow for generating conventional commit messages using a structured XML format. Guides users to create standardized, descriptive commit messages in line with the Conventional Commits specification, including instructions, examples, and validation.

aboalrejal-ai/skills · 45 tokens

gentle-ai-collab-perfect

Trigger: contributing to Gentleman-Programming/gentle-ai as an external collaborator. Strict issue-first workflow, honest PR bodies, contributor-vs-maintainer scope, chained-PR strategy, verification protocol, docstring coverage. Load whenever the active repo is Gentleman-Programming/gentle-ai and any part of the…

Gentleman-Programming/gentle-ai · 106 tokens

branch-pr

Create Gentle AI pull requests with issue-first checks. Trigger: creating, opening, or preparing PRs for review.

Gentleman-Programming/gentle-ai · 26 tokens

work-unit-commits

Plan commits as reviewable work units. Trigger: implementation, commit splitting, chained PRs, or keeping tests and docs with code.

Gentleman-Programming/gentle-ai · 33 tokens

chained-pr

Trigger: PRs over 400 lines, stacked PRs, review slices. Split oversized changes into chained PRs that protect review focus.

Gentleman-Programming/gentle-ai · 32 tokens