Script-first deterministic squash merge with strict required-check gating, head-SHA pinning, and reliable attribution/commenting.
Installation
Details
Usage
After installing, this skill will be available to your AI coding assistant.
Verify installation:
npx agent-skills-cli listSkill Instructions
name: merge-pr description: Script-first deterministic squash merge with strict required-check gating, head-SHA pinning, and reliable attribution/commenting.
Merge PR
Overview
Merge a prepared PR only after deterministic validation.
Inputs
- Ask for PR number or URL.
- If missing, use
.local/prep.envfrom the PR worktree.
Safety
- Never use
gh pr merge --autoin this flow. - Never run
git pushdirectly. - Require
--match-head-commitduring merge. - Wrapper commands are cwd-agnostic; you can run them from repo root or inside the PR worktree.
Execution Contract
- Validate merge readiness:
scripts/pr-merge verify <PR>
Backward-compatible verify form also works:
scripts/pr-merge <PR>
- Run one-shot deterministic merge:
scripts/pr-merge run <PR>
- Ensure output reports:
merge_sha=<sha>merge_author_email=<email>comment_url=<url>
Steps
- Validate artifacts
require=(.local/review.md .local/review.json .local/prep.md .local/prep.env)
for f in "${require[@]}"; do
[ -s "$f" ] || { echo "Missing artifact: $f"; exit 1; }
done
- Validate checks and branch status
scripts/pr-merge verify <PR>
source .local/prep.env
scripts/pr-merge treats “no required checks configured” as acceptable ([]), but fails on any required fail or pending.
- Merge deterministically (wrapper-managed)
scripts/pr-merge run <PR>
scripts/pr-merge run performs:
- deterministic squash merge pinned to
PREP_HEAD_SHA - reviewer merge author email selection with fallback candidates
- one retry only when merge fails due to author-email validation
- co-author trailers for PR author and reviewer
- post-merge verification of both co-author trailers on commit message
- PR comment retry (3 attempts), then comment URL extraction
- cleanup after confirmed
MERGED
- Manual fallback (only if wrapper is unavailable)
scripts/pr merge-run <PR>
- Cleanup
Cleanup is handled by run after merge success.
Guardrails
- End in
MERGED, neverCLOSED. - Cleanup only after confirmed merge.
More by openclaw
View allScript-first review-only GitHub pull request analysis. Use for deterministic PR review with structured findings handoff to /prepare-pr.
Script-first PR preparation with structured findings resolution, deterministic push safety, and explicit gate execution.
Fetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]
Generate spectrograms and feature-panel visualizations from audio with the songsee CLI.
