home / skills / callstackincubator / agent-skills / github

github skill

/skills/github

This skill helps you manage GitHub workflows and stacked PRs, applying best practices for PR reviews, branching, and repository automation.

npx playbooks add skill callstackincubator/agent-skills --skill github

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
927 B
---
name: github
description: GitHub patterns for PRs, code review, branching, and repository management. Use when working with pull requests, stacked PRs, code reviews, GitHub or repository automation.
license: MIT
metadata:
  author: Callstack
  tags: github, git, pull-request, code-review, workflow, automation
---

# GitHub

## Overview

Collection of GitHub workflow patterns and best practices for pull requests, code review, branching strategies, and repository management.

## When to Apply

Reference these guidelines when:
- Managing pull request workflows
- Working with stacked/chained PRs
- Automating GitHub operations

## Quick Reference

| File | Description |
|------|-------------|
| `stacked-pr-workflow.md` | Merge stacked PRs into main as individual squash commits |

## Problem → Skill Mapping

| Problem | Start With |
|---------|------------|
| Merge stacked PRs cleanly | `stacked-pr-workflow.md` |

Overview

This skill collects practical GitHub workflow patterns for pull requests, code review, branching, and repository management. It focuses on predictable PR handling, clean history for stacked PRs, and automations that reduce manual coordination. The guidance is optimized for agents helping engineers or repo maintainers implement and follow these patterns.

How this skill works

The skill inspects common PR workflows and recommends concrete patterns such as how to author, stack, and merge PRs to preserve a clean history. It also codifies code-review expectations, branching strategies, and simple automation rules so agents can suggest or apply them consistently. Use it to generate step-by-step actions for PR maintenance, reviewer assignment, and merge sequencing.

When to use it

  • When creating or reviewing pull requests and you want consistent conventions
  • When managing stacked or dependent PRs that must land independently
  • When setting up branch protection, CI triggers, or repo automation
  • When enforcing review standards or simplifying merge strategies
  • When onboarding contributors to your repo’s GitHub workflow

Best practices

  • Structure PRs around a single intent and keep changes small and reviewable
  • Use stacked PRs for dependent work but merge each as an individual squash commit
  • Document branch naming, review expectations, and merge rules in a concise guide
  • Automate reviewer assignment and status checks to reduce manual coordination
  • Rebase or refresh stacked branches only to resolve conflicts, not to hide intent

Example use cases

  • Convert a feature split across branches into a sequence of stacked PRs that merge cleanly as squash commits
  • Define repo rules that require reviews and passing CI before merge, and implement automation to enforce them
  • Assist a contributor in breaking a large change into smaller, reviewable PRs following the single-intent principle
  • Automate labeling and reviewer assignment for incoming PRs to speed triage
  • Create a short contributor guide that explains branching, PR stacking, and merge behavior

FAQ

How should I merge stacked PRs without losing individual intent?

Merge each stacked PR as an individual squash commit into the target branch. This preserves a concise history per change while keeping the stack concept for development.

When is rebasing a stacked branch appropriate?

Rebase only to resolve merge conflicts or to update a stack against new base changes. Avoid rebasing to rewrite published history that contributors rely on.