Repo Ecosystem Hygiene
Use this skill when reviewing .claude/state/repo-ecosystem-hygiene/latest.md or the matching JSON state.
Safety Boundary
The audit is read-only. It reports drift; it does not clean files, update branches, sync remotes, remove worktrees, or post GitHub comments. Treat every remediation action as a separate approved workflow.
Read The Latest Report
UV_CACHE_DIR=.claude/state/uv-cache bash scripts/cron/repo-ecosystem-hygiene-audit.sh
sed -n '1,220p' .claude/state/repo-ecosystem-hygiene/latest.md
Triage Findings
ERROR on a required repo: verify the checkout/upstream state directly, then route through repo-sync or a GitHub issue if the fix needs approval.
WARN on optional or machine-access repos: preserve the evidence, then decide whether to sync, archive, or update config/workstations/registry.yaml.
dirty_worktree, ahead_of_upstream, or behind_upstream: run a direct git status --short --branch in that repo, preserve the output, then route through repo-sync or issue-scoped manual integration.
missing_upstream: do not invent tracking. Record the current branch and remotes, then decide whether the repo should track a remote branch or be marked differently in the registry.
stash_inventory or stale_stash: inspect git stash list --date=iso-strict, preserve any needed patch with an approved workflow, and only drop a stash after explicit disposition.
worktree_drift, stale_worktree, or stale_branch: use the worktree/branch hygiene workflow; never prune/delete from this audit.
registry_disposition_required: do not delete. Add a registry disposition or open an issue with the path, repo state, and recommended owner.
unknown_sibling_residue: identify owner/source first. If it is expected runtime state, add an explicit registry or runtime allowlist; otherwise open a cleanup issue.
registry_policy_gap: reconcile config/workstations/registry.yaml so raw machine access and governed buckets agree.
historical_state_changed_since_prior_comment: preserve the historical source issue/comment context and reconcile registry history before taking cleanup action.
schedule_metadata_mismatch, known_path_model_mismatch, or cron_health_state_missing_or_stale: treat as scheduler/control-plane metadata debt, not repo drift.
Closeout Evidence
When acting on findings, cite:
- the report path and timestamp,
- the affected repo/path,
- the exact finding code,
- the issue or approved workflow used for remediation.
1---2name: repo-ecosystem-hygiene3description: Interpret the daily read-only repo ecosystem hygiene audit and route remediation through approved workflows.4---56# Repo Ecosystem Hygiene78Use this skill when reviewing `.claude/state/repo-ecosystem-hygiene/latest.md` or the matching JSON state.910## Safety Boundary1112The audit is read-only. It reports drift; it does not clean files, update branches, sync remotes, remove worktrees, or post GitHub comments. Treat every remediation action as a separate approved workflow.1314## Read The Latest Report1516```bash17UV_CACHE_DIR=.claude/state/uv-cache bash scripts/cron/repo-ecosystem-hygiene-audit.sh18sed -n '1,220p' .claude/state/repo-ecosystem-hygiene/latest.md19```2021## Triage Findings2223- `ERROR` on a required repo: verify the checkout/upstream state directly, then route through `repo-sync` or a GitHub issue if the fix needs approval.24- `WARN` on optional or machine-access repos: preserve the evidence, then decide whether to sync, archive, or update `config/workstations/registry.yaml`.25- `dirty_worktree`, `ahead_of_upstream`, or `behind_upstream`: run a direct `git status --short --branch` in that repo, preserve the output, then route through `repo-sync` or issue-scoped manual integration.26- `missing_upstream`: do not invent tracking. Record the current branch and remotes, then decide whether the repo should track a remote branch or be marked differently in the registry.27- `stash_inventory` or `stale_stash`: inspect `git stash list --date=iso-strict`, preserve any needed patch with an approved workflow, and only drop a stash after explicit disposition.28- `worktree_drift`, `stale_worktree`, or `stale_branch`: use the worktree/branch hygiene workflow; never prune/delete from this audit.29- `registry_disposition_required`: do not delete. Add a registry disposition or open an issue with the path, repo state, and recommended owner.30- `unknown_sibling_residue`: identify owner/source first. If it is expected runtime state, add an explicit registry or runtime allowlist; otherwise open a cleanup issue.31- `registry_policy_gap`: reconcile `config/workstations/registry.yaml` so raw machine access and governed buckets agree.32- `historical_state_changed_since_prior_comment`: preserve the historical source issue/comment context and reconcile registry history before taking cleanup action.33- `schedule_metadata_mismatch`, `known_path_model_mismatch`, or `cron_health_state_missing_or_stale`: treat as scheduler/control-plane metadata debt, not repo drift.3435## Closeout Evidence3637When acting on findings, cite:3839- the report path and timestamp,40- the affected repo/path,41- the exact finding code,42- the issue or approved workflow used for remediation.