commit — Claude Code subagent: what it does, how to install
Creates Git commits autonomously using ATLAS conventions without asking for approval. Handles staged files or splits working changes into clean commits.
no license ★ 406 updated 2026-11-01
.claude/agents/commit.mdWhat commit does
The subagent handles Git tasks exclusively and avoids running builds, test suites, or app servers. During inspection, it reviews status, staged diffs, and the three most recent log entries. The commit message follows a specific format: a type prefix, what changed, and why it matters. Every commit ends with a Co-Authored-By trailer pointing to the active Claude model.
In its default mode, the agent commits only staged files and halts if the staging area is empty. When running the stage-and-commit workflow, it bundles working tree edits into separate logical commits. It deliberately skips artifacts like build outputs, log files, IDE configs, and .env files.
What it helps with
- write commit messages stating both what changed and why
- group working tree modifications into separate logical commits
- commit staged changes without interactive approval prompts
- filter out build artifacts, logs, and secrets during staging
Example prompts for the agent
- Commit the staged changes right now
- Run stage-and-commit to bundle my working directory changes into coherent commits
How to install commit
Manually: put the files in place
.claude/agents/commit.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/commit.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/commit.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about commit
How do I install commit in Claude Code?
Save the subagent definition file into your project at .claude/agents/commit.md.
What does the commit subagent do?
It autonomously writes and records Git commits according to ATLAS conventions, appending a Co-Authored-By trailer for the active model.
Does commit run tests before recording changes?
No, it deliberately ignores application state and tests. Verifying code correctness is left to the caller before invoking the subagent.