maintainer-local-clean

maintainer-local-clean is a skill for Claude Code, Codex from ktwu01/benchmark-radar. It costs 41 tokens per session (540 once invoked), scanned A, original, MIT.

A Git cleanup procedure for a maintainer's local checkout after pulling the main branch. It checks branches, worktrees, and remote-tracking references against their GitHub pull requests before removing stale state.

In plain words
What is it for?
It is for pruning merged branches and worktrees, removing stale remote references, checking that worktrees have no uncommitted changes, and reporting branches with no associated pull request.
Why use it?
Git's built-in merged-branch check can be misleading in repositories that squash-merge pull requests. This procedure avoids deleting open work and preserves a local tag for closed, unmerged branches before cleanup.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for pruning merged branches and worktrees, removing stale remote references, checking that worktrees have no uncommitted changes, and reporting branches with no associated pull request.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ktwu01/benchmark-radar/maintainer-local-clean
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 ktwu01/benchmark-radar --skill maintainer-local-clean
Clone the repo
git clone --depth 1 https://github.com/ktwu01/benchmark-radar

Made for: Claude Code, Codex.

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 maintainer-local-clean

README.md
[![agentmods](https://agentmods.dev/badge/skills/ktwu01/benchmark-radar/maintainer-local-clean/github.svg)](https://agentmods.dev/skills/ktwu01/benchmark-radar/maintainer-local-clean)
Your own site
<a href="https://agentmods.dev/skills/ktwu01/benchmark-radar/maintainer-local-clean"><img src="https://agentmods.dev/badge/skills/ktwu01/benchmark-radar/maintainer-local-clean/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 maintainer-local-clean

Your own site · 80×15
<a href="https://agentmods.dev/skills/ktwu01/benchmark-radar/maintainer-local-clean"><img src="https://agentmods.dev/badge/skills/ktwu01/benchmark-radar/maintainer-local-clean.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 540 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.00041 $0.00540
Opus 5.5 $0.00016 $0.00216
Sonnet 5.5 $0.00008 $0.00108
Haiku 4.5 $0.00004 $0.00054

Measured today against content hash 7ff6473ece9c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

maintainer-local-clean 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 today.

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.

skills/maintainer-local-clean/SKILL.md · 43 lines

What it actually says

Maintainer local clean

This repo squash-merges, so a merged branch is not an ancestor of main. Prove merges through GitHub, not through git branch --merged.

Steps

  1. Pull main: git pull --ff-only on main, then git fetch --all --prune.
  2. List candidates: git worktree list, git branch -vv, and git for-each-ref refs/remotes.
  3. For each branch, worktree, or remote-tracking ref, find its PR number (branch name, or gh pr list --state all --head <branch>). Read its state with gh pr view <n> --json state,headRefOid.
  4. Classify:
    • MERGED: remove the local branch, worktree, and tracking ref.
    • CLOSED without merge: when you remove the ref, tag its tip first with git tag legacy/<branch> <ref> (local only, never pushed). Do this automatically and do not list it as a finding. If the ref stays, add no tag.
    • OPEN: keep.
    • star-history (any remote): automation branch. Always keep, never report.
    • Any other branch with no PR: keep, and report it.
  5. Before removing a worktree, check git -C <path> status --short is empty. A worktree whose directory is gone is removed by git worktree prune.
  6. Present the plan and wait for approval. Remove in this order: worktrees, local branches, remote-tracking refs.

Constraints

  • Delete only local state. Never run git push origin --delete unless the maintainer names the remote branch.
  • Keep all tags, including legacy/*.
  • Keep ignored build artifacts (site/*, data/catalog/*, .venv, out/). They regenerate from the build, but a rebuild is slow.
  • Do not touch main, the current branch, or a branch checked out in a worktree you are keeping.
  • If a hook blocks git branch -d or -dr, give the maintainer the exact command to run. Do not bypass the hook with update-ref.
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. today First seen · 43 lines · 41 tokens per session scan A 7ff6473ece9c

Subscribe to this mod's changes

maintainer-local-clean is a skill published in the GitHub repository ktwu01/benchmark-radar (294 stars, last pushed today), licensed MIT. It adds 41 tokens to every session and 540 once invoked, about $0.0002 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-10-16.

Related

Other skills, from other repositories

merge-drive

Carry a long-running conflicted merge of origin/main into a branch that restructured the tree: read the merge state from the index, resolve by class, and hand it to the next session without losing work. Covers the classes git reports as already-resolved (silent resurrections, directory-rename ports, half-landed…

langwatch/langwatch · 154 tokens

haven-play

Try a GitHub PR on this machine with haven pr (own worktree, install, stack on a hostname) or haven pr --throwaway (a throwaway sandbox that destroys itself on quit; formerly haven play). Use when someone says 'try a PR locally', 'haven pr', 'haven play', 'haven pr --throwaway', 'run this PR in a sandbox', 'review a…

langwatch/langwatch · 119 tokens

parallel-pr-review

Use when asked to "review the open PRs", review a batch or stack of pull requests, or run a recurring PR-review pass on a repo — especially with many PRs, stacked branches, conflicts, or security-sensitive changes. Covers grouping, fan-out to review subagents, verdict synthesis, and posting.

suyoumo/ClawProBench · 67 tokens

code-changes

Change the user's own program, on their machine or through GitHub. Use when a request needs a change to the user's code (instrument tracing, wire the SDK, fix the agent behind a failing scenario, add a run parameter to a connected agent, version a hardcoded prompt) and not when the platform alone can do it (create a…

langwatch/langwatch · 84 tokens

github

Open a real pull request. Clone a repo, branch, commit, push, and open a PR authored by the LangWatch app on behalf of the requesting user. Use when the user asks to open a PR, fix something in a repo and submit it, send a patch, raise a pull request, or otherwise land a code change on GitHub.

langwatch/langwatch · 73 tokens

report-publisher

Publish an already validated report to an external release destination.

astandrik/my_instructions · 15 tokens