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.
/plugin install commit-commands@claude-plugins-officialWhat 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-official2Manually: put the files in place
.claude/commands/commit.mdCall it with /commit. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/commit.mdCall it with /prompts:commit. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/commit.prompt.mdManually: put the files in place
.gemini/commands/commit.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
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