Repo cleanup

From Qredence/agentic-fleet · View interactive version

Repo cleanup is an AI agent skill from the GitHub repository Qredence/agentic-fleet. - Repository has accumulated unused directories from various AI tools

How to use this skill

Skill file

Repository Cleanup and Git Hygiene

Context

When to use this skill:

Why this matters:

Solution

Step 1: Identify Candidates for Removal

# Check what's in .gitignore but still present locally
git ls-files --others --ignored --exclude-standard | head -50

# Check which directories are gitignored
git check-ignore .data .factory .junie .kilocode .letta .skills .idea report/

# Find directories with sizes
du -sh */ .*/ 2>/dev/null | sort -hr | head -20

Step 2: Untrack Files Already Committed

If files were committed before being added to .gitignore:

# Untrack but keep locally
git rm --cached -r <path>

# Example: untrack .skills/ directory
git rm --cached -r .skills/

This removes from git tracking but preserves local files.

Step 3: Clean GitHub Agentic Workflows Logs

The .github/aw/logs/ directory accumulates run logs. Best practice .gitignore:

# .github/aw/logs/.gitignore
*
!.gitignore

Clean up run directories:

# Check size
du -sh .github/aw/logs/

# Delete run directories (preserves .gitignore)
rm -rf .github/aw/logs/run-*

Step 4: Delete Unused AI Tool Directories

Common AI tool directories that can be safely deleted:

# All are typically gitignored
rm -rf .junie/      # JetBrains AI
rm -rf .idea/       # JetBrains IDE settings
rm -rf .kilocode/   # Kilocode AI tool
rm -rf .factory/    # Factory AI tool
rm -rf .data/       # Legacy cache (use .var/ instead)
rm -rf report/      # Generated jscpd reports

Check before deleting:

Verification

# Verify directories removed
ls -d .junie .idea .kilocode 2>&1  # Should show "No such file"

# Check git status
git status --short

# Check disk space recovered
du -sh .

Pitfalls & Troubleshooting

Problem: git rm --cached shows files as "deleted" in status

Problem: Can't delete directory - permission denied

Problem: Accidentally deleted files you needed

Related Resources

Notes


Last Updated: 2024-12-30

Status: Active

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.