repo-hygiene

Automate repository cleanup by identifying orphaned branches, worktrees, session files, and documentation.

3|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/marcoguillermaz/Tierward --skill repo-hygiene-marcoguillermaz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: repo-hygiene
Source: https://github.com/marcoguillermaz/Tierward/tree/main/.claude/skills/repo-hygiene
Command: npx skills add https://github.com/marcoguillermaz/Tierward --skill repo-hygiene-marcoguillermaz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bash, git, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the cleanup of a repository, identifying and reporting on orphaned branches, worktrees, session files, and documentation, then allows for selective removal or archiving based on user confirmation.

Core Features & Use Cases

  • Branch and Worktree Scan: Identifies orphaned and merged branches and worktrees.
  • Session File Staleness Check: Identifies stale .claude/session/*.md files.
  • Initiatives Staleness Check: Identifies stale .claude/initiatives/*.md files.
  • Documentation Orphan Sweep: Identifies orphaned documentation and stale docs/reviews/ snapshots.
  • Selective Execution: Executes cleanup actions only after user confirmation.
  • Use Case: Regularly run this Skill to maintain a clean and organized repository, reducing the risk of issues and improving workflow efficiency.

Quick Start

Use the repo-hygiene skill to perform a full cleanup scan on your repository.

Frequently Asked Questions about repo-hygiene

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

FAQPage Schema
How do I automate git repository cleanup for orphaned branches and stale files?

Automate git repository cleanup by scanning for orphaned branches, worktrees, and stale session files, then selectively removing or archiving them after user confirmation to maintain code health.

What is the best way to identify and remove orphaned git worktrees?

Identify and remove orphaned git worktrees by running an automated repository scan that reports stale worktrees and branches, allowing you to selectively execute cleanup actions to keep your repository organized.

Do I need Bash and Git to run automated repository cleanup scripts?

Yes, you need Bash and Git installed to execute automated repository cleanup scripts, as the process relies on these dependencies to scan and manage orphaned branches, worktrees, and session files.

Can I scan for stale documentation and session files in a Git repository?

Yes, you can scan for stale documentation and session files in a Git repository by identifying orphaned docs, stale review snapshots, and outdated markdown session files for selective removal or archiving.

Does repository cleanup automatically delete merged branches and stale files?

No, repository cleanup does not automatically delete merged branches and stale files; it identifies and reports these items first, executing selective removal or archiving only after explicit user confirmation.

How to regularly maintain code health by cleaning up repository files?

Regularly maintain code health by running periodic repository cleanup scans that identify orphaned branches, worktrees, and stale documentation, then selectively remove or archive the identified items.