
repo-cleanup
Use when a repository needs cleanup of dead code, build artifacts, unused dependencies, outdated docs, or stale tests - provides safe cleanup workflows, validation steps, and reporting templates for code, deps, docs, tests, and sprint archives.
Use when a repository needs cleanup of dead code, build artifacts, unused dependencies, outdated docs, or stale tests - provides safe cleanup workflows, validation steps, and reporting templates for code, deps, docs, tests, and sprint archives.
Repo Cleanup
Overview
Establish a safe, repeatable cleanup workflow for code, dependencies, docs, tests, and sprint artifacts. Minimize risk by validating usage, archiving before deletion, and verifying with tests.
When to Use
- Repository bloat (generated artifacts, caches, unused files)
- Dead code or unused dependencies suspected
- Docs drifted from actual behavior
- Tests are brittle, redundant, or mislocated
- Sprint closure needs structured archiving
Avoid when:
- Active incident response is ongoing
- The target area lacks owners or rollback coverage
Quick Reference
| Task | Load reference |
|---|---|
| Code cleanup | skills/repo-cleanup/references/code-cleanup.md |
| Dependency cleanup | skills/repo-cleanup/references/deps-cleanup.md |
| Docs cleanup | skills/repo-cleanup/references/docs-cleanup.md |
| Test cleanup | skills/repo-cleanup/references/test-cleanup.md |
| Sprint archive | skills/repo-cleanup/references/archive-sprint.md |
Workflow
- Define scope and safety mode (safe vs aggressive).
- Capture baseline state (git status, key tests, backups).
- Load the relevant reference file(s) for the target area.
- Execute cleanup steps with usage checks before removal.
- Validate changes (tests, build, lint, or doc checks).
- Report outcomes (actions taken, risks, follow-ups).
Output
- Summary of actions and files touched
- Validation results and remaining risks
- Follow-up recommendations or backlog items
Common Mistakes
- Deleting without confirming usage or regenerability
- Skipping baseline tests and rollback checkpoints
- Removing dependencies without updating build/test scripts
- Collapsing docs without preserving entry points
You Might Also Like
Related Skills

create-pr
Creates GitHub pull requests with properly formatted titles that pass the check-pr-title CI validation. Use when creating PRs, submitting changes for review, or when the user says /pr or asks to create a pull request.
n8n-io
electron-chromium-upgrade
Guide for performing Chromium version upgrades in the Electron project. Use when working on the roller/chromium/main branch to fix patch conflicts during `e sync --3`. Covers the patch application workflow, conflict resolution, analyzing upstream Chromium changes, and proper commit formatting for patch fixes.
electron
pr-creator
Use this skill when asked to create a pull request (PR). It ensures all PRs follow the repository's established templates and standards.
google-gemini
clawdhub
Use the ClawdHub CLI to search, install, update, and publish agent skills from clawdhub.com. Use when you need to fetch new skills on the fly, sync installed skills to latest or a specific version, or publish new/updated skill folders with the npm-installed clawdhub CLI.
moltbot
tmux
Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
moltbot
create-pull-request
Create a GitHub pull request following project conventions. Use when the user asks to create a PR, submit changes for review, or open a pull request. Handles commit analysis, branch management, and PR creation using the gh CLI tool.
cline