auto-cleanup

auto-cleanup is a skill for Claude Code from Jerry0022/dotclaude. It costs 235 tokens per session (6,514 once invoked), scanned A, original, MIT.

A repository cleanup tool that reviews branches, worktrees, and open pull requests in the current project. A worktree is a separate working copy of a Git repository; a pull request is a proposed change waiting to be merged.

In plain words
What is it for?
Use it to inspect stale local branches, abandoned worktrees, unmerged pull requests, and other leftover Git work.
Why use it?
It helps reveal old or unmerged work and confirms whether changes have reached the main branch before cleanup. It presents cleanup choices rather than applying every removal automatically.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions subagents; names the AskUserQuestion tool.

Part of the devops plugin — 18 skills, 12 agents, 9 hooks, 1 MCP server shipped together

Good fit Use it to inspect stale local branches, abandoned worktrees, unmerged pull requests, and other leftover Git work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jerry0022/dotclaude/auto-cleanup
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.

Any agent
npx skills add Jerry0022/dotclaude --skill auto-cleanup
Clone the repo
git clone --depth 1 https://github.com/Jerry0022/dotclaude

Made for: Claude Code.

Or install devops, the plugin that ships this one along with the rest of its 18 skills, 12 agents, 9 hooks, 1 MCP server.

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 auto-cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/jerry0022/dotclaude/auto-cleanup/github.svg)](https://agentmods.dev/skills/jerry0022/dotclaude/auto-cleanup)
Your own site
<a href="https://agentmods.dev/skills/jerry0022/dotclaude/auto-cleanup"><img src="https://agentmods.dev/badge/skills/jerry0022/dotclaude/auto-cleanup/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 auto-cleanup

Your own site · 80×15
<a href="https://agentmods.dev/skills/jerry0022/dotclaude/auto-cleanup"><img src="https://agentmods.dev/badge/skills/jerry0022/dotclaude/auto-cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 235 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,514 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.00235 $0.06514
Opus 5.5 $0.00094 $0.02606
Sonnet 5.5 $0.00047 $0.01303
Haiku 4.5 $0.00023 $0.00651

Measured 11d ago against content hash e25ec937a9d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

auto-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 11d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (gate-contract.test.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/devops/skills/auto-cleanup/SKILL.md · 497 lines

How it starts

The opening of the file, as written. The whole thing — 497 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Auto-Cleanup — Repo Health

Analyze the current project's repository for branch hygiene, unmerged work, and cleanup opportunities. Present results as an interactive concept page with filters and decision controls.

Where this skill sits

The cleanup has an automatic half and this interactive half:

Part Runs Removes
ship_hygiene auto-clean (mcp-server/ship/lib/hygiene.js) after every successful ship: age (a removable leftover older than 3 days), count (more than 5 removable) or disk (kept session worktrees above 10 GB) whatever provably landed: older than 3 days, beyond the newest 5, or — disk — the oldest worktree checkouts (branch kept) (clean session worktrees, their branches, plain branches) — no page, no question; the card's Geprüft line reports it
ship_hygiene nudge after every successful ship or promote, when more than 50 leftovers lie around, at most weekly nothing — the card gets an ⚠ OFFEN item pointing here
this skill on a yes to that item, or a trigger phrase whatever the user ticks on the page, recent items included

The numbers are user settings ({PLUGIN_ROOT}/deep-knowledge/devops-config.md, section cleanup). Scope is the current project — except in the one input mode below.

Input mode: WIP report. On WIP-Report aufräumen / "wip report aufräumen" (the prompt the opt-in WIP watch notification carries), or when invoked for the report, do NOT investigate the current repo: read deep-knowledge/wip-report.md and work ~/.claude/wip-watch/report.json (multi-repo) instead. Steps 0–7 are replaced by loading that file; the page (Step 8) groups the findings per repo, pre-selects each item's suggested action and the user picks per item; Step 10 runs per repo with that repo as cwd, re-verifies every item (tip unchanged) and keeps the Apply-Manifest + Dry-Run-Confirm, the Deletion gate and the SAFETY rules unchanged. Opening the page is the only token-costing step — the report itself came from a zero-token job ({PLUGIN_ROOT}/deep-knowledge/wip-watch.md).

Read the full file on GitHub · 497 lines

Files

What ships with it

7 files 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.

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. 11d ago Changed e25ec937a9d7
  2. 15d ago Changed · +2 lines 7c2925ffd5dc
  3. 18d ago Changed · +16 lines · +9 tokens per session 298d30c1e894
  4. 28d ago Changed · -1 lines 8fa0a6bb8adb
  5. 1mo ago Changed · -211 lines c6403f4888d6
  6. 1mo ago Changed 0c6bab853064
  7. 1mo ago First seen · 691 lines · 226 tokens per session scan A 4b067d4d57c0

Subscribe to this mod's changes

auto-cleanup is a skill published in the GitHub repository Jerry0022/dotclaude (6 stars, last pushed 11d ago), licensed MIT. It adds 235 tokens to every session and 6,514 once invoked, about $0.0009 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-09-26.

Related

auto-cleanup compared with skills from other repositories

auto-cleanup next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
auto-cleanupJerry0022/dotclaudeSkill611d agoMITA235Claude Code
merge-batchdiegosouzapw/OmniRouteSkill83k6d agoMITA46Claude Code
prowler-commitprowler-cloud/prowlerSkill15kyesterdayApache-2.0A44Claude Code, Codex
gh-auth-isolationgithub/gh-awSkill5.6kyesterdayMITA20Claude Code, Codex
github-skillzeenie-ai/OpenCompanySkill1.1kyesterdayMITA51Claude Code
comet-githubrpamis/cometSkill3.3kyesterdayMITA72Claude Code, Codex
release-helperSahir619/fable-methodSkill2.3k1mo agoMITA43Claude Code