/commit — create a git commit
Run /commit and Claude inspects your staged and unstaged changes, reads recent commit history to match your project’s message style, and creates a commit with a generated message.
- Runs
git statusandgit diff HEADto see all changes - Checks
git logto learn your project’s commit message conventions - Stages relevant files and writes a commit message focused on the “why” of the change
- Creates the commit using
git commit
Claude will not commit files that appear to contain secrets (for example,
.env or credentials.json). If you ask it to commit those files, it will warn you first.- Summarizes the nature of the change: new feature, bug fix, refactor, docs, etc.
- Uses the commit message style already present in your repository (conventional commits, imperative mood, etc.)
- Never uses
--amendor skips hooks unless you explicitly ask
/commit:
- Never runs
git configchanges - Never skips hooks (
--no-verify) - Never creates an empty commit if there are no changes
- Never uses interactive git commands (
git rebase -i,git add -i)
/review — review code
Run /review to get a code review of your current changes against the base branch.
/review runs as /ultrareview — a cloud-based review that takes 10–20 minutes and uses a fleet of specialized agents to find bugs, security issues, and logic errors. You’ll be notified when the results arrive.
To review a specific pull request by number:
/diff — view current changes
Run /diff to see your uncommitted changes and per-turn diffs in the current session.
- All uncommitted changes in the working tree
- A per-turn view of what Claude changed in the current session
/pr_comments — fetch PR comments
Run /pr_comments to fetch and display all comments on the current pull request.
gh) to:
- Get the PR number and repository from
gh pr view - Fetch PR-level comments via the GitHub API
- Fetch inline code review comments, including the diff context, file path, and line number for each
diff_hunk so you can see exactly what the reviewer was looking at.
/pr_comments requires the gh CLI to be installed and authenticated. Run gh auth status to verify.Working with branches
Claude Code does not have a dedicated branch command, but you can ask Claude to manage branches using plain language:Example: full workflow from change to PR
Here’s a realistic end-to-end example:1
Make changes
Ask Claude to implement a feature or fix a bug. Claude edits the relevant files.
2
Review the diff
Check what changed before committing.
3
Commit
Let Claude stage and commit with a generated message.Claude inspects recent commits, writes a message that matches your style (for example:
fix: validate email on POST /users), and creates the commit.4
Review the code
Run a full code review before pushing.
5
Push and open a PR
Ask Claude to push the branch and open a pull request.
6
Address review comments
After teammates leave comments, fetch and respond to them.
Tips for commit messages and review quality
Let Claude match your style
/commit reads your recent git log before writing a message. The more consistent your existing commit history, the better Claude’s messages will be.Stage selectively before /commit
Use
git add to stage only the files you want in a commit before running /commit. Claude respects what’s staged.Use /review before pushing
Running
/review on a local branch catches issues before they become PR review comments from teammates.Address PR comments in one pass
After running
/pr_comments, ask Claude to “address all the review comments” in a single prompt. It reads each comment and makes the relevant edits.