clean-gone-agent

clean-gone-agent is an agent for Claude Code from pau-vega/Devkit-AI. It costs 149 tokens per session (483 once invoked), scanned A, original, MIT.

A cleanup agent for Git branches that were deleted from the remote repository. A remote repository is the shared copy hosted on a service such as GitHub; a worktree is a separate working copy tied to a branch.

In plain words
What is it for?
Use it to find branches marked as gone, remove their worktrees when needed, delete those local branches, and report what was cleaned up.
Why use it?
It removes stale local branches and their associated worktrees after first refreshing the remote status.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the commit-commands plugin — 1 skill, 3 commands, 3 agents shipped together

Good fit Use it to find branches marked as gone, remove their worktrees when needed, delete those local branches, and report what was cleaned up.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/pau-vega/devkit-ai/clean-gone-agent
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.

Clone the repo
git clone --depth 1 https://github.com/pau-vega/Devkit-AI

Made for: Claude Code.

Or install commit-commands, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 3 agents.

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 clean-gone-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/pau-vega/devkit-ai/clean-gone-agent/github.svg)](https://agentmods.dev/agents/pau-vega/devkit-ai/clean-gone-agent)
Your own site
<a href="https://agentmods.dev/agents/pau-vega/devkit-ai/clean-gone-agent"><img src="https://agentmods.dev/badge/agents/pau-vega/devkit-ai/clean-gone-agent/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 clean-gone-agent

Your own site · 80×15
<a href="https://agentmods.dev/agents/pau-vega/devkit-ai/clean-gone-agent"><img src="https://agentmods.dev/badge/agents/pau-vega/devkit-ai/clean-gone-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 149 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 483 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.00149 $0.00483
Opus 5.5 $0.00060 $0.00193
Sonnet 5.5 $0.00030 $0.00097
Haiku 4.5 $0.00015 $0.00048

Measured 3mo ago against content hash 51511358b126, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

clean-gone-agent 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 3mo 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.

plugins/commit-commands/agents/clean-gone-agent.md · 55 lines

What it actually says

You are a git cleanup agent. Your job is to remove local branches that have been deleted from the remote.

Process

  1. Fetch latest remote state:

    • Run git fetch --prune to update remote tracking references
  2. Identify stale branches:

    • Run git branch -v to list all branches
    • Look for branches marked with [gone] in the tracking status
    • Branches with a + prefix have associated worktrees
  3. Handle worktrees:

    • Run git worktree list to find worktrees
    • For each [gone] branch that has a worktree, remove the worktree first with git worktree remove --force <path>
  4. Delete branches:

    • Delete each [gone] branch with git branch -D <branch-name>
  5. Report result:

    • List which branches and worktrees were removed
    • If no cleanup was needed, report that

Important Notes

  • Always run git fetch --prune first to ensure accurate tracking
  • Remove worktrees before deleting branches that have them
  • This only removes branches already deleted from remote — it's safe to run
  • You can call multiple tools in a single message
  • Do NOT use any tools besides Read, Glob, Grep, and Bash
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. 3mo ago First seen · 55 lines · 149 tokens per session scan A 51511358b126

Subscribe to this mod's changes

clean-gone-agent is an agent published in the GitHub repository pau-vega/Devkit-AI (2 stars, last pushed 3mo ago), licensed MIT. It adds 149 tokens to every session and 483 once invoked, about $0.0006 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.

Related

clean-gone-agent compared with agents from other repositories

clean-gone-agent next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
clean-gone-agentpau-vega/Devkit-AIAgent23mo agoMITA149Claude Code
git-historiansigistry/marketplaceAgent32d agoMITA0Claude Code
semver-advisorsigistry/marketplaceAgent32d agoMITA0Claude Code
conflict-resolversigistry/marketplaceAgent32d agoMITA0Claude Code
catchup-runneroliver-kriska/claude-elixir-phoenixAgent5783d agoMITA63Claude Code
gcp-cloud-architectandisab/swe-marketplaceAgent232d agoMITA47Claude Code
research-report-writerandisab/swe-marketplaceAgent232d agoMITA210Claude Code