oz-repo-hygiene

Triages open PRs, stale docs, and branch sprawl into one consolidated review report.

Updated Aug 5, 2026
One-click install
npx skills add https://github.com/AmitabhainArunachala/dharma_swarmv.01 --skill oz-repo-hygiene-amitabhainarunachala
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: oz-repo-hygiene
Source: https://github.com/AmitabhainArunachala/dharma_swarmv.01/tree/main/.warp/skills/oz-repo-hygiene
Command: npx skills add https://github.com/AmitabhainArunachala/dharma_swarmv.01 --skill oz-repo-hygiene-amitabhainarunachala

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Repositories accumulate entropy: stale pull requests, outdated architecture maps, aging broken-item registers, and unmapped branches or worktrees. Manually auditing all of this costs operator time and often results in scattered, unreviewable changes. ## Core Features & Use Cases - PR Triage: Classifies every open PR as merge-ready, needs-review, stale, or superseded using fixed freshness thresholds (14 days stale, superseded detection with cited PR numbers), with one-line justifications for each recommendation. - Stale Map Detection and Refresh: Flags documentation maps untouched for 30+ days while their described surfaces received 20+ commits, and drafts refreshed generated content inside the triage PR. - Broken Register Aging and Sprawl Reporting: Updates last_verified fields in the broken register, flags auto-resolvable items whose repro commands now pass, and reports worktree/branch counts against budget. - Use Case: Run a scheduled weekly hygiene pass on the dharma_swarm repo to produce a single repo hygiene <date> PR containing PR triage, refreshed maps, register aging, and sprawl counts, plus a JSON receipt under reports/loop_closure/oz_hygiene/. ## Quick Start Run the repo hygiene pass on this repository and open one consolidated triage PR with PR classifications, stale map refreshes, broken register aging, and a sprawl report.

Frequently Asked Questions about oz-repo-hygiene

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

FAQPage Schema
How do I triage stale pull requests in a GitHub repository?▼

List open PRs with gh pr list --state open --json number,title,updatedAt,author,labels, then classify each as merge-ready, needs-review, stale (no activity in 14 days), or superseded (a newer PR touches the same surface). Record the justification dates or PR numbers for every classification.

How to detect outdated documentation in a fast-moving codebase?▼

A doc is stale when its last committing change is older than 30 days and git log shows at least 20 commits to the surfaces it describes since then. Refresh stale maps by running their generator or clearly marking drafted content as generated, never hand-editing managed regions.

Can this skill merge or close pull requests automatically?▼

No. It only recommends actions such as merge, review, rebase, or close in a consolidated triage PR or issue. It must never merge, close, or approve PRs, push to protected branches, delete branches, or edit governance files; the operator makes all final decisions.

What happens when a repo hygiene run finds nothing actionable?▼

If nothing is actionable, no PR or issue is opened. The run reports HYGIENE: clean along with the counts checked, and still writes a JSON receipt under reports/loop_closure/oz_hygiene/ recording the triage statistics.

How are git worktrees and branches audited for sprawl?▼

The worktree budget is the active-track count plus one primary tree plus up to two TTL-tagged scratch trees. Any worktrees beyond that budget, or branches with no active-track anchor, are listed in the sprawl section of the report.