Agent skill

git-analysis

Analyze git repository changes, branch differences, and commit history. Use when analyzing branches, comparing changes, examining commit history, or preparing for PR/commit operations.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill git-analysis --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 5 KB
Bundled scripts: none
Path: skills/analysis/git-analysis/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Git Analysis This Skill provides comprehensive git repository analysis capabilities for understanding branch changes, commit history, and code differences. ## Capabilities - Analyze branch differences and merge bases - Extract structured commit history - Identify changed files and their statistics - Determine default branches and remote configuration - Support PR creation, code review, and commit operations ## When to Use Use this Skill when you need to: - Analyze what changed in a branch - Prepare information for PR creation - Review commit history - Compare branches - Understand code changes for commits or reviews ## Core Analysis Steps ### 1. Identify Default Branch Get the repository's default branch (usually `main` or `master`): ```bash git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@' ``` This identifies the base branch for comparison. ### 2. Find Merge Base 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. ### 3. Analyze Changes Get comprehensive change informa

What's inside
Steps it walks through
  1. Capabilities
  2. When to Use
  3. Core Analysis Steps
  4. 1. Identify Default Branch
  5. 2. Find Merge Base
  6. 3. Analyze Changes
  7. 4. Check Current State
  8. Helper Scripts
  9. getbranchdiff.sh
  10. getcommithistory.sh
  11. Best Practices
  12. Common Patterns
  13. Pattern 1: Full Branch Analysis
  14. Pattern 2: Commit History Extraction
Ships with 1 file
  • metadata.json
Commands it runs
git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
Get merge base
git merge-base origin/<default-branch> HEAD
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
More from claude-skill-registry
All skills →
About this skill
What does the git-analysis skill do?

Analyze git repository changes, branch differences, and commit history. Use when analyzing branches, comparing changes, examining commit history, or preparing for PR/commit operations.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill git-analysis --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going