Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
callstackincubator avatar

Github

  • 6.5k installs
  • 1.6k repo stars
  • Updated July 25, 2026
  • callstackincubator/agent-skills

A skill providing gh CLI patterns for GitHub PR management, including stacked PR merging, squash merges, rebasing, and branch automation.

About

This skill provides patterns and commands for managing GitHub pull requests via the gh CLI, covering PR creation, squash merging, and the full stacked PR workflow. Developers use it when working with chains of dependent branches that must be merged into main as individual squash commits. The stacked PR workflow involves merging the first PR, then rebasing each subsequent branch onto main, updating its base, and squash merging. Conflicts during rebase stop the automation and prompt the user to resolve manually. The skill explicitly favors gh CLI over GitHub MCP servers to reduce context usage.

  • Uses gh CLI for all GitHub operations to minimize context overhead compared to MCP servers
  • Provides a stacked PR merge workflow: squash-merge first PR, then rebase each subsequent branch onto main before merging
  • Supports force-with-lease push after rebase to safely update remote branches
  • Includes gh pr checks and gh pr status commands for inspecting PR state before merging
  • References a dedicated stacked-pr-workflow.md for full step-by-step merge chain instructions

Github by the numbers

  • 6,457 all-time installs (skills.sh)
  • +281 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #15 of 739 Git & Pull Requests skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

github capabilities & compatibility

Capabilities
create pull requests via gh cli · squash merge prs with custom titles · rebase stacked branches onto main · update pr base branch · check pr status and ci results · force push rebased branches safely
Works with
github
Use cases
code review · devops · ci cd
Platforms
macOS · Linux · WSL · Windows
Runs
Runs locally
Pricing
Free
From the docs

What github says it does

Use `gh` CLI for all GitHub operations. Prefer CLI over GitHub MCP servers for lower context usage.
SKILL.md
git rebase --onto origin/main <old-base-branch> <next-branch> git push --force-with-lease origin <next-branch>
SKILL.md
npx skills add https://github.com/callstackincubator/agent-skills --skill github

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs6.5k
repo stars1.6k
Security audit2 / 3 scanners passed
Last updatedJuly 25, 2026
Repositorycallstackincubator/agent-skills

What it does

Automate GitHub PR workflows including stacked PR merging, squash merges, and branch rebasing using the gh CLI.

Who is it for?

Developers managing feature branches with stacked PRs or complex merge strategies in GitHub repositories.

Skip if: Teams using GitHub MCP servers as the primary integration layer or workflows requiring GUI-based PR management.

When should I use this skill?

Working with stacked PRs, needing to squash-merge a chain of branches into main, or automating routine GitHub repository operations via CLI.

What you get

Developers can create, check, rebase, and squash-merge stacked PRs into main as clean individual commits with minimal manual intervention.

  • Squash-merged PRs as clean individual commits on main
  • Rebased and updated stacked PR branches
  • PR status and check inspection output

By the numbers

  • 3 quick commands documented for PR creation, merge, and status
  • 1 dedicated reference file for stacked PR workflow (stacked-pr-workflow.md)
  • 4-step stacked PR merge process described

Files

SKILL.mdMarkdownGitHub ↗

GitHub Patterns

Tools

Use gh CLI for all GitHub operations. Prefer CLI over GitHub MCP servers for lower context usage.

Quick Commands

# Create a PR from the current branch
gh pr create --title "feat: add feature" --body "Description"

# Squash-merge a PR
gh pr merge <PR_NUMBER> --squash --title "feat: add feature (#<PR_NUMBER>)"

# View PR status and checks
gh pr status
gh pr checks <PR_NUMBER>

Stacked PR Workflow Summary

When merging a chain of stacked PRs (each targeting the previous branch):

1. Merge the first PR into main via squash merge 2. For each subsequent PR: rebase onto main, update base to main, then squash merge 3. On conflicts: stop and ask the user to resolve manually

# Rebase next PR's branch onto main, excluding already-merged commits
git rebase --onto origin/main <old-base-branch> <next-branch>
git push --force-with-lease origin <next-branch>
gh pr edit <N> --base main
gh pr merge <N> --squash --title "<PR title> (#N)"

See [stacked-pr-workflow.md][stacked-pr-workflow] for full step-by-step details.

Quick Reference

FileDescription
[stacked-pr-workflow.md][stacked-pr-workflow]Merge stacked PRs into main as individual squash commits

Problem -> Skill Mapping

ProblemStart With
Merge stacked PRs cleanly[stacked-pr-workflow.md][stacked-pr-workflow]

[stacked-pr-workflow]: references/stacked-pr-workflow.md

Related skills

How it compares

Choose github when managing stacked PR merges on GitHub rather than general commit message or branch naming advice.

FAQ

Why use gh CLI instead of GitHub MCP servers?

The skill explicitly states to prefer CLI over GitHub MCP servers for lower context usage.

What happens if there is a conflict during a stacked PR rebase?

The workflow stops and asks the user to resolve the conflict manually before continuing.

How are stacked PRs merged into main?

The first PR is squash-merged into main, then each subsequent PR is rebased onto main, its base updated, and squash-merged individually.

Is Github safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Git & Pull Requestsgitbackenddevops

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.