repo-hygiene

Audits repositories before pull requests for committed data files, hardcoded paths, and tracked artifacts.

1|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/wan-huiyan/claude-ecosystem-hygiene --skill repo-hygiene-wan-huiyan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: repo-hygiene
Source: https://github.com/wan-huiyan/claude-ecosystem-hygiene/tree/main/plugins/repo-hygiene
Command: npx skills add https://github.com/wan-huiyan/claude-ecosystem-hygiene --skill repo-hygiene-wan-huiyan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Data science and analytics repos accumulate costly mistakes before merge: CSV/Parquet files committed to git, hardcoded /Users/ paths, tracked runtime artifacts like .db files, branch ownership confusion, internal docs drifting from deliverables, and client data leaking into public repos. Each of these costs hours to undo after merging. ## Core Features & Use Cases - Pre-PR Checklist: Ten ordered checks covering branch ownership, data files in git, runtime artifacts, hardcoded absolute paths, test plan verification, internal doc consistency, client data sanitization, cross-deliverable number consistency, and direct-push prevention. - Ready-to-Run Commands: Provides concrete bash one-liners using git ls-files, grep, and gh CLI to detect each issue, plus a 30-second combined check to run before every PR. - Repo Audit Mode: When reviewing a published plugin/skill repo, probes live CI status with gh run list and runs the repo's own test suite before reading files, catching issues like malformed semver from sed version bumps. - Use Case: Before running gh pr create on an analytics branch, run the quick check to discover a tracked features.csv and a hardcoded /Users/ path, fix both, then create the PR with verified test results. ## Quick Start Ask the assistant to run the repo-hygiene pre-PR checklist on this repository before creating the pull request.

Frequently Asked Questions about repo-hygiene

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if data files are committed to git?

Run git ls-files piped to grep for extensions like .csv, .parquet, .pkl, .db, and .sqlite. If any match, remove them from tracking with git rm --cached, add the patterns to .gitignore, and provide an export script so others can regenerate the data.

What should I check before creating a pull request?

Verify branch file ownership, no data files or runtime artifacts tracked, no hardcoded absolute paths, test plan items actually executed, internal docs consistent with deliverables, and no client-identifying information. A 30-second combined bash check covers the first four.

How do I remove a file from git tracking but keep it locally?

Use git rm --cached <file> to untrack the file while preserving your local copy, then add its pattern to .gitignore and commit. This works for runtime artifacts like .db files, .env files, and __pycache__ directories.

How do I sanitize client data before pushing to a public repo?

Grep for client names, internal project IDs, employer emails, and specific engagement amounts, then replace them with generic placeholders. Since git history retains old versions, use an orphan branch with a fresh commit and force-push to fully purge sensitive data.

Why does a plugin repo fail version parsing after a version bump?

A sed-based version bump can emit malformed semver with a leading or trailing dot, like .1.9.1 instead of 1.9.1, which fails manifest validation. Check live CI with gh run list and grep all version fields to confirm they match the X.Y.Z pattern.