stage-commit — Claude Code command: commits and setup
The stage-commit command hands working-directory changes to a background commit subagent. Use it to create grouped commits and keep going until Git reports a clean tree.
no license ★ 406 updated 2026-06-25
.claude/commands/stage-commit.mdWhat stage-commit does
Run /stage-commit to start the commit subagent in the background. It stages eligible changes and makes separate commits for related work, repeating the process until git status shows a clean tree. The command does not wait for the agent to finish.
The agent keeps secrets, IDE files, logs, build outputs, and .DS_Store out of commits. When .gitignore does not exclude those files, it leaves them unstaged and reports that. Each commit message gets a trailer naming the current model, so that identity must be substituted before the task is handed off.
What it helps with
- Commit eligible changes across the working directory
- Split unrelated work into coherent commits
- Keep secrets and generated files out of the index
- Repeat commits until Git reports a clean tree
Example prompts for the agent
- Run
/stage-commitand commit the eligible changes in this working directory. - Group related edits into separate commits and leave secrets unstaged.
- Keep going until
git statusshows a clean tree.
How to install stage-commit
Manually: put the files in place
.claude/commands/stage-commit.mdCall it with /stage-commit. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/stage-commit.mdCall it with /prompts:stage-commit. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/stage-commit.prompt.mdManually: put the files in place
.gemini/commands/stage-commit.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about stage-commit
How do I install stage-commit in Claude Code?
Add the command file to your project at .claude/commands/stage-commit.md.
What does stage-commit do?
It launches the commit subagent in the background to stage eligible changes and make grouped commits until Git is clean.
Which files does stage-commit keep out of commits?
The agent excludes secrets, .DS_Store, editor and IDE files, logs, and build outputs. If .gitignore does not filter them, it leaves them unstaged and reports that.