Clean Repos
Scan repos/repos.yaml for stale entries — entries whose corresponding repos/<name>/ directory no longer exists on disk — and remove them from the configuration.
Order of Operations
- Parse
repos/repos.yaml— read therepos:list
- If the list is empty, report "Nothing to clean" and stop
- Check each entry — for every entry, check if
repos/<name>/exists on disk
- Collect stale entries — entries where the directory does NOT exist
- If no stale entries found, report "All entries are present on disk. Nothing to clean." and stop
- Show the stale entries — display a table:
| Entry | Type | URL | Status |
|-------|------|-----|--------|
| <name> | git | <url> | Directory missing |
| <name> | local | — | Directory missing |
- Ask for confirmation — "Remove these N entries from the config? (yes/no)"
- If the user says no, stop without changes
- Remove stale entries from
repos/repos.yaml— delete each stale entry from therepos:list
- If all entries were stale, leave
repos: []
- Remove stale entries from
repos/repos.md— for each stale entry, delete its## <name>section and all content up to the next##heading or end of file
- If no entries remain, restore the placeholder:
<!-- No repositories found. Clone repos into repos/ and run /pull-all-repos to populate this file. -->
- Update
.gitignore— for each stale entry, ifrepos/<name>/appears in.gitignore(whether git repo or gitignored local folder), remove the line. No need to ask — stale entries shouldn't leave gitignore debris.
- Report a summary:
| Entry | Type | Action |
|-------|------|--------|
| <name> | git | Removed from repos.yaml, repos.md, .gitignore |
| <name> | local | Removed from repos.yaml, repos.md (and .gitignore if present) |
Notes
- This skill never deletes directories — it only cleans up config for directories that are already gone
- The inverse scenario (directories exist but aren't in config) is handled by
/pull-all-reposorphan detection - Always confirm before making changes — never auto-remove
- Safe to run as a dry-run check: if there are no stale entries, it just reports "nothing to clean"