wrap
/wrap
Lands the current branch: commits what's left, rebases, pushes, opens the PR if there is none, and rebase-merges it once checks pass and GitHub reports it ready. Use when asked to wrap up, ship or land the branch. Not for native stacks (split-pr-stack) or Renovate queues (land-renovate).
- Author
- langri-sha ↗
- Repository
- skills ↗
- Licence
- MIT
- Last repository change
- 13.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 13.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Lands the current branch: commits what's left, rebases, pushes, opens the PR if there is none, and rebase-merges it once checks pass and GitHub reports it ready. Use when asked to wrap up, ship or land the branch. Not for native stacks (split-pr-stack) or Renovate queues (land-renovate).
Original author description
Lands the current branch: commits what's left, rebases, pushes, opens the PR if there is none, and rebase-merges it once checks pass and GitHub reports it ready. Use when asked to wrap up, ship or land the branch. Not for native stacks (split-pr-stack) or Renovate queues (land-renovate).
How it works
- Steps
SKILL.md preview
---
name: wrap
description: >-
Lands the current branch: commits what's left, rebases, pushes, opens the PR
if there is none, and rebase-merges it once checks pass and GitHub reports it
ready. Use when asked to wrap up, ship or land the branch. Not for native
stacks (split-pr-stack) or Renovate queues (land-renovate).
---
# Wrap
Commit anything outstanding, rebase, push, and merge the PR once checks are
green. Run it from the feature worktree being landed — never from `main`.
## Steps
1. **Stack guard** — if the `gh-stack` extension is installed
(`gh extension list`), run `gh stack view --json`. Exit 0 means this branch
is part of a native GitHub stack: **stop**. Raw rebase/force-push corrupts
the chain, merging a stacked PR pulls in every unmerged PR below it, and
native stacks cannot be landed with `gh pr merge` or `--admin` at all.
Landing a stack is a separate human-driven step (see the `split-pr-stack`
skill); this skill does not support it yet.
2. **Commit** — if the worktree is dirty, use `/create-commit`. Stop if there
are unrelated changes that shouldn't be bundled in.
3. **Rebase** — resolve the base branch from the open PR when one exists
(`gh pr view --json baseRefName -q .baseRefName`), falling back to `main`;
then fetch and rebase:
```bash
git fetch origin "$BASE_BRANCH"
git rebase "origin/$BASE_BRANCH"
```
Resolve any conflicts before continuing.
4. **Push** — first push uses `-u`; after a rebase use `--force-with-lease`.
5. **PR** — if no open PR exists, use `/create-pr` (skip the interactive
confirmation step). If one already exists, leave it as-is.
6. **Watch checks** — note the head, then wait for its checks to finish:
```bash
gh pr view <number> --json headRefOid -q .headRefOid
gh pr checks <number> --watch
```
Stop if any check failed or was cancelled. Skipped and neutral checks count
as passing: path filters and conditional jobs skip by design.
7. **Merge** — read the merge state GitHub reports, which also covers branch
protection:
```bash
gh pr view <number> --json mergeStateStatus,reviewDecision
```
- `CLEAN` or `HAS_HOOKS`: merge.
```bash
gh pr merge <number> --rebase --match-head-commit <head>
```
- `BLOCKED` with `reviewDecision=REVIEW_REQUIRED`, and every check passed:
the repository requires a review its author can't give. Merge with
`--admin` and say that you did.
```bash
gh pr merge <number> --admin --rebase --match-head-commit <head>
```
- `BEHIND`: the base moved while checks ran; go back to step 3.
- Anything else: stop and report the state.
`<head>` is the SHA from step 6, so the merge fails if anything was pushed
after the checks started.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · langri-sha/skills | 100 | MIT |
| clawnify/greybeard | 100 | MIT |
| egregore-labs/egregore | 100 | MIT |
| egregore-labs/egregore | 100 | MIT |
| hazarsozer/ren-os | 100 | MIT |
| cdeistopened/skill-stack | 90 | MIT |
Database snapshot: 13.11.2026 · package version c0e79ab700cf (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100land-renovate
Batch-lands a repository's open Renovate PRs, oldest first: approves and rebase-merges the green ones, sends conflicting or stale ones back to Renovate's rebase checkbox, and stops on real failures or upgrades that need a coordinated edit. Use when asked to land, merge or clear… - 100rc-git
Moves work onto a branch, pushes, opens a PR; also rebase and conflicts. Use to ship local work. Do not use to commit in place. - 100rebase
Rebases the current feature branch onto the base branch (main/master/develop). Use when the user says "rebase", "sync branch", or "update branch". - 100merge-renovate-prs
Checks open Renovate pull requests in the current repository, reports their state, and merges them one by one, waiting for Renovate to rebase when a merge conflict appears. Use when the user asks to merge renovate PRs, process dependency update PRs, or clear the Renovate queue. - 90sync-branch
Quickly sync current branch with main using rebase. Use when you need to pull latest main into your feature branch, before creating MR or after ongoing work. Fetches main, rebases, auto-stashes changes, optionally force-pushes. - 100rebase
Rebase the current branch with flexible target options. Use when you need to rebase on main, a specific branch, or a remote branch, with intelligent conflict handling.