Skip to main content
command Claude Code official · Anthropic

commit — Claude Code command: what it does, how to install

Creates a git commit based on current branch changes. Helps stage and commit diffs in Claude Code without typing commit messages.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin install commit-commands@claude-plugins-official
Open on GitHub

What commit does

The command inspects working changes via git status and git diff HEAD. It also checks the branch name and the last 10 log entries. This provides context on repo style.

Tool access is limited to git add, git status, and git commit. The agent stages files and commits them in one turn. It prints no extra commentary.

Install this if you want rapid commits after coding. If your workflow needs interactive line staging, stick to manual terminal commands.

What it helps with

  • stage modified files and create a commit
  • generate a commit message matching recent log style
  • commit working directory changes in a single action

Example prompts for the agent

  • /commit
  • Commit recent changes
  • Stage and commit my edits

How to install commit

1Plugin marketplace

/plugin install commit-commands@claude-plugins-official

2Manually: put the files in place

.claude/commands/commit.md

Call it with /commit. For all projects use ~/.claude/commands/

Similar

Questions about commit

How to install commit in Claude Code?

Run /plugin install commit-commands@claude-plugins-official in Claude Code, or create .claude/commands/commit.md.

What does commit do?

It inspects git status, git diff HEAD, and the last 10 commits, stages the files, and creates a commit.

Which Bash tools does this command allow?

It only permits git add, git status, and git commit. No other terminal commands can be executed.

Source text

commit.md · Apache-2.0
---
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

Based on the above changes, create a single git commit.

You have the capability to call multiple tools in a single response. Stage and create the commit using a single message. Do not use any other tools or do anything else. Do not send any other text or messages besides these tool calls.

© Anthropic · Apache-2.0 · anthropics/claude-plugins-official

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor