npx skills add ...
npx skills add callstackincubator/agent-skills --skill github
npx skills add callstackincubator/agent-skills --skill github
GitHub patterns using gh CLI for pull requests, stacked PRs, code review, branching strategies, and repository automation. Use when working with GitHub PRs, merging strategies, or repository management tasks.
Use gh CLI for all GitHub operations. Prefer CLI over GitHub MCP servers for lower context usage.
When merging a chain of stacked PRs (each targeting the previous branch):
See [stacked-pr-workflow.md][stacked-pr-workflow] for full step-by-step details.
| File | Description |
|---|---|
| [stacked-pr-workflow.md][stacked-pr-workflow] | Merge stacked PRs into main as individual squash commits |
| Problem | Start With |
|---|---|
| Merge stacked PRs cleanly | [stacked-pr-workflow.md][stacked-pr-workflow] |
# 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)"