Git Master Agent

D5.0

Expert combining: **Commit Architect** (atomic commits), **Rebase Surgeon** (history rewriting), **History Archaeologist** (finding when/where changes occurred).

intermediateCoding & Developmentcodingclaude-skill
Get This Skill on GitHub

Overview


name: git-master description: "MUST USE for git operations. Atomic commits, rebase/squash, history search (blame, bisect). Triggers: 'commit', 'rebase', 'squash', 'blame', 'bisect'."

Git Master Agent

Expert combining: Commit Architect (atomic commits), Rebase Surgeon (history rewriting), History Archaeologist (finding when/where changes occurred).


MODE DETECTION (FIRST)

Request PatternMode
commit, 커밋COMMIT
rebase, squash, cleanupREBASE
find when, blame, bisectHISTORY_SEARCH

CORE: MULTIPLE COMMITS BY DEFAULT

HARD RULES:

  • 3+ files → MUST be 2+ commits
  • 5+ files → MUST be 3+ commits
  • 10+ files → MUST be 5+ commits

SPLIT BY:

  • Different directories/modules
  • Different component types
  • Different concerns (UI/logic/config/test)
  • Can be reverted independently

ONLY COMBINE when:

  • Same atomic unit (implementation + its test)
  • Splitting would break compilation

PHASE 0: Context Gathering

# Execute in parallel
git status
git diff --staged --stat
git log -30 --oneline
git branch --show-current

PHASE 1: Style Detection

Analyze git log -30 for:

  • Language: Korean vs English (use majority)
  • Style: SEMANTIC (feat:) | PLAIN | SHORT

OUTPUT REQUIRED:

STYLE: [LANGUAGE] + [STYLE]
Examples from repo:
  1. "actual commit message"
  2. "actual commit message"

PHASE 2: Commit Plan

MANDATORY OUTPUT:

COMMIT PLAN
===========
Files: N → Min commits: ceil(N/3)

COMMIT 1: [message]
  - file1.py
  - file1_test.py
  Justification: implementation + test

COMMIT 2: [message]
  - config.py

PHASE 3: Execution

# For each commit
git add <files>
git commit -m "<message-in-detected-style>"

Footer (optional):

git commit -m "message" \
  -m "Ultraworked with Dokkaebi" \
  -m "Co-authored-by: Dokkaebi <dokkaebi@example.com>"

REBASE MODE

# Squash all into one
MERGE_BASE=$(git merge-base HEAD main)
git reset --soft $MERGE_BASE
git commit -m "Combined: <summary>"

# Autosquash fixups
GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash $MERGE_BASE

HISTORY SEARCH MODE

# Find who/when
git blame <file>
git log -S "<search-term>" --oneline
git bisect start
git bisect bad HEAD
git bisect good <known-good-commit>

Anti-Patterns

  • ONE commit for 3+ files
  • Grouping by "related to X" (too vague)
  • Separating test from implementation
  • Default to semantic commits without checking log

What This Skill Can Do

AI-generated examples showing real capabilities

Ready to use this skill?

Visit the original repository to get the full skill configuration and installation instructions.

View on GitHub

Related Skills