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.
git clone --depth 1 https://github.com/KhaledSaeed18/dotclaudeWrote 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/commands/khaledsaeed18/dotclaude/clean-branches)<a href="https://agentmods.dev/commands/khaledsaeed18/dotclaude/clean-branches"><img src="https://agentmods.dev/badge/commands/khaledsaeed18/dotclaude/clean-branches/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.
<a href="https://agentmods.dev/commands/khaledsaeed18/dotclaude/clean-branches"><img src="https://agentmods.dev/badge/commands/khaledsaeed18/dotclaude/clean-branches.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00078 | $0.00860 |
| Opus 5.5 | $0.00031 | $0.00344 |
| Sonnet 5.5 | $0.00016 | $0.00172 |
| Haiku 4.5 | $0.00008 | $0.00086 |
Grade A, and why
clean-branches 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 1mo 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 — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context
Options: $ARGUMENTS
Current branch and remotes:
!git branch --show-current 2>/dev/null
!git remote -v 2>/dev/null | head -4
Task
Identify merged and stale local branches and remove them, after presenting a clear list of what will be deleted and why.
Step 1: Gather branch state
# All local branches with their last commit date and whether they are merged into main/master
git branch -v --merged main 2>/dev/null || git branch -v --merged master 2>/dev/null
# Branches with no corresponding remote-tracking ref (orphaned after remote deletion)
git branch -vv | grep ": gone]"
# All local branches with last commit date, sorted oldest first
git for-each-ref --sort=committerdate refs/heads/ \
--format="%(committerdate:short) %(refname:short) %(upstream:track)"
Step 2: Classify branches for deletion
Candidates for deletion are branches that meet one or more of these criteria:
- Fully merged: the branch tip is reachable from
mainormaster(shown bygit branch --merged). - Remote gone: the tracking remote branch was deleted (shown by
": gone]"ingit branch -vv). - Stale and inactive: last commit is more than 90 days old and the branch has no open remote counterpart.
Protected branches - never delete:
main,master,develop,dev,staging,production- The currently checked-out branch
- Any branch with uncommitted changes (this cannot happen for local branches, but note it as a constraint)
Build two lists:
- Safe to delete: merged or remote-gone branches that are not protected.
- Needs review: stale branches that are not merged and whose remote still exists (present these for manual decision, do not auto-delete).
Step 3: Confirm and act
Present the lists clearly before deleting anything:
Branches to delete (merged or remote-gone):
feature/old-login last commit: 2024-11-03 [merged into main]
fix/typo-in-readme last commit: 2025-01-14 [remote: gone]
Branches for manual review (stale, not merged):
experiment/new-nav last commit: 2024-09-12 [remote still exists]
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.
- 1mo ago Changed · -14 tokens per session 556f6e77e3c6
- 1mo ago First seen · 92 lines · 92 tokens per session scan A 85e2a96aa514
clean-branches is a command published in the GitHub repository KhaledSaeed18/dotclaude (5 stars, last pushed yesterday), licensed MIT. It adds 78 tokens to every session and 860 once invoked, about $0.0003 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-08-31.
Other commands, from other repositories
publish
Publish oh-my-opencode to npm via GitHub Actions workflow.
remove-deadcode
Remove unused code from this project with ultrawork mode, LSP-verified safety, atomic commits.
get-unpublished-changes
Compare HEAD with the latest published npm versions and list all unpublished changes by release layer.
pr
Create a pull request using the git-pushing skill.
pr
Create a Pull Request with an automatic description.
check
Quick health check (git, lint, unit tests).