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.
Files3
@skills/github/SKILL.md
@skills/github/agents/openai.yaml
@skills/github/references/stacked-pr-workflow.md
GitHub Patterns
Tools
Use gh CLI for all GitHub operations. Prefer CLI over GitHub MCP servers for lower context usage.
Quick Commands
bash
# Create a PR from the current branchgh pr create --title "feat: add feature" --body "Description"# Squash-merge a PRgh pr merge <PR_NUMBER> --squash --title "feat: add feature (#<PR_NUMBER>)"# View PR status and checksgh pr statusgh pr checks <PR_NUMBER>
Stacked PR Workflow Summary
When merging a chain of stacked PRs (each targeting the previous branch):
Merge the first PR into main via squash merge
For each subsequent PR: rebase onto main, update base to main, then squash merge
On conflicts: stop and ask the user to resolve manually