# Analyze Git Changes

Reviewing branch changes can be slow when commits, diffs, and status are scattered. This skill gathers Git context for PRs, reviews, and commit planning.

## Install

```bash
npx skillstore add 1natsu172/git-analysis
```

## Metadata

- Status: approved
- Slug: 1natsu172-git-analysis
- Skillstore revision: r1
- Version status: missing
- Tree hash: 4121a8104d15b7955d33fa26e77fc9eaba6d0646f5a506a351988261d947ebbc
- Author: 1natsu172
- GitHub username: 1natsu172
- License: MIT
- Repository: https://github.com/1natsu172/dotfiles/tree/master/.claude/skills/git-analysis
- Ref: 26421118b848d9f1efc0aa169d8a7a9e7e0a877e
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, filesystem
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/1natsu172-git-analysis
- Manifest: https://skillstore.pages.dev/api/skills/1natsu172-git-analysis/manifest

## Capabilities

- Detects the default branch and merge base for branch comparisons.
- Summarizes commits from the merge base to HEAD.
- Reports changed files, insertions, deletions, and diff statistics.
- Checks staged, unstaged, and untracked working tree changes.
- Provides helper scripts for branch summaries and commit history.
- Recommends output formats for PR and review workflows.

## Use Cases

- Prepare a Pull Request: Summarize commits, changed files, and diff statistics before drafting a pull request.
- Review Feature Branches: Compare a branch against its merge base to focus review effort.
- Audit Release Changes: List commit history and file impact for release notes or team handoff.

## Prompt Templates

### Summarize My Branch

```
Use git-analysis to summarize the current branch against the default branch. Include commit count, changed files, and main risks.
```

### Prepare PR Context

```
Analyze this repository for a pull request. Group changes by area and list commits that need mention.
```

### Review Commit History

```
Use git-analysis to inspect commits from the merge base to HEAD. Highlight unclear commits and review focus areas.
```

### Classify Branch Changes

```
Perform a deep branch analysis. Classify changes by file type, connect commits to touched areas, and identify follow-up questions.
```

## Limitations

- Requires a local Git repository and the git command-line tool.
- Some workflows assume a remote named origin and a default branch reference.
- Outputs may include sensitive branch names, file paths, commits, or diff details.
- Does not authenticate to hosting services or create pull requests directly.

## Best Practices

- Run from the repository root or clearly state the target repository path.
- Review generated diffs before sharing because they may contain secrets.
- Verify the detected default branch when repositories use nonstandard branch names.

## Anti Patterns

- Do not run full diff analysis on repositories that contain secrets you cannot expose.
- Do not assume origin/main when the repository reports a different default branch.
- Do not use predictable temporary files from reference examples on shared systems.

## Security Audit

- Audited at: 2026-07-09T14:15:51.616\+00:00
- Summary: Most static findings are expected git-analysis behavior, safe helper scripts, or Markdown command examples. The confirmed issue is a reference workflow that writes repository status and diffs to predictable /tmp/git\_\*.txt files. No prompt-injection text or malicious exfiltration intent was found.

## Stats

- Views: 184
- Downloads: 23
- Favorites: 0
- Popularity score: 0
