repo-hygiene

repo-hygiene is a skill for Claude Code from wan-huiyan/claude-ecosystem-hygiene. It costs 204 tokens per session (3,031 once invoked), scanned A, original, MIT.

A pre-pull-request cleanup checklist for data science and analytics repositories. It checks branch ownership, tracked data, hardcoded paths, runtime files, and other issues before code is handed off or merged.

In plain words
What is it for?
Use it before creating or merging a pull request, handing over an analytics project, or checking whether a repository is clean.
Why use it?
Small repository mistakes can cause merge conflicts, expose data, or leave generated files under version control. The checklist helps catch these problems before they become harder to undo.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/alice/projects/my-analysis.

Part of the repo-hygiene plugin — 1 skill shipped together

Good fit Use it before creating or merging a pull request, handing over an analytics project, or checking whether a repository is clean.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add wan-huiyan/claude-ecosystem-hygiene
Claude Code
/plugin install repo-hygiene

Made for: Claude Code.

Or install repo-hygiene, the plugin that ships this one along with the rest of its 1 skill.

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/wan-huiyan/claude-ecosystem-hygiene/repo-hygiene/github.svg)](https://agentmods.dev/skills/wan-huiyan/claude-ecosystem-hygiene/repo-hygiene)
Your own site
<a href="https://agentmods.dev/skills/wan-huiyan/claude-ecosystem-hygiene/repo-hygiene"><img src="https://agentmods.dev/badge/skills/wan-huiyan/claude-ecosystem-hygiene/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/wan-huiyan/claude-ecosystem-hygiene/repo-hygiene"><img src="https://agentmods.dev/badge/skills/wan-huiyan/claude-ecosystem-hygiene/repo-hygiene.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 204 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,031 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.00204 $0.03031
Opus 5.5 $0.00082 $0.01212
Sonnet 5.5 $0.00041 $0.00606
Haiku 4.5 $0.00020 $0.00303

Measured 3mo ago against content hash 22d26e8c7204, 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 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/repo-hygiene/SKILL.md · 321 lines

How it starts

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

Repo Hygiene

A pre-PR checklist and repo cleanup guide built from real mistakes that cost hours to fix. Every item here came from a real incident where something was committed, merged, and then had to be painfully undone.

When to Use

  • Before running gh pr create
  • Before merging any branch
  • When someone asks "is this repo clean?"
  • When preparing a repo for handover to another team member
  • When you notice data files, absolute paths, or runtime artifacts during any file operation

The Pre-PR Checklist

Run through these checks in order. Each one has burned real teams.

1. Branch Ownership

The problem: You commit deliverable fixes on a feature branch, then need to cherry-pick them onto the correct branch. Cherry-picking commits that touch files across concerns (webapp + deliverables + analysis) creates merge conflicts and duplicated work.

Before your first commit on any branch, answer: "Which files does this branch own?"

Branch type Owns Does NOT own
feature/webapp-* webapp/, tests/, requirements-web.txt deliverables/, analysis/, ANALYSIS_FINDINGS.md
fix/review-* deliverables/, analysis/, ANALYSIS_FINDINGS.md, docs/ webapp/
docs/* docs/, README.md, .md files Code files

Rule: If a commit touches files from two different ownership groups, split it into two commits on two branches. The 5 minutes you spend now saves the 30-minute cherry-pick session later.

This applies to .gitignore too. If branch A adds analysis_runs.db to .gitignore (a webapp concern) and branch B adds data/features_snapshot.csv (a data concern), each .gitignore entry belongs on the branch that owns the related files. Otherwise when branches merge, you get .gitignore conflicts or entries that make no sense without the corresponding code changes.

Red flag: If git diff --stat shows both webapp/ and deliverables/ files, you're probably on the wrong branch for at least some of those changes.

Read the full file on GitHub · 321 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. 3mo ago First seen · 321 lines · 204 tokens per session scan A 22d26e8c7204

Subscribe to this mod's changes

repo-hygiene is a skill published in the GitHub repository wan-huiyan/claude-ecosystem-hygiene (1 stars, last pushed 3mo ago), licensed MIT. It adds 204 tokens to every session and 3,031 once invoked, about $0.0008 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

repo-hygiene compared with skills from other repositories

repo-hygiene next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
repo-hygienewan-huiyan/claude-ecosystem-hygieneSkill13mo agoMITA204Claude Code
cloudflare-workers-ci-cdsecondsky/claude-skillsSkill2578d agoMITA50Claude Code
commit-push-prsneg55/agent-starterSkill774d agoMITA28Claude Code
commitsneg55/agent-starterSkill774d agoMITA35Claude Code
glabNikiforovAll/claude-code-rulesSkill14328d agoApache-2.0A59Claude Code
version-bumpNikiforovAll/claude-code-rulesSkill14328d agoApache-2.0A48Claude Code
claude-code-bash-patternssecondsky/claude-skillsSkill2578d agoMITB52Claude Code