← ClaudeAtlas

sparse-checkoutlisted

Personally hide files or directories from a git repo's working tree via git sparse-checkout — no .gitignore changes, invisible to teammates. Use whenever the user wants to ignore team-committed paths just for themselves (e.g. .claude/, dist/, generated docs), restore a hidden path, list what's hidden, or undo all hiding. Triggers on "hide X locally", "ignore X locally", "make git stop showing X", "restore hidden files", "what did I hide". Distinct from .gitignore (committed, team-wide) — this is per-clone, reversible, stays private.
mthli/skills · ★ 2 · Data & Documents · score 69
Install: claude install-skill mthli/skills
# sparse-checkout Locally hide files and directories that teammates committed, without modifying any tracked file. The exclusion lives in `.git/info/sparse-checkout`, which is per-clone state — your teammates never see it, and `git push` cannot carry it. ## When to use - Teammates committed personal config / generated output that you don't want in your tree (e.g. `.claude/`, `dist/`, `vendor/`) - You want a private exclusion without proposing a `.gitignore` change to the team - The user asks to restore a previously hidden path, or to see what's currently hidden - The user wants to undo all local hiding ## Mental model Behind the scenes this uses `git sparse-checkout` in **non-cone mode**, which accepts gitignore-style patterns. A typical patterns file looks like: ``` /* !.claude/ !docs/private/ ``` Read as: "include everything at the root, except `.claude/` and `docs/private/`." The patterns file is `.git/info/sparse-checkout`; it lives inside `.git/`, so it's never pushed and never affects anyone else. `git sparse-checkout disable` blows the whole thing away and the clone behaves like a normal one again. ## Operations Use the helper script `scripts/sparse_checkout.py` (relative to this SKILL.md). Resolve its absolute path and run it from anywhere inside the target repo — the script discovers the repo root itself, and path arguments are interpreted relative to that root (not your cwd). | Goal | Command | |---|---| | Hide one or more paths | `python <skill-dir>/scri