Help us improve
Share bugs, ideas, or general feedback.
npx claudepluginhub iamladi/cautious-computing-machine --plugin sdlcHow this skill is triggered — by the user, by Claude, or both
Slash command
/sdlc:finish-branchThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Safety > Completeness > Speed
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
Safety > Completeness > Speed
Clean up a merged feature branch — local branch, worktree, remote refs — without losing any work. The caller expects the PR is merged; you verify that claim before deleting anything, because the only failure mode that matters here is deleting work that wasn't actually on main.
The user ends on main with the branch fully pulled, tests run, the old local branch deleted, the worktree removed if one existed, and stale remote refs pruned. If any precondition fails (branch not merged, dirty working tree, worktree path unresolved), stop and explain what's blocking cleanup rather than force through it.
The sequence is load-bearing: verify → switch → pull → test → delete → prune. Skipping ahead risks losing uncommitted work or deleting an unmerged branch.
$ARGUMENTS — PR number, branch name, or detect from current branch. If ambiguous, ask.gh pr view <n> for PR numbers, git branch -r --merged main for branch names. If the branch isn't merged, halt and report — the caller may have invoked the skill too early, and deleting now would lose commits.git status --porcelain before switching branches. If dirty, stop and show the user what's uncommitted. Auto-stashing hides a surprise from the user; refusing forces them to decide.git checkout main && git pull origin main. If the pull conflicts or fails, halt — the local main is now in an indeterminate state and safer to leave for the user to resolve.package.json / pyproject.toml / Makefile etc. Test failures do not block cleanup (the PR already merged; the regression belongs to main now), but surface them clearly so the user knows to follow up.git branch -d <name> — never -D. The safe delete refuses if git can't prove the branch is merged into the current HEAD; that refusal is exactly the guardrail we want against deleting unreviewed work.git worktree list first to resolve the path, then git worktree remove <path>. Confirming the path before removing prevents deleting the wrong directory when branch names and worktree names drift apart.git remote prune origin to drop the now-deleted remote tracking ref.$ARGUMENTS