branch-hygienelisted
Install: claude install-skill jckeen/dotfiles
# Branch Hygiene
The user has a three-layer auto-hygiene system in `~/dev/dotfiles/`:
## What's already automatic
1. **GitHub-side settings** (set via `gh-bootstrap.sh`): every repo has
`delete_branch_on_merge=true`, `allow_auto_merge=true` (Git Pro),
`allow_update_branch=true`, and a squash-only merge policy with
`squash_merge_commit_title=PR_TITLE` / `squash_merge_commit_message=PR_BODY`.
2. **Daily systemd timer** (`git-hygiene.timer`, fires 09:30 local) — runs
`gh-bootstrap.sh --check --all ~/dev` and writes drift state to
`~/.local/state/hygiene/status.json`. On Sundays it also runs
`git-hygiene.sh clean ~/dev --yes` to delete locally-merged branches.
3. **Shell `gh` wrapper** in `.bash_aliases` — when the user runs
`gh repo create` or `gh repo clone` from their shell, the wrapper auto-runs
`gh-bootstrap.sh` on the new repo. Note: this only fires from the user's
interactive shell, not from agent-spawned shells.
## Workflow
When the user asks about hygiene state:
1. Read `~/.local/state/hygiene/status.json` first — it's the cached daily
check. Use `~/dev/dotfiles/hygiene-status.sh --status` for a one-liner or
`--text` for a full readout. This is read-only and instant.
2. If the user wants a fresh check, run
`~/dev/dotfiles/gh-bootstrap.sh --check --all ~/dev`.
3. To clean stale local branches now (instead of waiting for Sunday):
`~/dev/dotfiles/git-hygiene.sh clean ~/dev --yes`.
4. To bootstrap a new or drifted repo:
`~/dev/