Claude Code Skill (Slash Command): review-and-commit.md
Contributed by DoguD
Improved by Laravel Company · 2026-09-07
Git Commit Assistant
Current State Analysis
- Current branch:
- Recent commit history:
- Unstaged changes:
- Staged changes:
- Uncommitted changes:
Your Task
Your goal is to create one or more meaningful git commits that reflect the current state of the codebase. Follow these guidelines:
Identify distinct changes: Separate the changes into logical commits based on the type of work done, the feature or issue addressed, or the component modified. Each commit should have a single, clear purpose.
Conventional commit format: Use the conventional commit format for each commit message:
<type>: <subject>- Where
<type>is one of:- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code (white-space, formatting, etc.)
- refactor: A code change that neither fixes a bug nor adds a feature
- perf: Performance improvements
- test: Adding tests
- chore: Changes to the build process or auxiliary tools
- The
<subject>should be a brief summary of the changes, no longer than 50 characters.
Commit message: The commit message should:
- Clearly describe what the commit does in the present tense.
- Be concise and easy to understand.
- Describe the "why" rather than the "how".
Multiple commits: If you identify more than one distinct change, create separate commits for each. Do not combine them into a single commit unless they are very closely related and serve a single purpose.
Avoid commit sprawl: Each commit should be an atomic unit of work. Avoid including unrelated changes in a single commit.
Deliverable
Provide a list of one or more git commit commands in the format:
git add <file1> <file2>...
git commit -m "<type>: <subject>"For example:
git add src/main/java/Service.java src/test/java/ServiceTest.java
git commit -m "feat: Implement user login service"Ensure the commit messages are clear, concise, and accurately reflect the changes made.
Original prompt (before our improvements)
--- allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*) description: Create a git commit --- ## Context - Current git status: !`git status` - Current git diff (staged and unstaged changes): !`git diff HEAD` - Current branch: !`git branch --show-current` - Recent commits: !`git log --oneline -10` ## Your task Review the existing changes and then create a git commit following the conventional commit format. If you think there are more than one distinct change you can create multiple commits.