oz-repo-hygiene

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

1|3|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/AIKAGRYA/dharma_swarm --skill oz-repo-hygiene-aikagrya
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: oz-repo-hygiene
Source: https://github.com/AIKAGRYA/dharma_swarm/tree/main/.warp/skills/oz-repo-hygiene
Command: npx skills add https://github.com/AIKAGRYA/dharma_swarm --skill oz-repo-hygiene-aikagrya

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 produces 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. - Stale Map Refresh: Detects documentation and navigation maps untouched for 30+ days while their described surfaces received 20+ commits, and drafts regenerated content inside the triage PR. - Broken Register Aging & Sprawl Report: Updates last_verified fields in the broken register, flags auto-resolvable items, and reports worktree/branch counts against budget. - Use Case: Run a scheduled hygiene pass on the dharma_swarm repo to produce a single dated PR titled 'repo hygiene YYYY-MM-DD' plus a JSON receipt under reports/loop_closure/oz_hygiene/, instead of ad-hoc cleanup commits. ## Quick Start Ask the agent to run a repo hygiene pass that triages open PRs, refreshes stale maps, ages the broken register, and opens one consolidated triage PR with a JSON receipt.

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, or superseded. A PR is stale after 14 days without commits, reviews, or comments, and superseded when another PR touches the same surface with newer commits.

How to detect stale documentation and architecture maps in a repo?▼

A map 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. Refreshed content should be regenerated by the map's generator and clearly marked as generated, never hand-edited between managed markers.

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; anything requiring that authority is listed under a needs-operator section.

What output does a repo hygiene run produce?▼

Each run produces at most one branch and PR (or issue) titled 'repo hygiene YYYY-MM-DD' containing PR triage, stale map refreshes, broken register aging, and sprawl sections. It also writes a JSON receipt under reports/loop_closure/oz_hygiene/ with counts of triaged PRs, refreshed maps, and worktree budget status.

What happens when a hygiene run finds nothing actionable?▼

If nothing is actionable, the skill opens no PR and instead reports 'HYGIENE: clean' along with the counts it checked. It never opens a second PR to finish a run; everything folds into the single queue or a clean report.