candidate-git-hygiene

Audit Git branches, worktrees, and merge conflicts before approving cleanup actions.

Updated Dec 20, 2025
One-click install
npx skills add https://github.com/koala-man-64/helpful-scripts --skill candidate-git-hygiene-koala-man-64
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: candidate-git-hygiene
Source: https://github.com/koala-man-64/helpful-scripts/tree/main/codex-workflow/candidates/skills/git-hygiene-candidate
Command: npx skills add https://github.com/koala-man-64/helpful-scripts --skill candidate-git-hygiene-koala-man-64

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It prevents accidental loss of uncommitted work and uncontrolled repository cleanup by requiring an audit-first, approval-gated process for Git hygiene tasks like stale branch removal, worktree cleanup, and merge-conflict resolution. ## Core Features & Use Cases - Conservative Git Audits: Inspects branches, refs, worktrees, and conflicts before any mutation, preserving uncommitted work. - Approval-Gated Deletion: Requires explicit approval before deleting branches, worktrees, or remote refs, and never force-pushes or bypasses protected review. - Scoped Finish-It Handling: Treats a plain "finish it" request as the current task delivery workflow, staging only task-owned files without expanding into repository-wide pruning. - Use Case: When asked to clean up stale branches after a release, the Skill first audits all branches and worktrees, reports what is safe to remove, and waits for explicit confirmation before deleting anything. ## Quick Start Ask the assistant to audit stale Git branches and worktrees in this repository and propose a cleanup plan for approval.

Frequently Asked Questions about candidate-git-hygiene

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

FAQPage Schema
How do I safely clean up stale Git branches?▼

Audit branches and worktrees first to identify what is stale, then present a cleanup plan and wait for explicit approval before deleting anything. This Skill never deletes branches, worktrees, or remote refs without confirmation.

How to handle merge conflicts during repository cleanup?▼

Inspect the conflicts as part of the audit before attempting any resolution or mutation. Uncommitted work is preserved throughout, and no force-push or protected-review bypass is permitted.

Does a finish-it request trigger a full repository cleanup?▼

No. A plain finish-it request uses the current task delivery workflow: it inspects the task scope, validates changed files, and stages only task-owned work. It does not expand into repository-wide pruning.

Can this Skill delete remote Git refs automatically?▼

No. Deleting branches, worktrees, or remote refs always requires explicit approval after the audit. The Skill also never merges failing checks or deletes unrelated work.

When should I not use a Git hygiene audit workflow?▼

Avoid it for ordinary single-task commits and deliveries, which follow the standard task delivery path instead. The hygiene audit is intended only for explicit cleanup, stale-branch, worktree, or merge-conflict requests.