본문으로 건너뛰기
Skillpedia
일반 코딩70k · #3134

git-master

하는 일

이 에이전트는 Git으로 코드의 버전 기록을 관리하도록 돕습니다. 변경 사항을 설명과 함께 저장(커밋)하고, 변경 기록을 정리하고, 누가 무엇을 언제 바꾸었는지에 대한 질문에 답할 수 있습니다.

사용하는 경우

  • ✓코드 변경 사항 묶음을 저장해야 할 때.
  • ✓코드가 어떻게 바뀌었는지 기록을 이해하거나 재구성하고 싶을 때.
  • ✓코드의 특정 변경을 누가 했는지 알아내야 하는 경우.

스킬 링크

https://github.com/code-yeongyu/oh-my-openagent/blob/dev/packages/shared-skills/skills/git-master/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“최근 변경 사항을 「로그인 기능 추가」라는 메시지로 커밋해 주세요.”

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

작동 방식

명령을 분석하고 Git 도구를 사용해 커밋 생성, 기록 재구성, 과거 변경에 대한 정보 검색 같은 작업을 수행합니다. 행동하기 전에 현재 코드 상태를 확인합니다.

기술 내용 (원본 SKILL.md)

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

Git Master

Use this skill when the user asks you to operate on Git history or answer a Git-history question. Be exact, conservative, and evidence-led. Read the repository state before you infer anything.

Mode Gate

Classify the request first:

  • COMMIT: stage and commit local changes.
  • REBASE: rebase, squash, fixup, autosquash, reorder, split, or otherwise rewrite branch history.
  • HISTORY: answer when, where, who, why, or which commit changed something.
  • STATUS: inspect branch, diff, or working-tree state without changing it.

Do not commit, rebase, push, force-push, reset, stash-pop, or delete anything unless the user explicitly asked for that operation. If the request is only investigative, report findings and stop.

Ground Truth

Gather independent facts in parallel when the tools allow it:

git status --short
git diff --stat
git diff --staged --stat
git branch --show-current
git log -30 --oneline
git log -30 --pretty=format:%s
git rev-parse --abbrev-ref @{upstream}
git merge-base HEAD origin/main
git merge-base HEAD origin/master

Missing upstream or missing main/master is normal. Fall back to the best available branch or report the missing fact. Never treat a failed lookup as proof.

PR Body Evidence Attachments

When a PR body needs screenshots or terminal PNGs, use the repo reference at docs/reference/github-attachment-upload.md. The allowed hosting path is GitHub user attachments from the authenticated web attachment flow; never commit temporary images, never use GitHub Releases for PR evidence, and never use external image hosts. Do not log browser cookies, CSRF tokens, S3 form fields, or upload headers.

Commit Mode

Commit only the user's requested changes. Preserve unrelated dirty work.

  1. Detect message style from recent history. Use the dominant local pattern, language, and casing. Do not default to Conventional Commits unless the repo uses them.
  2. Inspect the full diff, not only filenames. Separate unrelated user edits from the requested commit.
  3. Build atomic groups by behavior, module, and revertability. Keep implementation and its direct tests together.
  4. Prefer multiple commits for unrelated concerns. A single commit is acceptable only when the changed files form one indivisible behavior or the user explicitly asks for one commit.
  5. Stage by path or hunk so each commit contains only its atomic group.
  6. Before each commit, verify git diff --staged --stat and enough staged diff to prove the group is right.
  7. Commit with the detected style. After each commit, verify git log -1 --oneline.

Grouping rules:

  • Split different features, modules, generated artifacts, config, docs, and test-only changes unless they are inseparable.
  • Keep generated files with the source change that produced them when omitting them would leave the repo inconsistent.
  • Never hide failing or unrelated changes inside a broad commit.

Final report: list commit hashes, messages, and any remaining uncommitted files.

Rebase Mode

History rewriting is a shared-impact operation.

  • Never rebase or rewrite main, master, dev, release branches, or a protected branch unless the user explicitly named that exact operation.
  • If commits may already be pushed, ask before force-pushing. Use --force-with-lease, never plain --force.
  • If the worktree is dirty, preserve it intentionally before rebasing. Do not stash-pop over conflicts without checking what changed.
  • For fixups, prefer git commit --fixup=<hash> followed by GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash <base>.
  • For conflicts, read the conflicting files and resolve by intent. Do not choose ours/theirs blindly.
  • If a rebase goes wrong, use git rebase --abort first. Use reflog only after explaining the recovery path.

After rewriting, run the relevant tests or at least the project's cheapest smoke check, then show the new branch log from base to HEAD.

History Mode

Choose the Git tool by the question:

  • git log -S "text": when the count of an exact string changed.
  • git log -G "regex": when diffs touched lines matching a pattern.
  • git blame -L start,end -- file: who last changed specific lines.
  • git log --follow -- file: history across renames for one file.
  • git show <hash>: inspect the commit that appears relevant.
  • git bisect: find the first bad commit when there is a deterministic pass/fail command and known good/bad bounds.

…

자주 묻는 질문

‘atomic commit’이란 무엇인가요?

한 가지 작업이나 수정에 집중한 변경 저장으로, 기록을 이해하고 관리하기 쉽게 만듭니다.

‘기록 다시 쓰기(rewriting history)’란 무엇을 뜻하나요?

이미 만든 커밋을 바꾸는 것입니다. 여러 커밋을 하나로 합치거나 순서를 바꾸는 것이 예입니다. 신중하게 해야 합니다.

저장을 요청하지 않으면 Git은 무엇을 하나요?

기록에 대해 질문하거나 상태 확인만 요청하면, 변경 없이 정보만 제공합니다.

상세 정보

작성자의 원본 설명

Handles git work: atomic commits, rebase, squash, blame, bisect, reflog, and history questions. Use whenever a task needs a commit or a git-history investigation; skip for ordinary code edits.

repo: code-yeongyu/oh-my-openagent

인기도

GitHub 스타
70k
순위
#3134
라이선스
NOASSERTION
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬