Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Analyze git repository changes, branch differences, and commit history. Use when analyzing branches, comparing changes, examining commit history, or preparing for PR/commit operations.
.claude/skills/aiskillstore-git-analysis/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 55% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 40% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 30% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 62% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 48% | 0% |
This Skill provides comprehensive git repository analysis capabilities for understanding branch changes, commit history, and code differences.
Use this Skill when you need to:
Get the repository's default branch (usually main or master):
bashgit symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
This identifies the base branch for comparison.
Determine where the current branch diverged from the default branch:
bash# Get merge base git merge-base origin/<default-branch> HEAD
The merge base is the commit where the branch diverged, not the current state of the base branch.
Get comprehensive change information:
bash# List commits from merge base git log --oneline <merge-base>..HEAD # Get detailed commit information git log --format="%H|%s|%an|%ae|%ad" --date=iso <merge-base>..HEAD # Get file statistics git diff --stat <merge-base>..HEAD # Get full diff git diff <merge-base>..HEAD
Understand unstaged and staged changes:
bash# Check untracked files git status # Check staged changes git diff --cached # Check unstaged changes git diff
This Skill includes helper scripts for common operations:
Extracts branch differences including:
Usage:
bashbash scripts/get_branch_diff.sh
Output format:
DEFAULT_BRANCH: main
MERGE_BASE: abc123def456
COMMITS: 5
CHANGED_FILES: 12Extracts detailed commit history in structured format:
Usage:
bashbash scripts/get_commit_history.sh <merge-base>
Output format (one commit per line):
hash|subject|author_name|author_email|datebash# Get all information in parallel git status & git diff --cached & git diff & DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@') MERGE_BASE=$(git merge-base origin/$DEFAULT_BRANCH HEAD) git log --oneline $MERGE_BASE..HEAD git diff --stat $MERGE_BASE..HEAD wait
bash# Get structured commit data MERGE_BASE=$(git merge-base origin/$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@') HEAD) git log --format="%H|%s|%an|%ae|%ad" --date=iso $MERGE_BASE..HEAD
bash# Get high-level change summary MERGE_BASE=$(git merge-base origin/$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@') HEAD) echo "Commits: $(git log --oneline $MERGE_BASE..HEAD | wc -l)" echo "Files changed: $(git diff --stat $MERGE_BASE..HEAD | tail -1)"
This Skill works well with:
github-pr-best-practices: Use git analysis results to generate PR contentHandle common git errors:
bash# Check if in git repository if ! git rev-parse --git-dir > /dev/null 2>&1; then echo "Error: Not in a git repository" exit 1 fi # Check if remote exists if ! git ls-remote origin > /dev/null 2>&1; then echo "Error: Remote 'origin' not found" exit 1 fi # Check if branch has commits if [ -z "$(git log --oneline $MERGE_BASE..HEAD)" ]; then echo "Warning: No commits found in branch" fi
When presenting git analysis results:
Example output structure:
Branch Analysis Summary
-----------------------
Base branch: main
Current branch: feature/new-feature
Diverged at: abc123d (2025-01-15)
Changes:
- 5 commits
- 12 files changed
- 234 insertions, 89 deletions
Recent commits:
1. feat(api): add new endpoint (2025-01-16)
2. test(api): add endpoint tests (2025-01-16)
3. docs(api): update API documentation (2025-01-17)
...See REFERENCE.md for detailed git command documentation and advanced usage patterns.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 8,572 | 8,936 | +4% | 1 | 1 | 0% | 1,523 | 1,665 | +9% | 0 | 0 | — |
case-02 | fail→fail | 8,870 | 9,558 | +8% | 1 | 1 | 0% | 1,585 | 1,734 | +9% | 0 | 0 | — |
case-03 | fail→fail | 15,125 | 9,898 | -35% | 1 | 1 | 0% | 1,901 | 1,854 | -2% | 0 | 0 | — |
case-04 | pass→pass | 12,868 | 11,361 | -12% | 1 | 1 | 0% | 2,281 | 3,703 | +62% | 0 | 0 | — |
case-05 | pass→pass | 16,635 | 14,342 | -14% | 1 | 1 | 0% | 2,997 | 4,427 | +48% | 0 | 0 | — |
case-06 | fail→fail | 10,645 | 2,968 | -72% | 1 | 1 | 0% | 1,887 | 1,947 | +3% | 0 | 0 | — |
case-07 | fail→pass | 7,888 | 3,883 | -51% | 1 | 1 | 0% | 1,391 | 2,151 | +55% | 0 | 0 | — |
case-08 | fail→fail | 11,847 | 5,274 | -55% | 1 | 1 | 0% | 2,068 | 2,417 | +17% | 0 | 0 | — |
case-09 | pass→pass | 12,081 | 12,040 | -0% | 1 | 1 | 0% | 2,112 | 3,518 | +67% | 0 | 0 | — |
case-10 | pass→pass | 14,426 | 10,381 | -28% | 1 | 1 | 0% | 2,634 | 3,314 | +26% | 0 | 0 | — |
case-11 | fail→fail | 9,117 | 7,492 | -18% | 1 | 1 | 0% | 1,753 | 2,762 | +58% | 0 | 0 | — |
case-12 | fail→pass | 7,958 | 4,229 | -47% | 1 | 1 | 0% | 1,507 | 2,108 | +40% | 0 | 0 | — |
case-13 | pass→pass | 16,220 | 15,433 | -5% | 1 | 1 | 0% | 2,756 | 3,888 | +41% | 0 | 0 | — |
case-14 | pass→pass | 7,581 | 6,593 | -13% | 1 | 1 | 0% | 1,481 | 2,626 | +77% | 0 | 0 | — |
case-15 | pass→pass | 4,207 | 2,896 | -31% | 1 | 1 | 0% | 799 | 1,952 | +144% | 0 | 0 | — |
case-16 | pass→pass | 5,415 | 3,512 | -35% | 1 | 1 | 0% | 985 | 1,990 | +102% | 0 | 0 | — |
case-17 | fail→pass | 19,019 | 16,020 | -16% | 1 | 1 | 0% | 3,128 | 4,078 | +30% | 0 | 0 | — |
case-18 | pass→pass | 4,417 | 3,704 | -16% | 1 | 1 | 0% | 602 | 2,007 | +233% | 0 | 0 | — |
case-19 | pass→pass | 8,362 | 5,617 | -33% | 1 | 1 | 0% | 1,488 | 2,492 | +67% | 0 | 0 | — |
case-20 | pass→pass | 8,407 | 6,455 | -23% | 1 | 1 | 0% | 1,596 | 2,486 | +56% | 0 | 0 | — |
case-21 | pass→pass | 5,450 | 4,281 | -21% | 1 | 1 | 0% | 959 | 2,102 | +119% | 0 | 0 | — |
case-22 | pass→pass | 3,955 | 2,489 | -37% | 1 | 1 | 0% | 488 | 1,846 | +278% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +14 percentage points is the difference between those two pass rates over the 20 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.