본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)48k · #4737

git-pr-workflows-git-workflow

하는 일

이 에이전트는 코드 변경을 리뷰받기 위해 제출하는 과정을 정리하도록 돕습니다. 모든 것이 테스트되고 올바르게 기록되며, 프로젝트 규칙을 어기지 않고 풀 리퀘스트로 전송되도록 합니다.

사용하는 경우

  • ✓코드 작성을 마치고 다른 사람들이 리뷰하도록 제출하려 할 때.
  • ✓프로젝트가 코드 제출과 테스트에 엄격한 규칙을 가진 경우.
  • ✓변경 후 풀 리퀘스트 생성 과정을 자동화하고 싶을 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/git-pr-workflows-git-workflow/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/git-pr-workflows-git-workflow/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“최신 변경 사항을 리뷰받고 싶어요. 모든 것을 테스트하고 main 브랜치로 풀 리퀘스트를 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 먼저 코드의 현재 상태와 프로젝트 규칙을 확인합니다. 그다음 테스트와 검증을 실행하고, 새 브랜치에서 변경 사항을 준비한 뒤, 필요한 모든 정보를 담아 풀 리퀘스트를 만듭니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Guarded Git Pull Request Workflow

Move completed changes from local review to a verified pull request without bypassing repository policy or branch protection.

When to Use

Use for completed implementation work that must be reviewed, tested, committed, pushed to a topic branch, and opened as a pull request. Use the repository's dedicated maintainer or release workflow instead when one is mandatory.

Policy Gate

Before mutation:

  1. Read AGENTS.md, contribution guidance, maintainer docs, and relevant nested instructions.
  2. Inspect the current branch, worktree, remotes, upstream, and effective target-branch protection.
  3. Discover repository-native validation, commit, PR, merge, and release commands.
  4. Preserve unrelated dirty and staged files.

Repository policy wins over flags and user shorthand. Trunk-based development does not imply a direct push: when the target is protected, use a short-lived branch and pull request. If a repository defines a mandatory maintainer skill or guarded merge command, hand off merge and release actions to it. In agentic-awesome-skills, use antigravity-maintainer-batch-release and npm run merge:batch.

Inputs

Resolve these from the request and repository:

  • target branch, defaulting to the repository default branch;
  • intended changed files and excluded user work;
  • required test, lint, security, build, and documentation checks;
  • branch naming and commit-message conventions;
  • draft or ready-for-review PR state;
  • required reviewers, labels, issue links, and merge method.

Ask only when a missing choice changes the result materially.

Workflow

1. Capture the exact change

git status --short --branch
git diff --stat
git diff --cached --stat
git branch --show-current
git remote -v

Confirm every file in scope. Stop if staged or dirty files cannot be separated safely.

2. Review in parallel

When subagents are available and authorized, assign independent bounded passes for:

  • correctness and regression risk;
  • security, secrets, permissions, and dependency risk;
  • test coverage and repository-policy compliance.

Give each reviewer the raw diff and repository instructions. Keep the main agent responsible for deduplication, severity, edits, and final verification.

3. Validate and repair

Run the repository's targeted checks, then its required pre-PR suite. If a check fails:

  1. identify whether the cause is source, policy, environment, or infrastructure;
  2. fix only source or policy defects in scope;
  3. rerun the targeted failure;
  4. rerun the complete required suite.

Do not weaken gates, hide skipped tests, or treat deterministic failures as flaky.

4. Prepare the branch and commit

Fetch the target before committing. If currently on a protected/default branch, create a topic branch before mutation.

git fetch origin <target-branch>
git switch -c <topic-branch> origin/<target-branch>
git status --short --branch

Stage only intended paths and create focused conventional commits according to repository policy. Rebase or update the topic branch when strict required checks demand the latest target; never force a shared branch without explicit authorization.

5. Push and create the pull request

git push -u origin <topic-branch>
gh pr create --base <target-branch> --head <topic-branch> \
  --title "<conventional title>" --body-file <body-file>

The PR body must truthfully include:

  • what changed and why;
  • tests and validation actually run;
  • risk, deployment, rollback, and breaking-change notes when applicable;
  • issue links, screenshots, and repository checklists when applicable.

Never mark a pending automated review or test as completed.

6. Verify the remote result

gh pr view <pr-number> --json headRefOid,baseRefOid,mergeable,mergeStateStatus,url
gh pr checks <pr-number>

Bind review evidence to the current full head SHA. If the head or base changes, discard stale conclusions and rerun affected checks.

Use the repository's guarded merge path. Do not replace required checks, merge queues, exact-SHA attestations, or maintainer commands with a raw merge API. After merge, fetch the target and verify the requested remote, CI, deployment, or release state.

Stop Condition

…

자주 묻는 질문

풀 리퀘스트란 무엇인가요?

내 코드 변경을 메인 프로젝트에 반영해 달라는 요청입니다. 다른 사람들이 받아들이기 전에 코드를 검토할 수 있습니다.

「브랜치」란 무엇인가요?

새 기능이나 수정 작업을 메인 코드에 영향을 주지 않고 할 수 있는, 프로젝트의 병렬 복사본과 같습니다. 나중에 변경 사항을 다시 합칠 수 있습니다.

테스트가 실패하면 어떻게 되나요?

에이전트는 문제를 찾아내고, 내 코드나 프로젝트 규칙과 관련된 문제라면 고치려고 시도합니다. 중요한 테스트가 실패하면 진행하지 않습니다.

상세 정보

작성자의 원본 설명

Orchestrate review, tests, commits, branch pushes, and pull-request creation with parallel agents. Use when completed changes must move through validation into a PR or guarded merge.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#4737
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬