agentleFS
r3bl-orgr3bl-org/r3bl-open-core/.agents/skills/merge-pr/SKILL.md

merge-pr

Skill486 starsChanged 15 days agoApache-2.0View on GitHub

This skill codifies the workflow for taking a completed local task branch, pushing it to GitHub, creating a Pull Request, and merging it via rebase. Use this skill when the user asks to "close the pr by rebasing and merging to main" or explicitly invokes /merge-pr.

  • Deletes or force-pushes
  • Commits and pushes

We split this skill into the rules it gives an agent

4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 14 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill when the user asks to "close the pr by rebasing and merging to main" or explicitly invokes /merge-pr.

    line 13
  2. Distinctive:

    Verify the git working tree is clean.

    line 19
  3. Very specific:

    Delete the local task branch you just merged: git branch -D <branch-name>.

    line 32
  4. Very specific:

    If working in a linked worktree, clean it up from the main repository: git worktree remove <worktree-path>.

    line 33

“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Merge PR Workflow

This skill codifies the workflow for taking a completed local task branch, pushing it to GitHub, creating a Pull Request, and merging it via rebase.

When to Use

Use this skill when the user asks to "close the pr by rebasing and merging to main" or explicitly invokes /merge-pr.

The Workflow

Step 1: Ensure Clean State & Push

  • Verify the git working tree is clean. If not, ask the user to commit or stash changes.
  • Push the current branch to origin using git push -f origin HEAD. We use -f because local commits are frequently amended during code reviews.

Step 2: Merge via Rebase

  • Merge the existing PR into main using the rebase strategy and delete the remote branch: gh pr merge --rebase --delete-branch.
  • This ensures a linear commit history on the main branch without ugly merge commits.

Step 3: Cleanup

  • Switch back to the main branch: git checkout main.
  • Pull the latest changes to sync up with origin: git pull.
  • Prune stale remote tracking branches: git fetch --prune.
  • Delete the local task branch you just merged: git branch -D <branch-name>.
  • If working in a linked worktree, clean it up from the main repository: git worktree remove <worktree-path>.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.