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 $0.00102 $0.01515
Sonnet 5 $0.00041 $0.00606
Haiku 4.5 $0.00020 $0.00303

Measured 12d ago against content hash 22d26e8c7204, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 12d 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. 12d 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 26d ago), licensed MIT. It adds 204 tokens to every session and 3,031 once invoked, about $0.0010 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 skills, from other repositories

cloudflare-workers-ci-cd

Complete CI/CD guide for Cloudflare Workers using GitHub Actions and GitLab CI. Use for automated testing, deployment pipelines, preview environments, secrets management, or encountering deployment failures, workflow errors, environment configuration issues.

secondsky/claude-skills · 50 tokens

glab

Expert guidance for using the GitLab CLI (glab) to manage GitLab issues, merge requests, CI/CD pipelines, repositories, and other GitLab operations from the command line. Use this skill when the user needs to interact with GitLab resources or perform GitLab workflows.

NikiforovAll/claude-code-rules · 59 tokens

version-bump

This skill automates version bumping during the release process for the Claude Code Handbook monorepo. It should be used when the user requests to bump versions, prepare a release, or increment version numbers across the repository.

NikiforovAll/claude-code-rules · 48 tokens

claude-code-bash-patterns

Claude Code Bash tool patterns with hooks, automation, git workflows. Use for PreToolUse hooks, command chaining, CLI orchestration, custom commands, or encountering bash permissions, command failures, security guards, hook configurations.

secondsky/claude-skills · 52 tokens

commit-push-pr

Full git workflow - creates branch, commits, pushes, and creates or updates a PR with summary and test plan.

sneg55/agent-starter · 28 tokens

commit

Create a single well-crafted git commit from current changes. Analyzes diff, follows repo's commit style, and writes a concise "why not what" message.

sneg55/agent-starter · 35 tokens