Skip to content

feat(skill-writer): skill-writer clean subcommand #32

@pixelastic

Description

@pixelastic

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

  • skill-writer clean --scope foo removes ~/local/tmp/claude/skill-writer/foo/ entirely
  • Branch skill-writer/foo is deleted from the source repo
  • Running clean on a non-existent scope produces a clear error on stderr and exits non-zero
  • Running clean when the worktree is already detached or missing does not crash

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentReady to be picked up by an agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions