PluginInstalls cleanly
Save your work to Git with one command
commit-commands
Anthropic's plugin adds /commit to save your changes in Git with a written message, and /commit-push-pr to also upload them and open a pull request.
- Works with
- Claude Code
- Good for
- Build an app
What it does
Git is a tool that saves snapshots of your project, called commits, so you can go back if something breaks. Many beginners never save snapshots because the commands feel hard. This plugin from Anthropic turns that into one command.
/commit looks at what changed and at your last ten commit messages, writes a message in the same style and saves the snapshot. /commit-push-pr goes further: it makes a new branch if you are on main, saves the snapshot, uploads it to GitHub and opens a pull request. A pull request is a request to merge your change that others can review. /clean_gone tidies up old local branches that were already deleted on GitHub.
Read this first. Three things can surprise you:
- No preview.
/commitand/commit-push-prtell Claude to do every step in one go and to send no other text. You see the commit after it is made, not before. If you want to check first, ask in plain words instead: "Show me what you would commit." - Secrets are not filtered. The README says
/commitavoids files with secrets, such as.env. The command file has no such rule, and it lets Claude rungit addwithout asking. Make sure secret files are listed in a.gitignorefile before you use it. /clean_gonedeletes with force. It deletes each local branch whose GitHub copy is gone withgit branch -D, and removes its worktree withgit worktree remove --force. Work that you did not save or upload in those places can be lost. This command pre-approves nothing, so Claude Code asks you before each step unless your own settings already allow it.
The commands are short instructions to Claude, so you can read exactly what each one does in the plugin's commands folder. The README says commit messages include a Claude Code attribution line. That line comes from Claude Code's own attribution setting, not from the command file (our reading).
Who it is for
Beginners who build with Claude Code and want to save their work in Git often, without learning the git commands first.
Example prompts
- "/commit-commands:commit"
- "/commit-commands:commit-push-pr"
- "/commit-commands:clean_gone"
- "Show me what you would commit before you run /commit."
How to install
/plugin install commit-commands@claude-plugins-officialHow to use it
When you are happy with a change, type /commit-commands:commit. To also upload the change and open a pull request on GitHub, type /commit-commands:commit-push-pr.
Check it works
The Claude Code docs use this plugin as their example. After install, type / and look for /commit-commands:commit. If it does not appear, the docs point to "After install: plugin not working".
Common problems
/commit-commands:commitdoes not appear — the plugin did not load — follow the docs section "After install: plugin not working".- /commit-push-pr cannot open a pull request — the GitHub CLI is missing or not signed in, or the project has no remote called origin — install gh and run
gh auth loginfirst (README). - /commit fails at the start — the folder is not a Git project yet, so
git statusfails — ask Claude to set up Git in the folder first (our reading). - /clean_gone finds no branches — your computer does not know yet that the branches were deleted on GitHub — run
git fetch --prunefirst (README).
What to watch out for
- While a command runs, Claude may use the git commands named in its allowed-tools without asking you each time: git add, git status and git commit for /commit; also git push, gh pr create and a git checkout form for /commit-push-pr (commands/*.md)
- /commit and /commit-push-pr tell Claude to do all the steps at once and send no other text, so you do not see the commit message before the commit is made (commands/*.md)
- The README says /commit avoids files with secrets such as .env, but the command file has no such rule and pre-approves git add; keep secrets out with a .gitignore file (our reading)
- /commit-push-pr uploads your changes to GitHub and opens a pull request, which others with access can see; it needs the GitHub CLI (gh) installed and signed in (README)
- /clean_gone deletes local branches whose GitHub copy is gone with git branch -D, and removes their worktrees with --force; unsaved or unpushed work in them can be lost (commands/clean_gone.md)
Licence and author
- Licence
- Apache-2.0
- Author
- Anthropic
How we tested it
We installed it on an empty test computer on 20 Oct 2026. Installed and started in a clean test system. Not yet used in a real AI session.
No command was run on a Git project. Not yet used on real work.
Technical details of the test
- Date
- 20 Oct 2026
- Method
- Intake sandbox run on 2026-10-20 in a clean container with no account: cloned the repository and checked its skill, agent and plugin files; installed commit-commands@claude-plugins-official with the Claude Code command line.
Checked again on 20 Oct 2026
Alternatives
- cc-safety-net — blocks risky git and shell commands; it does not write commits.
- Doing it by hand — ask Claude "commit my changes" without the plugin; the plugin just makes the steps the same every time.
FAQ
Does /commit upload anything? No. Only /commit-push-pr pushes to GitHub.
Do I need a GitHub account? Only for /commit-push-pr.
Can I undo a commit? Yes. Git keeps every snapshot. Ask Claude to undo the last commit and keep the changes.
Does it work in Codex or Gemini CLI? No. It is a Claude Code plugin.
Sources
- github.com/anthropics/claude-plugins-official/tree/main/plugins/commit-commands
- github.com/anthropics/claude-plugins-official/tree/main/plugins/commit-commands/commands
- github.com/anthropics/claude-plugins-official/blob/main/plugins/commit-commands/commands/clean_gone.md
- code.claude.com/docs/en/discover-plugins