CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

pr-merge

Merge the current branch's PR after confirmation

Quality

71%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Low

Low-risk findings worth noting

Fix and improve this skill with Tessl

tessl review fix ./.agents/skills/pr-merge/SKILL.md
SKILL.md
Quality
Evals
Security

pr-merge

Use this skill when the user asks to run the migrated command pr-merge or invokes $pr-merge.

Command Template

Merge PR

Merge the GitHub PR for the current branch. This is the ONLY authorized path to merge a PR.

Instructions

1. Find the PR

gh pr view --json number,url,title,state,mergeable,mergeStateStatus,reviewDecision,statusCheckRollup \
  --jq '{number, url, title, state, mergeable, mergeStateStatus, reviewDecision, checks: [.statusCheckRollup[]? | {name: .name, status: .status, conclusion: .conclusion}]}'

If no PR exists, stop: "No open PR found for branch $(git branch --show-current)."

2. Check Readiness

Report any blockers:

  • CI status: Are all checks passing? List any failures.
  • Review status: Is it approved, changes requested, or pending?
  • Merge conflicts: Is the branch mergeable?

If there are blockers, report them and stop. Do not proceed.

3. Confirm with User

Present the PR summary and ask for confirmation:

PR #<number>: <title>
CI: ✅ all passing (or ❌ N failing)
Reviews: ✅ approved (or ⚠️ pending / ❌ changes requested)
Conflicts: none (or ⚠️ has conflicts)

Merge method?

Use AskUserQuestion to let the user pick the merge method:

  • Squash merge — single commit on the target branch
  • Rebase merge — replay commits individually
  • Merge commit — traditional merge with merge commit
  • Cancel — abort without merging

4. Merge

gh pr merge <number> --<method> --delete-branch

Where <method> is squash, rebase, or merge based on the user's choice.

5. Report

✅ Merged PR #<number> via <method>
<pr_url>
Branch deleted: <branch>

6. Clean Up Local

git checkout main && git pull --prune

The --prune flag removes local remote-tracking refs for branches deleted on the remote (including the just-merged branch).

Repository

phatblat/dotfiles

Path

.agents/skills/pr-merge/SKILL.md

Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.