git-tidy

git-tidy is a skill for Claude Code, Codex from CiscoDevNet/essentials. It costs 121 tokens per session (1,548 once invoked), scanned A, original, Apache-2.0.

A Git cleanup skill that inventories local branches, remote branches, and worktrees, then classifies them by whether they are safe to keep, delete, or ask about.

In plain words
What is it for?
Use it to find merged, abandoned, duplicated, or still-active branches and clean up only the items approved for removal.
Why use it?
It removes the need to inspect many branches and their pull-request status manually, while leaving approval decisions to you.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to find merged, abandoned, duplicated, or still-active branches and clean up only the items approved for removal.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ciscodevnet/essentials/git-tidy
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add CiscoDevNet/essentials --skill git-tidy
Clone the repo
git clone --depth 1 https://github.com/CiscoDevNet/essentials

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 git-tidy

README.md
[![agentmods](https://agentmods.dev/badge/skills/ciscodevnet/essentials/git-tidy/github.svg)](https://agentmods.dev/skills/ciscodevnet/essentials/git-tidy)
Your own site
<a href="https://agentmods.dev/skills/ciscodevnet/essentials/git-tidy"><img src="https://agentmods.dev/badge/skills/ciscodevnet/essentials/git-tidy/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 git-tidy

Your own site · 80×15
<a href="https://agentmods.dev/skills/ciscodevnet/essentials/git-tidy"><img src="https://agentmods.dev/badge/skills/ciscodevnet/essentials/git-tidy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 121 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,548 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.00121 $0.01548
Opus 5.5 $0.00048 $0.00619
Sonnet 5.5 $0.00024 $0.00310
Haiku 4.5 $0.00012 $0.00155

Measured 21d ago against content hash 74d66ea7e903, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

git-tidy 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 21d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/audit.sh, scripts/lib.sh, scripts/test_audit.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/ess/git-tidy/SKILL.md · 156 lines

How it starts

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

Git Tidy

Cleaning up branches by hand means running twenty git commands and holding the answers in your head. This skill puts the inventory and the classification in a script, so the only thing left is judgment: which of the ask-first items you actually want gone.

Quick start

skills/ess/git-tidy/scripts/audit.sh          # read-only; writes a report

Then read report.md from the printed directory, present it, and act on what the user approves.

What it decides

Every local branch lands in exactly one category. The disposition column is what you may act on without asking.

Category Meaning Disposition
base The local integration branch itself keep
fresh-start Tip is identical to base: work just begun ask
merged-ancestor Fully contained in base safe, git branch -d
pr-merged-verified Tip matches a merged PR's head commit safe, git branch -D
pr-merged-diverged PR merged, then commits were added ask
pr-open PR still open keep
unmerged-no-pr Work in progress, nothing upstream keep
superseded Contained in another local branch ask

Worktrees: primary, current, locked, dirty, active and active-open-pr are kept or asked about; prunable (directory gone) and stale-merged (clean, work already in base) are safe.

fresh-start is the one that most tools get wrong. A branch sitting exactly on main looks empty and disposable, but it is almost always someone who just ran git checkout -b and has not committed yet. Deleting it destroys intent, not code, which is why it never enters the safe set.

Workflow

1. Audit

Run from inside the target repo. The script only reads; it deletes nothing.

skills/ess/git-tidy/scripts/audit.sh [--base origin/main] [--remote origin]
Flag Use it when
--fetch Remote-tracking refs may be stale
--no-gh Offline, or the repo is not on GitHub
--no-size Worktrees are large and du is slow
--base <ref> The integration branch is not main/master
--output DIR You want the report somewhere specific

Read the full file on GitHub · 156 lines

Files

What ships with it

6 files 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. 21d ago First seen · 156 lines · 121 tokens per session scan A 74d66ea7e903

Subscribe to this mod's changes

git-tidy is a skill published in the GitHub repository CiscoDevNet/essentials (7 stars, last pushed 10d ago), licensed Apache-2.0. It adds 121 tokens to every session and 1,548 once invoked, about $0.0005 per session on Opus 5.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-09-25.

Related

Other skills, from other repositories

reviewing-blogs

Reviews and critiques blog posts in src/content/blog/posts/ against Appwrite's established standards for voice, tone, structure, SEO, formatting, and accuracy. Use when the user asks to review, audit, critique, or improve an existing blog post.

appwrite/appwrite · 55 tokens

create-pr

Creates a GitHub PR with a Linear-ticket-prefixed title and a decision-led, narrative description for Prisma 8. Use when the user wants to create a pull request, open a PR, or submit changes for review.

prisma/orm · 48 tokens

publish-npm-version

Cuts the next release of Prisma 8: bumps the root package.json version (on the v8 RC line: 8.0.0-rc.N → rc.N+1), propagates it to every workspace package, and opens a PR titled "chore(release): bump to ". When the maintainer merges the PR, the Publish to npm workflow runs automatically and ships the new version to npm…

prisma/orm · 182 tokens

triage-contributor-pr

Triage open pull requests from external contributors to prisma/orm and produce a per-PR verdict with evidence. Use when a maintainer asks to triage, evaluate, assess, or review the queue of incoming contributor PRs, to decide whether a fork PR is safe to run CI on, to check whether a PR is in scope for its version…

prisma/orm · 131 tokens

contrib-pr

Open a high-quality external contributor PR against prisma/orm. Use when the user is an outside contributor (not a Prisma maintainer) and wants to submit a change as a pull request from a fork. Encodes the contribution flow from CONTRIBUTING.md so the resulting PR passes review on the first round.

prisma/orm · 65 tokens

review-implement-phase

Implements triaged review actions, commits focused fixes, and posts Done plus resolves threads. Use when the user wants only the implementation phase of the review-framework workflow.

prisma/orm · 38 tokens