home/common/programs/claude/skills/git-master/SKILL.md
Git expert for atomic commits, rebase/squash, and history search (blame, bisect, log -S). Use for: commit, rebase, squash, who wrote, when was X added, find the commit that.
npx skillsauth add naps62/nixos-config home/common/programs/claude/skills/git-masterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a Git expert combining three specializations:
Analyze the user's request to determine operation mode:
| User Request Pattern | Mode | Jump To |
|---------------------|------|---------|
| "commit", changes to commit | COMMIT | Phase 0-6 |
| "rebase", "squash", "cleanup history" | REBASE | Phase R1-R4 |
| "find when", "who changed", "git blame", "bisect" | HISTORY_SEARCH | Phase H1-H3 |
CRITICAL: Don't default to COMMIT mode. Parse the actual request.
ONE COMMIT = AUTOMATIC FAILURE
Your DEFAULT behavior is to CREATE MULTIPLE COMMITS.
HARD RULE:
3+ files changed -> MUST be 2+ commits (NO EXCEPTIONS)
5+ files changed -> MUST be 3+ commits (NO EXCEPTIONS)
10+ files changed -> MUST be 5+ commits (NO EXCEPTIONS)
SPLIT BY: | Criterion | Action | |-----------|--------| | Different directories/modules | SPLIT | | Different component types (model/service/view) | SPLIT | | Can be reverted independently | SPLIT | | Different concerns (UI/logic/config/test) | SPLIT | | New file vs modification | SPLIT |
ONLY COMBINE when ALL of these are true:
Execute ALL of the following commands IN PARALLEL:
# Group 1: Current state
git status
git diff --staged --stat
git diff --stat
# Group 2: History context
git log -30 --oneline
git log -30 --pretty=format:"%s"
# Group 3: Branch context
git branch --show-current
git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null
git rev-parse --abbrev-ref @{upstream} 2>/dev/null || echo "NO_UPSTREAM"
git log --oneline $(git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null)..HEAD 2>/dev/null
| Style | Pattern | Example |
|-------|---------|---------|
| SEMANTIC | type: message or type(scope): message | feat: add login |
| PLAIN | Just description, no prefix | Add login feature |
| SENTENCE | Full sentence style | Implemented the new login flow |
| SHORT | Minimal keywords | format, lint |
You MUST output the detected style before proceeding.
Determine branch state and rewrite safety:
min_commits = ceil(file_count / 3)
For each commit with 3+ files, write ONE sentence explaining why they MUST be together.
Output commit plan before proceeding to execution.
FIXUP if:
- Change complements existing commit's intent
- Same feature, fixing bugs or adding missing parts
NEW COMMIT if:
- New feature or capability
- Independent logical unit
- No suitable target commit exists
For each commit group, in dependency order:
git add <files>
git diff --staged --stat
git commit -m "<message-matching-detected-style>"
git log -1 --oneline
git status
git log --oneline $(git merge-base HEAD main 2>/dev/null || git merge-base HEAD master)..HEAD
git reset --soft $MERGE_BASE && git commit -m "..."GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash $MERGE_BASEgit fetch origin && git rebase origin/maingit add, git rebase --continuegit status
git log --oneline $(git merge-base HEAD main 2>/dev/null || git merge-base HEAD master)..HEAD
git diff ORIG_HEAD..HEAD --stat
git push -u origin <branch>git push --force-with-lease origin <branch>| Goal | Command |
|------|---------|
| When was "X" added? | git log -S "X" --oneline |
| When was "X" removed? | git log -S "X" --all --oneline |
| What commits touched "X"? | git log -G "X" --oneline |
| Who wrote line N? | git blame -L N,N file.py |
| When did bug start? | git bisect start && git bisect bad && git bisect good <tag> |
| File history | git log --follow -- path/file.py |
| Find deleted file | git log --all --full-history -- "**/filename" |
$ARGUMENTS
development
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
development
React component patterns with TypeScript examples. Composition, compound components, custom hooks, Context+Reducer state, memoization, code splitting, virtualization, error boundaries, accessibility (keyboard nav, focus management), and animations.
data-ai
Transforms workflow to use Manus-style persistent markdown files for planning, progress tracking, and knowledge storage. Use when starting complex tasks, multi-step projects, research tasks, or when the user mentions planning, organizing work, tracking progress, or wants structured output.
development
MUST USE for ANY git operations. Atomic commits, rebase/squash, history search (blame, bisect, log -S). STRONGLY RECOMMENDED: Use with delegate_task(category='quick', load_skills=['git-master'], ...) to save context. Triggers: 'commit', 'rebase', 'squash', 'who wrote', 'when was X added', 'find the commit that'.