agentleFS
abipalliabipalli/agent-skills/skills/merge/SKILL.md

merge

Skill1 starsChanged 19 days agoApache-2.0View on GitHub

Approve and squash-merge a GitHub PR with no extra comments. Use for \"/merge\", \"approve and merge\", \"merge this PR\".

62 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use addskill, apply-firmware and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ryanportfolioSkill

    addskill

    Create, import, update, or install repo or personal skills: runtime ownership, resources, discovery checks.

    Also in 6 projects that use this

  • ryanportfolioSkill

    apply-firmware

    Bring current folder (plain folder, existing repo, old or partial firmware copy) up to full Harness Firmware in place. Mirror external repo → adopt-repo.

    Also in 6 projects that use this

  • +10 more from ryanportfolio

The file

Show its rules and text

We split this skill into the rules it gives an agent

22 rules. 0 are common, 13 are distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 54 edited versions we read keep these.

  • 13

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Use this skill to approve a GitHub pull request without adding review comments, then squash-merge it through GitHub.

    line 8
  2. Very specific:

    Treat /merge as explicit permission to approve and merge the target PR.

    line 13
  3. Distinctive:

    Do not perform a fresh code review unless the user explicitly asks for one.

    line 14
  4. Very specific:

    Use the GitHub CLI (gh) and GitHub's branch protection rules.

    line 15
  5. Distinctive:

    Keep the PR clean: never add a top-level approval comment such as "LGTM" or a summary paragraph.

    line 17
  6. Distinctive:

    Always use squash-and-merge.

    line 19
  7. Distinctive:

    Ask a question only when the target PR is genuinely ambiguous.

    line 21
  8. Very specific:

    If the user supplied a PR URL, PR number, or owner/repo#number, use it.

    line 33
  9. Distinctive:

    If this fails because there is no PR for the current branch, ask the user which PR to merge.

    line 40
  10. Distinctive:

    Stop and report clearly if the PR is closed, already merged, or still a draft.

    line 53
  11. Distinctive:

    If checks are failing or GitHub reports conflicts, do not approve-and-merge.

    line 54
  12. Very specific:

    Always merge with --squash.

    line 63
  13. Distinctive:

    Check that squash merge is allowed:

    line 66
  14. Very specific:

    If squash merge is not allowed for the repository, stop and report that blocker.

    line 72
  15. Very specific:

    Do not fall back to --merge or --rebase.

    line 73
  16. Very specific:

    Do not pass --body. If you need to use the API instead, send "body": "".

    line 83
  17. Distinctive:

    If GitHub rejects the approval because the authenticated user authored the PR or has already approved it, do not invent a workaround …

    line 85
  18. Distinctive:

    Use a non-interactive squash merge command:

    line 92
  19. Distinctive:

    If GitHub refuses immediate merge only because required checks are still pending, enable squash auto-merge:

    line 98
  20. Very specific:

    Do not pass --delete-branch.

    line 105
  21. Very specific:

    Do not use --admin unless the user explicitly asked to bypass branch protection.

    line 108
  22. Distinctive:

    Keep the response factual and short.

    line 122

“Common” is measured: kept by at least 6 in 10 of the 54 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

Use this skill to approve a GitHub pull request without adding review comments, then squash-merge it through GitHub.

Operating Model

  • Treat /merge as explicit permission to approve and merge the target PR.
  • Do not perform a fresh code review unless the user explicitly asks for one.
  • Use the GitHub CLI (gh) and GitHub's branch protection rules. Do not bypass protections with admin privileges unless the user explicitly requests it.
  • Keep the PR clean: never add a top-level approval comment such as "LGTM" or a summary paragraph. Approval is conveyed by the review event itself.
  • Always use squash-and-merge. Do not use merge commits or rebase merges, and do not ask the user to choose a merge method.
  • Ask a question only when the target PR is genuinely ambiguous.

Required Tools

  • gh CLI authenticated with permission to review and merge the target PR
  • git when resolving the current branch's PR
  • Network access to GitHub

Workflow

1. Resolve The Target PR

If the user supplied a PR URL, PR number, or owner/repo#number, use it. If they only invoked /merge, resolve the PR from the current branch:

gh pr view --json number,url,title,state,isDraft,headRefName,baseRefName

If this fails because there is no PR for the current branch, ask the user which PR to merge. If multiple repositories or PRs are plausible, ask for the exact target instead of guessing.

2. Inspect Merge Readiness

Fetch enough metadata to avoid surprising the user:

gh pr view <selector> \
  --json number,url,title,state,isDraft,mergeable,mergeStateStatus,reviewDecision,statusCheckRollup,headRefOid,headRefName,baseRefName

Stop and report clearly if the PR is closed, already merged, or still a draft. If checks are failing or GitHub reports conflicts, do not approve-and-merge; explain the blocker in the final response.

Pending required checks are different from failures. If GitHub will not merge immediately only because required checks are pending, enable auto-merge after approval instead of polling indefinitely.

3. Require Squash Merge

Always merge with --squash. This keeps /merge predictable and avoids changing the repository history style from one invocation to the next.

Check that squash merge is allowed:

gh repo view --json squashMergeAllowed

If squash merge is not allowed for the repository, stop and report that blocker. Do not fall back to --merge or --rebase.

4. Approve With No Comment

Submit an approval review with an empty body:

gh pr review <selector> --approve

Do not pass --body. If you need to use the API instead, send "body": "".

If GitHub rejects the approval because the authenticated user authored the PR or has already approved it, do not invent a workaround comment. Continue to the merge step only if GitHub permits the merge, and tell the user exactly what happened.

5. Merge

Use a non-interactive squash merge command:

gh pr merge <selector> --squash

If GitHub refuses immediate merge only because required checks are still pending, enable squash auto-merge:

gh pr merge <selector> --squash --auto

Do not pass --delete-branch. Branch cleanup is outside this skill's scope because it adds an extra operation and can fail independently of the merge.

Do not use --admin unless the user explicitly asked to bypass branch protection.

6. Confirm The Result

Return a concise final response with:

  • PR title or number and link
  • Whether approval was submitted, skipped because already present, or rejected by GitHub
  • Whether the PR was merged immediately or auto-merge was enabled
  • Squash merge was used
  • That branch deletion was not attempted

Keep the response factual and short. Do not paste command transcripts unless the user asks for them.

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.