Skip to main content

git-branch-pr-workflow

Before making any non-trivial code, docs, or config change -- create a feature branch first, then open a PR. Never commit directly to main. Apply by default before any edit; this is the baseline branch discipline that all other git skills build on.

설치로 이동

소스 정보

저장소
joshrotenberg/agent-tools
최근 소스 활동
2026년 8월 19일 16:28
감지된 SKILL.md 언어
영어
스타
0
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
git-branch-pr-workflow
description
Before making any non-trivial code, docs, or config change -- create a feature branch first, then open a PR. Never commit directly to main. Apply by default before any edit; this is the baseline branch discipline that all other git skills build on.
allowed-tools
Bash(git *) Bash(gh *)
# Git branch + PR workflow Default to `git checkout -b <type>/<description>` **before any edits**. Never commit directly to main, even on solo projects. Conventional commit prefixes: `feat`, `fix`, `refactor`, `chore`, `ci`, `docs`, `test`. Push branch, open PR, let the user (or the dispatcher loop) merge. ## When to apply - Any code change beyond a trivial typo - Any docs change that affects committed content - Any config or workflow change ## Why - Keeps the commit log on main clean and bisectable - CI runs against the PR before main moves - Squash-merge gives main a clean linear history - Even solo, the PR body is a useful place to record the "why" ## How to apply 1. Before any change, `git checkout -b <type>/<short-description>`. If the work closes an issue, claim it first (`gh issue edit <N> --add-label status/in-progress`); see the claim protocol in [`issue-pr-conventions`](../issue-pr-conventions/SKILL.md). 2. Make commits with conventional-commit messages (`<type>: <description>`; `!` marks breaking). 3. Push: `git push -u origin <branch>`. 4. Open the PR: `gh pr create [--draft]` with a tight body that references the underlying issue (use a `Closes #N` keyword in the PR body so the merge closes the linked issue). 5. Wait for CI; merge with `gh pr merge --squash --delete-branch`. ## Naming Branch, issue title, PR title, and commit subject all take the same conventional-commit prefix. The scheme, the type list, and the tool-owned exemptions are in [`issue-pr-conventions`](../issue-pr-conventions/SKILL.md). Two rules that bite here specifically: - **The branch prefix matches the PR type.** A `fix:` PR belongs on a `fix/` branch. Where they disagree, rename the branch (`git branch -m fix/<slug>`) before opening the PR. - **No trailers, and the author is the repo owner.** Never add `Co-Authored-By` or a "Generated with Claude Code" line. Verify before pushing: ```bash git log -1 --format='%an <%ae>%n%(trailers)' ``` The author must be the repo owner and the trailers must be empty. Amend before pushing if one slipped in. ## Related - [`issue-pr-conventions`](../issue-pr-conventions/SKILL.md) -- the naming scheme, label taxonomy, and claim protocol. - [`git-fix-pr-branching`](../git-fix-pr-branching/SKILL.md) -- how to handle fixes when a PR is open vs merged. - [`heredoc-backticks`](../heredoc-backticks/SKILL.md) -- formatting the PR body without breaking the markdown.
GitHub에서 보기