gh-stack
하는 일
이 스킬은 GitHub CLI용 gh stack 확장으로 쌓인 풀 리퀘스트를 관리합니다. 큰 변경을 순서가 있는 작은 조각으로 검토받고 싶은 개발자를 위한 스킬입니다.
사용하는 경우
- ✓큰 변경을 작은 풀 리퀘스트로 나누어야 할 때.
- ✓스택형 브랜치, 종속 풀 리퀘스트, gh stack을 언급할 때.
- ✓스택을 업데이트, 리베이스, 동기화하거나 병합해야 할 때.
스킬 링크
https://github.com/remotion-dev/remotion/blob/main/.agents/skills/gh-stack/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 기능이 너무 큽니다. 검토자가 하나씩 읽을 수 있도록 작은 풀 리퀘스트 스택으로 나누어 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 기반부터 최상위까지 층의 순서를 계획하고, 연결된 브랜치를 만든 뒤 gh stack 명령으로 관리합니다. 명령이 입력을 기다리며 멈추지 않도록 플래그를 명시적으로 전달합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
gh-stack
gh stack is a GitHub CLI extension for stacked branches and pull
requests. A stack is an ordered chain of branches rooted on a trunk, where each branch has one PR
based on the branch below it, so a reviewer sees only that layer's diff.
gh stack prints a stack trunk-first, left to right:
(main) <- auth <- api <- frontend
Left is the bottom, right is the top. auth is based on main and merges first;
frontend merges last. up moves toward the top, away from trunk; down moves toward it.
Foundational work belongs at the bottom, code that depends on it above. For how to choose the
layers, read references/stack-design.md.
Setup
gh extension install github/gh-stack
git config rerere.enabled true # remember conflict resolutions
git config remote.pushDefault origin # required if the repo has more than one remote
Non-interactive use
gh stack branches on whether stdout is a TTY. Piped, most commands error cleanly or print
static text; under a PTY the same commands open a prompt or a full-screen TUI and block forever.
Agent harnesses differ, so always pass the flags below instead of relying on that detection.
Multiple remotes: never run push, submit, sync, rebase, or link without
--remote <name> unless remote.pushDefault is configured. checkout and trunk have no
--remote flag and require the config.
| Always run | Never run bare | Why |
|---|---|---|
gh stack view --json |
gh stack view |
opens a TUI under a PTY |
gh stack submit --auto |
gh stack submit |
prompts for a title per new PR |
gh stack merge <target> --yes --squash |
gh pr merge |
gh pr merge cannot merge a stack |
gh stack init <branch>... |
gh stack init |
prompts for branch names |
gh stack add <branch> |
gh stack add |
prompts for a name, and fails even when piped |
gh stack checkout <target> |
gh stack checkout |
opens a selection menu |
gh stack up / down / top / bottom |
gh stack switch |
switch is menu-only |
| — | gh stack modify |
TUI-only, no non-interactive path |
view --shortis safe in both modes, but it is formatted for humans. Use--jsonto parse.checkout <pr>when a different local stack already covers those branches cannot be forced. Rungh stack unstack --localfirst (this keeps the stack on GitHub), then retry.
Branch placement
- Starting multi-part work: create the stack before writing files. Do not implement every concern on trunk and split it later. Put one dependent concern in each layer, bottom to top.
- Editing an existing stack: check out the layer that owns the change before editing. Never
commit a lower layer's concern on the current top branch. Run
gh stack view --json; if ownership is unclear, inspectgit log --all -- <path>. Then check out the owner, edit, commit, rebase upstack, and return to top.
gh stack down # or: gh stack checkout api
git add ... && git commit -m "Add get-user endpoint"
gh stack rebase --upstack # replay every branch above onto the change
gh stack top # return to where you were
gh stack push
Core loop
gh stack init auth # create the stack and check out its branch
git add ... && git commit -m "Add auth middleware"
gh stack add api # next layer, branched from the current one
git add ... && git commit -m "Add API routes"
gh stack submit --auto # push every branch and open draft PRs
gh stack view --json # confirm
Add --open to submit to create PRs ready for review instead of drafts. Branch names are
verbatim — gh stack add refactor/foo creates refactor/foo.
Staying in sync
gh stack sync # fetch, reconcile with GitHub, rebase, push, refresh PR state
gh stack sync --prune # also delete local branches for merged PRs
Pruning never happens without --prune when non-interact
자주 묻는 질문
층은 어떤 순서로 쌓나요?
기반 작업을 아래에 두고 그에 의존하는 코드를 위에 둡니다. 그래서 아래 풀 리퀘스트가 먼저 병합됩니다.
스킬은 왜 명시적 플래그를 쓰나요?
스킬에 따르면 이 도구는 대화형 터미널에서 다르게 작동하며, 그렇지 않으면 영원히 멈출 수 있습니다.
어떤 설정이 필요한가요?
gh stack 확장을 설치하고, 충돌 해결을 기억하도록 rerere를 켜야 합니다.
상세 정보
작성자의 원본 설명
Manages stacked PRs and splits multi-part work into reviewable branches with gh-stack. Use for stack creation, viewing, edits, push, submit, sync, rebase, merge, or checkout; when asked to split or isolate work for review; whenever a user mentions a stack, branch layers, dependent PRs, or gh stack; or when a stack is checked out.
repo: remotion-dev/remotion
인기도
- GitHub 스타
- 70k
- 순위
- #3145
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
fix-root-cause
70k에이전트가 문제가 처음 어긋난 지점을 추적해, 임시방편으로 증상을 가리는 대신 그 지점을 고치도록 가르칩니다.
issue-management
70k에이전트가 GitHub 이슈를 상위 이슈, 하위 이슈, 차단 관계로 연결하도록 돕습니다. 프로젝트 작업이 명확하게 정리되도록 합니다.
no-comments
70k에이전트가 팀의 자체 코드만 설명하는 코드 주석을 제거하고, 브라우저, 라이브러리, 플랫폼의 특이 사항에 대한 메모는 남기도록 돕습니다.
pr-ready
70k에이전트가 실패한 검사를 고치고 병합 충돌을 해결하며 로컬 변경을 푸시해서, 풀 리퀘스트를 병합 가능한 상태로 만들도록 돕습니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.