clean-gone-agent

clean-gone-agent is an agent for coding agents 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

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

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.

agentmods
npx agentmods add agents/pau-vega/devkit-ai/clean-gone-agent
Clone the repo
git clone --depth 1 https://github.com/pau-vega/Devkit-AI

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00149 $0.00483
Opus 5 $0.00075 $0.00242
Sonnet 5 $0.00030 $0.00097
Haiku 4.5 $0.00015 $0.00048

Measured 4d ago against content hash 51511358b126, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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. 4d 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 19d ago), licensed MIT. It adds 149 tokens to every session and 483 once invoked, about $0.0007 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.

Related

Other agents, from other repositories

plan-review

Use this agent PROACTIVELY after creating implementation plans with /planning:make to review plan quality before execution. Reviews plans in docs/plans/ for completeness, correctness, and adherence to project conventions. If plan file is unclear from context, asks user which plan to review. Context: User just created…

umputun/cc-thingz · 256 tokens

context-engineer

Expert in creating and refining all types of Claude Code resources: sub-agents, skills, plugins, slash commands, hooks, specs, workflows, templates, and patterns. Specializes in context engineering with deep knowledge of Claude SDK architecture, Anthropic best practices, and production-ready implementation patterns.…

andisab/swe-marketplace · 481 tokens

langchain-expert

Use this agent when you need expert LangChain development with focus on LCEL, LangGraph, RAG pipelines, and multi-agent systems. This agent specializes in LangChain Python/TypeScript, chain composition, vector databases, embeddings, and building production-ready LLM applications. Examples: Context: User needs to build…

andisab/swe-marketplace · 400 tokens

nodejs-expert

Use this agent when you need expert Node.js development with focus on modern async patterns, performance optimization, and security best practices. This agent specializes in Node.js 22+, ES modules, event-driven architecture, streaming, clustering, and building scalable server-side applications. Examples: Context…

andisab/swe-marketplace · 391 tokens

python-expert

Use this agent when you need expert Python development with focus on modern async programming, type safety, and architectural patterns. This agent specializes in FastAPI, Pydantic, SQLAlchemy 2.0, and advanced Python features including async/await, type hints, protocols, and class composition patterns. Examples…

andisab/swe-marketplace · 446 tokens

typescript-expert

Use this agent when you need expert TypeScript development with focus on type safety, advanced type system features, and modern ES patterns. This agent specializes in TypeScript 5.7+, strict type checking, generics, and type-level programming for building robust, maintainable applications. Examples: Context: User…

andisab/swe-marketplace · 408 tokens