Parent
#28
What to build
Add the clean subcommand to the skill-writer script.
skill-writer clean --scope <id> must:
- Remove the git worktree at
~/local/tmp/claude/skill-writer/<scope>/worktree/ (git worktree remove --force)
- Delete the branch
skill-writer/<scope> from the source repo
- Remove the scope directory
~/local/tmp/claude/skill-writer/<scope>/ entirely (rm -rf)
The source repo for the branch deletion must be resolved from the worktree itself (via git -C <worktree> rev-parse --git-common-dir) so clean works without requiring --dir.
Acceptance criteria
Blocked by
Parent
#28
What to build
Add the
cleansubcommand to theskill-writerscript.skill-writer clean --scope <id>must:~/local/tmp/claude/skill-writer/<scope>/worktree/(git worktree remove --force)skill-writer/<scope>from the source repo~/local/tmp/claude/skill-writer/<scope>/entirely (rm -rf)The source repo for the branch deletion must be resolved from the worktree itself (via
git -C <worktree> rev-parse --git-common-dir) socleanworks without requiring--dir.Acceptance criteria
skill-writer clean --scope fooremoves~/local/tmp/claude/skill-writer/foo/entirelyskill-writer/foois deleted from the source repocleanon a non-existent scope produces a clear error on stderr and exits non-zerocleanwhen the worktree is already detached or missing does not crashBlocked by