do-clean-repo

Scan and clean repository clutter including stale branches, orphaned worktrees, and build output.

4|1|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/lushly-dev/afd --skill do-clean-repo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: do-clean-repo
Source: https://github.com/lushly-dev/afd/tree/main/.claude/skills/do-clean-repo
Command: npx skills add https://github.com/lushly-dev/afd --skill do-clean-repo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill tackles the accumulation of digital clutter within a code repository, such as stale branches, orphaned worktrees, and unused artifacts, ensuring a more organized and efficient development environment.

Core Features & Use Cases

  • Stale Branch Pruning: Identifies and removes merged or obsolete Git branches.
  • Worktree Cleanup: Detects and removes orphaned or broken Git worktrees.
  • Artifact Removal: Cleans up agent-generated files, build outputs, and dead test files.
  • Use Case: Before a major release, run this Skill in full mode to ensure the repository is free of clutter, improving clarity and reducing potential merge conflicts.

Quick Start

Use the do-clean-repo skill in scan mode to see what needs cleaning.

Frequently Asked Questions about do-clean-repo

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

FAQPage Schema
How do I clean up stale Git branches and orphaned worktrees?

To clean up stale Git branches and orphaned worktrees, you can run this Skill in scan mode to detect them or full mode to prune merged branches and remove broken worktrees after confirming destructive actions.

What is the best way to remove dead test files and agent artifacts from my repository?

The best way to remove dead test files and agent artifacts is using a deep cleanup tool that detects dangling configs and build outputs, offering a scan mode to preview junk before executing a full removal.

Does this repository cleanup tool require Git CLI to run?

Yes, this repository cleanup tool requires Git CLI installed to perform comprehensive analysis, and it optionally uses bot commands to enhance the detection of stale branches and agent artifacts.

Can I scan my codebase for cruft without permanently deleting files?

Yes, you can scan your codebase for cruft without deleting files by using scan mode, which identifies stale branches, orphaned worktrees, and build output without executing any destructive removal actions.

When should I perform deep repo hygiene and branch pruning?

You should perform deep repo hygiene and branch pruning before a major release to ensure the repository is free of clutter, which improves clarity and reduces potential merge conflicts.