Commit c870cb8
fix(agents): remove empty skill parent dir on unregister (#2017)
When unregistering a SKILL.md-based command (claude, codex, kimi, agy),
the SKILL.md file was unlinked but the now-empty parent directory
(e.g. .claude/skills/speckit-myext-run/) was left behind. After unlinking
the file, attempt rmdir on the parent — a best-effort cleanup that is
silently ignored if the directory is non-empty or already gone.
Add test_unregister_skill_removes_parent_directory to cover this.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 5a152ea commit c870cb8
2 files changed
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
556 | 564 | | |
557 | 565 | | |
558 | 566 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1262 | 1262 | | |
1263 | 1263 | | |
1264 | 1264 | | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
1265 | 1280 | | |
1266 | 1281 | | |
1267 | 1282 | | |
| |||
0 commit comments