clean-repos
Find and remove stale entries from repos.yaml whose directories no longer exist on disk
- License 许可
- MIT
- 最近更新
- 2026-09-16
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- clean-repos
- origin
- template
- description
- Find and remove stale entries from repos.yaml whose directories no longer exist on disk
- user-invocable
- true
03 SKILL.md 正文
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: []
- If all entries were stale, leave
-
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. -->
- If no entries remain, restore the placeholder:
-
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"
04 同仓库更多 Skills
update-all-md-docs
Review and update all markdown docs in the repo-of-repos (excluding cloned repos)
sync-template
Pull latest repo-of-repos template updates into this workspace
remove-repository
Remove a repo or local folder from repos/, updating repos.yaml, repos.md, and .gitignore
pull-all-repos
Clone/pull git repos, verify local folders, auto-register orphans, and regenerate repos.md
pr-all-repos
Create PRs in all sub-repos with uncommitted branches, then link them as siblings
implement-plan
Execute a plan from _plans/, implementing steps, checking off tasks, running tests, and documenting fixes