Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/dvallier-ai-merge-pr
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
merge-pr- Description
- Merge a GitHub PR via squash after /prepare-pr. Use when asked to merge a ready PR. Do not push to main or modify code. Ensure the PR ends in MERGED state and clean up worktrees after success.
- License
- MIT
- Instructions
- 301 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- name: "merge-pr" does not match folder "merge-pr-v1"
Files (2)
- SKILL.md
- openai.yaml · agents/
SKILL.md (first lines)
# Merge PR
## Overview
Merge a prepared PR via deterministic squash merge (`--match-head-commit` + explicit co-author trailer), then clean up the worktree after success.
## Inputs
- Ask for PR number or URL.
- If missing, use `.local/prep.env` from the worktree if present.
- If ambiguous, ask.
## Safety
- Use `gh pr merge --squash` as the only path to `main`.
- Do not run `git push` at all during merge.
- Do not use `gh pr merge --auto` for maintainer landings.
- Do not run gateway stop commands. Do not kill processes. Do not touch port 18792.
## Execution Rule
- Execute the workflow. Do not stop after printing the TODO checklist.
- If delegating, require the delegate to run commands and capture outputs.
## Known Footguns
- If you see "fatal: not a git repository", you are in the wrong directory. Move to the repo root and retry.
- Read `.local/review.md`, `.local/prep.md`, and `.local/prep.env` in the worktree. Do not skip.
- Always merge with `--match-head-commit "$PREP_HEAD_SHA"` to prevent racing stale or changed heads.
- Clean up `.worktrees/pr-<PR>` only after confirmed `MERGED`.
## Completion Criteria
- Ensure `gh pr merge` succeeds.
- Ensure PR state is `MERGED`, never `CLOSED`.
- Record the merge SHA.
- Leave a PR comment with merge SHA and prepared head SHA, and capture the comment URL.
- Run cleanup only after merge success.
## First: Create a TODO Checklist
Create a checklist of all merge steps, print it, then continue and execute the commands.
## Setup: Use a Worktree
Use an isolated worktree for all merge work.
```sh
repo_root=$(git rev-parse --show-toplevel)
cd "$repo_root"
gh auth status
WORKTREE_DIR=".worktrees/pr-<PR>"
cd "$WORKTREE_DIR"
```
Run all commands inside the worktree directory.
## Load Local Artifacts (Mandatory)
Expect these files from earlier steps:
- `.local/review.md` from `/review-pr`
- `.local/prep.md` from `/prepare-pr`
- `.local/prep.env` from `/prepare-pr`
```sh
ls -la .local || true
for required in .local/review.md .local/prep.md .local/prep.env; do
if [ ! -f "$required" ]; then
echo "Missing $required. Stop and run /review-pr then /prepare-pr."
exit 1
fi
done
sed -n '1,120p' .local/review.md
sed -n '1,120p' .local/prep.md
source .local/prep.env
```
## Steps
1. Identify PR meta and verify prepared SHA still matches
```sh
pr_meta_json=$(gh pr view <PR> --json number,title,state,isDraft,author,headRefName,headRefOid,baseRefName,headRepository,body)
printf '%s\n' "$pr_meta_json" | jq '{number,title,state,isDraft,author:.author.login,head:.headRefName,headSha:.headRefOid,base:.baseRefName,headRepo:.headRepository.nameWithOwner,body}'
pr_title=$(printf '%s\n' "$pr_meta_json" | jq -r .title)
pr_number=$(printf '%s\n' "$pr_meta_json" | jq -r .number)
pr_head_sha=$(printf '%s\n' "$pr_meta_json" | jq -r .headRefOid)
contrib=$(printf '%s\n' "$pr_meta_json" | jq -r .author.login)
is_draft=$(printf '%s\n' "$pr_meta_json" | jq -r .isDraft)
if [ "$is_draft" = "true" ]; then
echo "ERROR: PR is draft. Stop and run /prepare-pr after draft is cleared."
exit 1
fi
if [ "$pr_head_sha" != "$PREP_HEAD_SHA" ]; then
echo "ERROR: PR head changed after /prepare-pr (expected $PREP_HEAD_SHA, got $pr_head_sha). Re-run /prepare-pr."
exit 1
fi
```
2. Run sanity checks
Stop if any are true:
- PR is a draft.
- Required checks are failing.
- Branch is behind main.
If checks are pending, wait for completion before merging. Do not use `--auto`.
If no required checks are configured, continue.
```sh
gh pr checks <PR> --required --watch --fail-fast || true
checks_json=$(gh pr checks <PR> --required --json name,bucket,state 2>/tmp/gh-checks.err || true)From dvallier-ai/autolab-public, MIT.
More from dvallier-ai/autolab-public
- 0.390score
1password
dvallier-ai
Set up and use 1Password CLI (op).
SkillDFreshness: DClaude Code +9 - 0.385score
bluebubbles
dvallier-ai
Use when you need to send or manage iMessages via BlueBubbles (recommended iMessage integration).
SkillDFreshness: DClaude Code +9 - 0.385score
apple-notes
dvallier-ai
Manage Apple Notes via the `memo` CLI on macOS (create, view, edit, delete, search, move, and export notes).
SkillDFreshness: DClaude Code +9 - 0.382score
prose
dvallier-ai
OpenProse VM skill pack.
SkillDFreshness: DClaude Code +9 - 0.382score
apple-reminders
dvallier-ai
Manage Apple Reminders via the `remindctl` CLI on macOS (list, add, edit, complete, delete).
SkillDFreshness: DClaude Code +9 - 0.227score
blogwatcher
dvallier-ai
Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
SkillDFreshness: DClaude Code +9 - 0.227score
blucli
dvallier-ai
BluOS CLI (blu) for discovery, playback, grouping, and volume.
SkillDFreshness: DClaude Code +9 - 0.225score
bear-notes
dvallier-ai
Create, search, and manage Bear notes via grizzly CLI.
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Feb 16, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/dvallier-ai/autolab-public
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.406score
merge-pr
LongIV999
Merge a GitHub PR via squash after /prepare-pr.
SkillDFreshness: DClaude Code +9 - 0.243score
merge-pr
lalomorales22
Merge a GitHub PR via squash after /prepare-pr.
SkillDFreshness: DClaude Code +9 - 0.243score
merge-pr
loveoplay2023-hue
Merge a GitHub PR via squash after /prepare-pr.
SkillDFreshness: DClaude Code +9 - 0.243score
merge-pr
OPDhaker
Merge a GitHub PR via squash after /prepare-pr.
SkillDFreshness: DClaude Code +9 - 0.243score
merge-pr
Rachasumanth
Merge a GitHub PR via squash after /prepare-pr.
SkillDFreshness: DClaude Code +9 - 0.243score
merge-pr
RobbyMo81
Merge a GitHub PR via squash after /prepare-pr.
SkillDFreshness: DClaude Code +9
More from dvallier-ai
- 0.390score
1password
dvallier-ai
Set up and use 1Password CLI (op).
SkillDFreshness: DClaude Code +9 - 0.385score
apple-notes
dvallier-ai
Manage Apple Notes via the `memo` CLI on macOS (create, view, edit, delete, search, move, and export notes).
SkillDFreshness: DClaude Code +9 - 0.385score
bluebubbles
dvallier-ai
Use when you need to send or manage iMessages via BlueBubbles (recommended iMessage integration).
SkillDFreshness: DClaude Code +9 - 0.382score
apple-reminders
dvallier-ai
Manage Apple Reminders via the `remindctl` CLI on macOS (list, add, edit, complete, delete).
SkillDFreshness: DClaude Code +9 - 0.382score
prose
dvallier-ai
OpenProse VM skill pack.
SkillDFreshness: DClaude Code +9
Cite this page
merge-pr skill. Agent Mart. https://agentmart.dev/skills/dvallier-ai-merge-pr (last updated 2026-10-24)