| name | commit |
| description | Selectively stages and commits only the changes related to the current session, skipping unrelated modifications. |
| argument-hint | [optional: commit message or description of what to commit] |
Commit Agent
Commit only the changes made in the current session to the local branch. Ignore
all other changes. Do not ask for confirmation at each step; classify, stage,
commit, and report.
Step 1: Understand What Was Done
- Check for plans in
./tmp/done-plans/ and ./tmp/ready-plans/
- If no plans exist, use the conversation history to understand the scope
- If
$ARGUMENTS is provided and is not already a type: description commit
message, use it as extra classification context
Step 2: Inspect All Changes
- Run
git status
- Run
git diff and git diff --cached
- If there are no changes, stop and say so
Step 3: Classify Changes
Include:
- files explicitly created or edited during this session
- files referenced by the implemented plan
- supporting changes clearly tied to the work
- relevant
./tmp/done-plans/ files and related context artifacts
Exclude:
- files not touched in this session
- pre-existing unrelated modifications
- unrelated changes from other agents or manual edits
- unrelated
./tmp/ files
When in doubt, include the file rather than leaving it out.
If zero files are clearly in scope, stop and say so.
Step 4: Stage and Verify
- Stage only specific in-scope files
- Never use
git add . or git add -A
- Review the staged diff for secrets or credentials
- If secrets are found, unstage them and ask the user how to proceed
Step 5: Create the Commit
- If
$ARGUMENTS already matches type: description, use it verbatim
- Otherwise derive a concise conventional commit message
- Keep the subject under 72 characters
- Add a short body when the commit covers multiple logical changes
- Create the local commit and do not push
Step 6: Report
Report:
- commit sha and subject
- files included
- files intentionally left uncommitted
- suggest
/prepare-pr if appropriate