with one click
housekeeping
// Repo housekeeping — git sync, healthcheck, eager fix-now repairs, and ticket creation for open-ticket findings. Safe to call interactively or from automated sweeps.
// Repo housekeeping — git sync, healthcheck, eager fix-now repairs, and ticket creation for open-ticket findings. Safe to call interactively or from automated sweeps.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | housekeeping |
| description | Repo housekeeping — git sync, healthcheck, eager fix-now repairs, and ticket creation for open-ticket findings. Safe to call interactively or from automated sweeps. |
| user-invocable | true |
| argument-hint | null |
Run full repo housekeeping and act on every finding.
git fetch --all --prune --quiet then git gc --auto. Log if working tree is dirty (do not abort).1a. Beat-skip sweep. If .git/beat-skip.json exists, remove entries where
until is present and until < now. Rewrite the file in place. This
prevents the skip list from accumulating expired entries across beats.
1b. DAG coherence check. Run erg check if available (command tracked in
git-erg/0038) to surface duplicate IDs, dangling Blocked-by refs, and
folder-closure issues. Degrade gracefully if the command is not yet
installed:
bash ERG=${ERG:-tickets/erg} $ERG check tickets/ 2>/dev/null || true
Emit any output as housekeeping warnings; do not abort on non-zero exit.
Healthcheck. Invoke /healthcheck. The probe (project-state.py)
runs once inside healthcheck and covers all checks — do not re-run git
commands already collected there. Parse the Action plan section from
the output: the bold headings **fix-now**, **open-ticket**, **skip**
are the contract interface consumed by steps 3–5 below.
Fix fix-now items. Apply every fix-now item inline. If any fixes were
applied, commit once: chore: housekeeping fixes (sweep).
Ticket open-ticket items. For each open-ticket finding:
fix-tests
(e.g. 0042-fix-tests-module-not-found).Log skip items. One line each, no action.
Timestamp. Update STATE.md to note the housekeeping run UTC date and time, commit it.
Report. Summarize what you did.
When BEAT_HOUSEKEEPING_BRANCH is set in the environment, you are running
under beat.py on a dedicated claude/housekeeping-* branch already cut
from the remote default branch. Behaviour stays the same — commit fix-now
items and the timestamp as usual. Do NOT push or open a PR yourself.
beat.py checks for commits after you exit: if there are none it deletes
the branch; if there are commits it leaves the branch locally as a
"deferred" candidate for human review.
If BEAT_HOUSEKEEPING_BRANCH is unset (interactive /housekeeping), commit
in place as before — no PR detour for hand-typed runs.