8000 chore(skills): land a pull request and take the branch down by dominikwozniak · Pull Request #73 · dominikwozniak/dw-mc · GitHub
[go: up one dir, main page]

Skip to content

chore(skills): land a pull request and take the branch down - #73

Merged
dominikwozniak merged 1 commit into
mainfrom
chore/merge-and-clean-up-skill
Sep 17, 2026
Merged

dominikwozniak merged 1 commit into
mainfrom
chore/merge-and-clean-up-skill

Conversation

@dominikwozniak
Copy link
Copy Markdown
Owner

Landing a pull request is four commands and one trap, and the trap costs a session every time it meets it: gh pr merge finishes by switching the local checkout to main, which this repository's worktree setup refuses, so a merge that went through prints fatal: 'main' is already used by worktree at ... and reads as a failure. The merge-and-clean-up skill writes the sequence down, including that the state of the pull request is what says whether it merged — not the exit code.

What changes

  • .agents/skills/merge-and-clean-up/SKILL.md — wait for the checks, squash-merge, confirm against gh pr view, then fetch --prune, detach onto origin/main and delete the branch. A failing check ends it rather than being merged past, and the worktree itself is never removed.
  • .claude/skills/merge-and-clean-up — the symlink the other skills use.

Test plan

  • pnpm format — pass
  • The sequence in the skill is what landed feat(state): take back the disk, and say goodbye #72 by hand in this session, trap included: the merge reported fatal: 'main' is already used by worktree, gh pr view 72 said MERGED, and fetch --prune plus switch --detach plus branch -D took the branch down on both sides
  • by hand: this pull request is the skill's next run

Risk

Documentation for an agent, with no code path behind it. A skill that is wrong makes a session do the wrong thing by hand, and the wrong thing here is a merge; that is why the skill stops on a red check and confirms the merge against GitHub rather than the exit code.

🤖 Generated with Claude Code

Landing has four commands and one trap: gh finishes a merge by switching the
local checkout to main, which a worktree setup refuses, so the error it prints
is the switch failing rather than the merge. Writing that down means the next
session confirms what happened instead of believing the exit code.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dominikwozniak
dominikwozniak merged commit 44d6cb2 into main Sep 17, 2026
1 check passed
@dominikwozniak
dominikwozniak deleted the chore/merge-and-clean-up-skill branch September 17, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0