home / skills / openclaw / skills / git-summary

git-summary skill

/skills/zweack/git-summary

This skill provides a concise Git repository overview including status, recent commits, branches, and contributors to help you assess project health.

npx playbooks add skill openclaw/skills --skill git-summary

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
2.1 KB
---
name: git-summary
description: Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
user-invocable: true
metadata: {"openclaw": {"emoji": "📊", "requires": {"bins": ["git"]}, "os": ["darwin", "linux", "win32"]}}
---

# Git Summary Skill

This skill provides a comprehensive overview of the current Git repository state.

## Usage

When the user asks for a git summary, repository overview, or wants to understand the current state of a git project, use the terminal to run the following commands and present the results in a clear, organized format.

## Instructions

1. **Repository Status**: Run `git status --short --branch` to get the current branch and working directory status.

2. **Recent Commits**: Run `git log --oneline -10 --decorate` to show the last 10 commits with branch/tag decorations.

3. **Branch Overview**: Run `git branch -a --list` to list all local and remote branches.

4. **Remote Info**: Run `git remote -v` to show configured remotes.

5. **Uncommitted Changes Summary**: 
   - Run `git diff --stat` for unstaged changes
   - Run `git diff --cached --stat` for staged changes

6. **Contributors** (optional, for larger context): Run `git shortlog -sn --all | head -10` to show top 10 contributors.

## Output Format

Present the gathered information in a structured format:

```
## 📊 Git Repository Summary

### Current Branch & Status
- Branch: `<branch_name>`
- Status: <clean/dirty with X modified, Y staged, Z untracked>

### Recent Commits (Last 10)
<formatted commit list>

### Branches
- Local: <count> branches
- Remote: <count> branches
<list notable branches>

### Remotes
<list remotes with URLs>

### Uncommitted Changes
<summary of staged and unstaged changes>
```

## Notes

- If not in a git repository, inform the user and suggest initializing one with `git init`.
- For large repositories, the contributor list may take a moment - warn the user if this is expected.
- Always respect that some information may be sensitive - don't expose full URLs if they contain tokens.

Overview

This skill provides a quick, actionable summary of the current Git repository so you can assess status, recent activity, branches, remotes, and contributors at a glance. It runs a small set of git commands and formats the results into a clear report. Use it to speed up review, debugging, or handoff tasks.

How this skill works

The skill executes a standard set of git commands against the current working directory to collect status, recent commits, branch listings, remote configuration, and uncommitted change summaries. It optionally gathers top contributors for context. Results are consolidated into a readable, structured summary and flagged when not in a git repository or when operations may take longer for very large repos.

When to use it

  • When you need a one-page snapshot of a repository before starting work
  • Before opening a pull request or performing a merge
  • During code review or handoff to show recent activity and contributors
  • When diagnosing build or deployment issues that may stem from branch or remote misconfiguration
  • To audit a workspace quickly to see uncommitted changes and staged edits

Best practices

  • Run the skill from the repository root to ensure complete branch and file coverage
  • Avoid exposing sensitive tokens in remote URLs; redact or use SSH/HTTPS without embedded credentials
  • If the repo is large, skip contributor listing or warn about the time cost
  • Combine the summary with CI or changelog data when making release decisions
  • Use the uncommitted change summaries to create focused commits before switching branches

Example use cases

  • Quickly list the current branch, staged and unstaged changes before switching contexts
  • Show the last 10 commits and decorations to verify recent merges or cherry-picks
  • Audit local vs remote branches and configured remotes before pushing or fetching
  • Generate a brief contributor snapshot when preparing project status updates or release notes
  • Detect and report uncommitted changes prior to running tests or deployments

FAQ

What if I'm not in a git repository?

The skill will inform you it cannot find a repository and suggest initializing one with git init or changing to a repo root.

Can it expose sensitive remote URLs?

By default it lists remotes but warns to redact embedded credentials; it can replace tokens or show only hostnames on request.

Will it modify my repository?

No. All operations are read-only git commands (status, log, branch, remote, diff) and do not change history or working files.