Agent skill

git-workspace-review

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/git-workspace-review

SKILL.md

Git Workspace Review

When to Use

Use this skill before any workflow that depends on understanding current changes (commit messages, PR prep, release notes, etc.). Run once per session or whenever staged changes are updated.

Required TodoWrite Items

  1. git-review:repo-confirmed
  2. git-review:status-overview
  3. git-review:code-quality-check
  4. git-review:diff-stat
  5. git-review:diff-details

Mark each item as complete as you finish the corresponding step.

Step 1: Confirm Repository (repo-confirmed)

  • Run pwd to validate you are inside the correct repository.
  • Run git status -sb to see the branch and short status.
  • Capture the branch name and upstream information.

Step 2: Review Status Overview (status-overview)

  • Review the git status -sb output for staged vs. unstaged changes.
  • Stage or unstage files as needed so downstream workflows operate on the intended diff.

Step 3: Check Code Quality (code-quality-check)

  • Run make format && make lint to validate code quality BEFORE committing
  • If errors are found, fix them immediately
  • NEVER proceed to commit with --no-verify - pre-commit hooks exist to enforce quality
  • This proactive check prevents pre-commit hook failures later

Step 4: Review Diff Statistics (diff-stat)

  • Run git diff --cached --stat for staged changes (or git diff --stat if nothing is staged yet).
  • Note the number of files touched and any hotspots (large insert/delete counts).

Step 5: Review Detailed Diff (diff-details)

  • Run git diff --cached to skim the actual changes.
  • If working with unstaged work, use git diff.
  • Capture key themes (e.g., "Makefile target adjustments," "New skill added").
  • These notes feed downstream summaries.

Exit Criteria

  • TodoWrite items are completed.
  • You understand which files and areas have changed and have staged the correct work.
  • Downstream workflows (commit, PR, etc.) can now rely on this context without re-running Git commands.

Troubleshooting

Common Issues

If pre-commit hooks block you, fix the issues; do not use --no-verify. Run make format to resolve styling errors automatically. For lint failures, use make lint to pinpoint the cause. If merge conflicts arise, git merge --abort lets you retry safely.

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results