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.
npx agentmods add skills/viknesh20-20/claude-code-tool-kit/git-cleanupnpx skills add viknesh20-20/claude-code-tool-kit --skill git-cleanupgit clone --depth 1 https://github.com/viknesh20-20/claude-code-tool-kitWrote 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.
[](https://agentmods.dev/skills/viknesh20-20/claude-code-tool-kit/git-cleanup)<a href="https://agentmods.dev/skills/viknesh20-20/claude-code-tool-kit/git-cleanup"><img src="https://agentmods.dev/badge/skills/viknesh20-20/claude-code-tool-kit/git-cleanup.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00032 | $0.00580 |
| Opus 5 | $0.00016 | $0.00290 |
| Sonnet 5 | $0.00006 | $0.00116 |
| Haiku 4.5 | $0.00003 | $0.00058 |
Grade A, and why
git-cleanup 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Git Repository Cleanup
Current State
!git branch -a 2>/dev/null | head -30
!git remote -v 2>/dev/null
!git stash list 2>/dev/null
Cleanup Steps
Step 1: Identify Merged Branches
List local branches already merged into main/master:
git branch --merged main 2>/dev/null || git branch --merged master 2>/dev/null
Present the list to the user and ask for confirmation before deleting.
Safe to delete (already merged):
git branch -d <branch-name>
Step 2: Identify Stale Remote Branches
Prune remote tracking refs that no longer exist:
git remote prune origin --dry-run
After confirmation:
git remote prune origin
Step 3: Identify Old Unmerged Branches
List branches with no commits in the last 90 days:
git for-each-ref --sort=committerdate --format='%(committerdate:short) %(refname:short)' refs/heads/ | head -20
Never delete unmerged branches without explicit user approval.
Step 4: Clean Up Stashes
List all stashes:
git stash list
For old stashes (>30 days), suggest review and cleanup.
Step 5: Repository Size Analysis
Check for large files:
git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | sort -k3 -n -r | head -20
Step 6: Garbage Collection
git gc --auto
Output
Cleanup Summary
| Action | Count | Status |
|---|---|---|
| Merged branches deleted | X | Done/Pending |
| Stale remote refs pruned | X | Done/Pending |
| Old stashes reviewed | X | Done/Pending |
Branches NOT Deleted (unmerged)
List branches that were skipped with last commit date.
Space Recovered
Before and after repository size (if gc was run).
Rules
- NEVER force-delete (
git branch -D) without explicit user confirmation - NEVER delete main, master, develop, or release branches
- Always show what will be deleted before doing it
- Prefer
--dry-runfirst, then execute
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.
- 3d ago First seen · 93 lines · 32 tokens per session scan A 15fbe84b1ca0
git-cleanup is a skill published in the GitHub repository viknesh20-20/claude-code-tool-kit (7 stars, last pushed 4mo ago), licensed MIT. It adds 32 tokens to every session and 580 once invoked, about $0.0002 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.
Other skills, from other repositories
fleet-manager
Use when managing, triaging, restarting, escalating, or summarizing Codewhale Pod runs and workers.
gh-assign-issues
Use to assign GitHub issues to a milestone and/or owners in bulk, verifying each.
mcp-builder
Design, build, configure, or debug Model Context Protocol servers for codewhale, including stdio and HTTP/SSE transports.
feishu
Work with Feishu or Lark bots, docs, sheets, bitables, approval flows, and OpenAPI/MCP setup without hardcoding credentials.
interview
Ask one useful structured question at a time only when material product/implementation choices are genuinely missing; remember answers and produce a brief/spec. Discoverable facts should be investigated instead of asked.
security-review
Review trust boundaries, auth/authz, injection, secrets, filesystem/network exposure, dependencies, and exploitability without pretending a shallow lint is an audit.