| name | repo-cleanup |
| description | Systematic cleanup of repository clutter including build artifacts, duplicates, temp files, and consolidation of scattered directories. Use for repository maintenance, artifact removal, directory consolidation, and gitignore updates. |
| version | 2.2.0 |
| updated | "2026-01-20T00:00:00.000Z" |
| category | _internal |
| triggers | ["repository cleanup","artifact removal","temp file cleanup","duplicate files","build artifacts","cache cleanup","directory consolidation","gitignore update","log file cleanup","untracked files"] |
| tags | [] |
| see_also | ["repo-cleanup-version-metadata","repo-cleanup-1-build-artifacts","repo-cleanup-agent-directories","repo-cleanup-common-hidden-folders","repo-cleanup-conflict-resolution-patterns","repo-cleanup-progress-tracking-commands","repo-cleanup-list-untracked-files","repo-cleanup-for-tracked-files-use-git-rm","repo-cleanup-gitignore-updates","repo-cleanup-pre-cleanup","repo-cleanup-folders-to-delete-confirmed-safe","repo-cleanup-structure-section-updates","repo-cleanup-references-to-remove"] |
Repo Cleanup
When to Use
- Repository has accumulated build artifacts and temp files
- Multiple agent/coordination directories scattered in root
- Log files and coverage reports cluttering the workspace
- Need to consolidate prototype code and test outputs
- Preparing for a clean commit or release
- After major refactoring work
- Closing out multi-repo CI/test repair streams where only provider telemetry, skill/audit evidence, quick review logs, or session-state churn remains
Closeout Hygiene Pattern
After CI/test repair work is merged, run a repo-scoped evidence sweep before declaring completion: inventory every dirty path, classify it as durable evidence / tracked recurring telemetry / disposable session churn, secret-scan candidate durable files, stage narrowly, commit/push durable evidence, remove or restore disposable quick artifacts, and capture branch + ahead/behind + clean-status proof for every target repo.
See references/ci-readiness-closeout-hygiene.md for the detailed multi-repo checklist and pitfalls.
Repository Relocation Pattern
When moving whole git repositories between workspace roots or storage mounts, preflight source/destination state, preserve any preexisting destination by timestamped rename, and verify destination git identity before deleting the source. For large or timeout-prone trees, resume with tracked rsync -a --delete, compare source/destination rev-parse HEAD, then remove the source only after verification.
See references/repo-relocation-preserve-and-verify.md for the exact move/resume checklist and reporting format.
Related Skills
- module-based-refactor - For restructuring after cleanup
coordination/session-start-routine/SKILL.md - Session initialization
References
Version History
- 2.2.0 (2026-01-20): Added Benchmark Cleanup and Plan File Archival patterns
- Added Benchmark Artifacts section for handling benchmark directories
- Added Plan Files section for archiving completed specifications
- Added benchmark patterns to .gitignore recommendations