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/marcusrbrown/systematic/git-clean-gone-branchesnpx skills add marcusrbrown/systematic --skill git-clean-gone-branchesgit clone --depth 1 https://github.com/marcusrbrown/systematicWrote 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/marcusrbrown/systematic/git-clean-gone-branches)<a href="https://agentmods.dev/skills/marcusrbrown/systematic/git-clean-gone-branches"><img src="https://agentmods.dev/badge/skills/marcusrbrown/systematic/git-clean-gone-branches.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.00070 | $0.00595 |
| Opus 5 | $0.00035 | $0.00298 |
| Sonnet 5 | $0.00014 | $0.00119 |
| Haiku 4.5 | $0.00007 | $0.00060 |
Grade A, and why
git-clean-gone-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 5d 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 — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Clean Gone Branches
Delete local branches whose remote tracking branch has been deleted, including any associated worktrees.
Workflow
Step 1: Discover gone branches
Run the discovery script to fetch the latest remote state and identify gone branches:
When this skill loads, its own directory is stated in the surrounding instructions; set SKILL_DIR to that directory because the scripts live beside this file.
# Resolve helper scripts relative to this skill's directory.
SKILL_DIR="<skill directory stated when this skill loads>";
bash "$SKILL_DIR/scripts/clean-gone"
The script runs git fetch --prune first, then parses git branch -vv for branches marked : gone].
If the script outputs __NONE__, report that no stale branches were found and stop.
Step 2: Present branches and ask for confirmation
Show the user the list of branches that will be deleted. Format as a simple list:
These local branches have been deleted from the remote:
- feature/old-thing
- bugfix/resolved-issue
- experiment/abandoned
Delete all of them? (y/n)
Wait for the user's answer using the platform's question tool (e.g., question in OpenCode, request_user_input in Codex, ask_user in Gemini; in Pi, use the blocking-question extension if available, otherwise present numbered options in chat and wait). If no question tool is available, present the list and wait for the user's reply before proceeding.
This is a yes-or-no decision on the entire list -- do not offer multi-selection or per-branch choices.
Step 3: Delete confirmed branches
If the user confirms, delete each branch. For each branch:
- Check if it has an associated worktree (
git worktree list | grep "\\[$branch\\]") - If a worktree exists and is not the main repo root, remove it first:
git worktree remove --force "$worktree_path" - Delete the branch:
git branch -D "$branch"
Report results as you go:
Removed worktree: .worktrees/feature/old-thing
Deleted branch: feature/old-thing
Deleted branch: bugfix/resolved-issue
Deleted branch: experiment/abandoned
Cleaned up 3 branches.
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.
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.
- 5d ago First seen · 68 lines · 70 tokens per session scan A 721f5e32f7f2
git-clean-gone-branches is a skill published in the GitHub repository marcusrbrown/systematic (24 stars, last pushed yesterday), licensed MIT. It adds 70 tokens to every session and 595 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-30.
Other skills, from other repositories
plan-protocol
Guidelines for creating and managing implementation plans with citations.
plan-review
Criteria for reviewing implementation plans against quality standards.
code-review
Comprehensive code review methodology with severity classification and confidence thresholds.
code-philosophy
Internal logic and data flow philosophy (The 5 Laws of Elegant Defense). Understand deeply to ensure code guides data naturally and prevents errors.
frontend-philosophy
Visual & UI philosophy (The 5 Pillars of Intentional UI). Understand deeply to avoid "AI slop" and create distinctive, memorable interfaces.
opencode-ensemble
Use when coordinating multiple coding agents, delegating independent software work, managing OpenCode Ensemble teams, choosing teammate roles or models, reviewing teammate output, or deciding whether parallel execution is appropriate.