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.
Best use case
repo-cleanup is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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.
Teams using repo-cleanup should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/repo-cleanup/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How repo-cleanup Compares
| Feature / Agent | repo-cleanup | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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 1. Define scope and safety mode (safe vs aggressive). 2. Capture baseline state (git status, key tests, backups). 3. Load the relevant reference file(s) for the target area. 4. Execute cleanup steps with usage checks before removal. 5. Validate changes (tests, build, lint, or doc checks). 6. 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
Related Skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment - applies TDD to process documentation by testing with subagents before writing, iterating until bulletproof against rationalization
workflow-security-audit
Comprehensive security assessment and remediation. Use for security reviews, compliance checks, vulnerability assessments.
workflow-performance
Systematic performance analysis and optimization. Use when things are slow, need optimization, or preparing for scale.
workflow-feature
Complete feature development workflow from design to deployment. Use when implementing new features or functionality.
workflow-feature-development
Complete workflow for developing new features from design to deployment. Use when starting a new feature, adding functionality, or building something new.
workflow-bug-fix
Systematic approach to identifying, fixing, and validating bug fixes. Use when fixing bugs, resolving issues, or addressing errors.
wiring-audit
User-triggered audit that finds wiring drift between a project's UI surfaces and backend capabilities — orphan surfaces (UI calls endpoints/hooks/procedures that no longer exist), unwired capabilities (backend routes/exports that nothing surfaces), shape drift (both exist but contracts mismatch), method drift (URL matches, HTTP verb does not), validation drift (frontend vs backend rules diverged), permission drift (UI exposes what backend forbids or vice versa), stale labels (UI text references renamed backend concepts), and unsurfaced configuration (env vars or flags that gate behavior with no UI or CLI to control them). This skill should be used when the user asks to "audit our wiring," "find UI/backend drift," "find unwired capabilities," "find stale surfaces," "check for contract violations," "find unused endpoints," "find unused hooks," "what mismatches between UI and backend," or any similar request whose deliverable is a prioritized findings report rather than a descriptive snapshot. Generic across UI frameworks but optimized for React applications (hooks, fetch, react-query, SWR, tRPC, server actions, react-router, Next.js). Not for descriptive architectural snapshots (use architectural-analysis), security audits (use security-auditor), or performance audits (use workflow-performance).
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Use when verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
web-researcher
Use this skill when you need to research a topic online, gather information from multiple sources, or evaluate source credibility. Trigger phrases: 'research', 'find information about', 'look up', 'investigate'. Not for academic systematic reviews (use literature-reviewer) or fact-checking specific claims (use fact-checker).
visual-modes
Use when activating visual showcase modes (supersaiyan, kamehameha, over9000) for UI or interaction design - provides mode-specific enhancement checklists.
vibe-security
Comprehensive secure coding guide covering OWASP web vulnerabilities with prevention patterns and checklists. Use when writing or reviewing web application code to prevent XSS, CSRF, SSRF, SQL injection, access control flaws, and other common security vulnerabilities.
verification-before-completion
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always