repo-hygiene

repo-hygiene is a skill for Claude Code from 0x0w1/jig. It costs 0 tokens per session (1,979 once invoked), scanned A, a copy of jig-repo-hygiene, MIT.

A read-first housekeeping workflow for a long-running Git repository. It finds old branches, stale remote references, mismatched tags or releases, and leftover files, then waits for confirmation before removing anything.

In plain words
What is it for?
Auditing shipped branches, retired workflows, remote references, release records, and installer leftovers.
Why use it?
It reduces repository clutter without assuming that an old-looking branch is safe to delete.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Auditing shipped branches, retired workflows, remote references, release records, and installer leftovers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/0x0w1/jig/repo-hygiene
View source ↗ 0x0w1/jig
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 0x0w1/jig --skill repo-hygiene
Clone the repo
git clone --depth 1 https://github.com/0x0w1/jig

Made for: Claude Code.

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 repo-hygiene

README.md
[![agentmods](https://agentmods.dev/badge/skills/0x0w1/jig/repo-hygiene/github.svg)](https://agentmods.dev/skills/0x0w1/jig/repo-hygiene)
Your own site
<a href="https://agentmods.dev/skills/0x0w1/jig/repo-hygiene"><img src="https://agentmods.dev/badge/skills/0x0w1/jig/repo-hygiene/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 repo-hygiene

Your own site · 80×15
<a href="https://agentmods.dev/skills/0x0w1/jig/repo-hygiene"><img src="https://agentmods.dev/badge/skills/0x0w1/jig/repo-hygiene.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,979 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 98% copy Near-identical to another mod 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.00000 $0.01979
Opus 5.5 $0.00000 $0.00792
Sonnet 5.5 $0.00000 $0.00396
Haiku 4.5 $0.00000 $0.00198

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

Security

Grade A, and why

repo-hygiene scanned grade A with 1 finding 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 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/classify-branches.sh), 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.

Unrestricted tool accesslowExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

- Do not force push, and do not run any command that rewrites history.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Origin

This is a copy

98% identical to jig-repo-hygiene — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/repo-hygiene/SKILL.md · 126 lines

How it starts

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

Repo Hygiene

Use this repository skill to find and clear the debris that builds up in a repository worked through jig. It audits first and always reports; it removes only what the user names.

This is the repository's own housekeeping. For the state of the jig installation, use jig-doctor, which is read-only and never deletes.

Why Merged Branches Look Unmerged

develop-task-flow finishes with git merge --squash, so the task branch tip never becomes an ancestor of develop. Git therefore reports every finished branch as unmerged:

git branch --merged develop     # finds almost nothing
git branch --no-merged develop  # lists work that shipped months ago

Never decide a branch is safe to delete with --merged. Under a squash flow it answers a different question than the one being asked.

A plain diff does not answer it either, in either spelling:

Command What it compares Why it misjudges
git diff develop...<branch> merge base against the branch still shows the branch's own contribution after a squash merge, so finished work reads as unfinished
git diff develop..<branch> the two tips any later unrelated commit on develop makes a finished branch read as unfinished

The supported question is: do all paths changed by the task relative to its unique merge base match the base's current content, type, and mode? Unrelated paths on develop do not matter. Use the read-only classifier relative to this skill directory:

sh scripts/classify-branches.sh [--base develop] [--history-limit 200] [<local-branch>...]

It prints <status>\t<branch>\t<detail> for each branch:

Status Meaning
incorporated changed paths match now
unincorporated definite outstanding content
undecidable insufficient evidence
protected never a deletion candidate

Only incorporated may be offered for explicitly approved deletion. This is content equivalence, not proof of a particular merge commit. It includes an empty task diff. Additions, deletions, and mode/type changes are compared; renames are a deletion plus an addition, so copying only the destination is insufficient.

Read the full file on GitHub · 126 lines

Files

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.

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. 1mo ago Changed · +31 lines b731bbd7ab62
  2. 1mo ago First seen · 95 lines · 0 tokens per session scan A 539e8cd231b1

Subscribe to this mod's changes

repo-hygiene is a skill published in the GitHub repository 0x0w1/jig (5 stars, last pushed 20d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,979 tokens. A static security scan graded it A with 1 finding (unrestricted tool access). It is 98% identical to jig-repo-hygiene, differing in 2 lines, and is treated as a copy.

Related

Other skills, from other repositories

git-ship

An automated Git release workflow that takes code changes through a branch, commit, pull request, review checks, squash merge, and return to the main branch. A pull request is a request to review and merge changes into a shared branch.

oil-oil/git-ship · 273 tokens

worktree-pipeline-skill

Tracker-ticket-to-merged-PR pipeline via git worktrees — sync, plan, adaptive review, /run-plan, code review, PR merge. Triggers: run-worktree-pipeline, worktree pipeline, ticket to PR pipeline, tracker ticket pipeline.

darellchua2/opencode-config-template · 59 tokens

semantic-release-convention-skill

Source of truth for commit-to-PR-to-merge-to-release conventions — semver labels, branch-aware tagging, changelogs, release pipelines.

darellchua2/opencode-config-template · 37 tokens

version-bump-standard-skill

Consistent version bumping and release workflows — dev-to-uat-to-main flow, PR-label-driven semver. Use when setting up or auditing release workflows or onboarding a repo.

darellchua2/opencode-config-template · 43 tokens

git-branch-workflow-setup-skill

Orchestrate dev-to-uat-to-main branch workflow setup during project init — detects need, prompts user via question tool, delegates to repo-ops-specialist-subagent.

darellchua2/opencode-config-template · 45 tokens

git-semantic-commits-skill

Conventional Commits — type, scope, breaking changes, semver guidance, atomic-commit granularity by layer. Triggers: commit and push, make a commit, write a commit message, commit message format, semantic commit. Not for brevity (git-compact-commits-skill).

darellchua2/opencode-config-template · 70 tokens