Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Always use Pull Requests — never merge locally into main. Workflow for coordinator sessions to batch-merge open PRs. Pre-work scan of open pull requests before starting feature/bug work. Use when working with git, mentioning merge, PR, pull request, gh pr, git push origin main, branch protection, squash merge, or code that targets main/master.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 97% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 311% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 62% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 99% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 250% | 0% |
Principle: All work targeting main (or production-equivalent branch) must go through Pull Request on GitHub/GitLab/Gitea/etc. — never git merge locally followed by git push origin main. No exceptions across any Git-based project using collaborative workflows.
git log alone cannot answer "what was tried, rejected, or decided?"git revert <sha> is error-prone in squashed histories and causes merge conflicts.git log local context does not.1. Work on feature/fix/* branch (never directly on main)
2. Make local commits with clear messages (Conventional Commits preferred)
3. git push -u origin <branch>
4. gh pr create --title "..." --body "..." (or web UI if preferred)
5. Wait for CI to pass (if configured)
6. Merge via UI (squash-merge for features, merge-commit for complex hotfixes)
7. Branch auto-deleted post-mergeAI responsibility: Execute gh pr create programmatically — do not ask the human to open UI. Return the PR URL for visibility.
git checkout main && git merge feature/x && git push → forbidden, even as solo maintainerorigin exists, it applies)Humans don't memorize which session created which PR. Do not wait to "return to the original author session" to merge — that is an anti-pattern.
Rule: A PR must be self-contained. Title, description, diff, commits, and CI status are sufficient context for any future session to merge safely.
When an AI session ends with open PRs:
session-handoff.md (or equivalent) that PR is open, include URL, and note CI statusCoordinator session pattern — Human opens any session and says:
List my open PRs via: gh pr list --author @me --state open
For each PR:
1. Check CI status, conflicts, and age
2. If CI is passing, no conflicts, clear description → squash-merge
3. If conflicts exist → resolve, show what goes to main, ask for approval
4. If CI failing or description is unclear → report blocker and skip
Report summary: X merged, Y need input, Z blocked.Implication: invest in complete PR descriptions — future sessions and the human weeks later need to reconstruct context from the PR alone.
Before touching code in a Git project (bug fix, new feature, refactor, etc.), run:
bashgh pr list --author @me --state open
For each open PR that touches the relevant area (same file, same module, same feature, same symptom), read the description and diff summary (gh pr diff <N> --stat) before deciding if new work is necessary.
Why: Different sessions, different times, no visibility into each other. A new session starts, receives a task ("fix this bug"), and jumps to implementation — unaware that a prior session already opened a PR fixing the exact same bug with the same approach. Result: wasted work, artificial merge conflicts, code churn.
Burned example (2026-05): Fixed a data-formatting bug in a chart-sync component without first checking open PRs. A PR from a prior session (opened 2 days earlier) already addressed the same bug with the identical fix. ~10 minutes of redundant work + risk of divergence if the prior PR had evolved. The lesson: check the PR list first.
How to apply: Run gh pr list at the start of every dev session in a repo with active collaboration (≥1 recent open PR). Especially important when:
When you find a relevant open PR: read description + diff stat before starting new work.
Prohibited anti-patterns:
gh pr list in a repo with active PRsDoes not apply to: individual customer support tasks, operational-only work, solo projects with no active PRs, or human requests that explicitly say "ignore open PRs, do this from scratch"
Applies to: all collaborative Git projects. Valid for all AI agents and session types in both local and cloud execution contexts.
Other measured skills in the registry, with their headline benchmark lift.