/gitx:commit-push [--worktree <worktree>] [(--files <file>+)+ | --context <description> | --multi | --staged] [--no-push]from gitx
Commits and pushes changes with smart file grouping and conventional messages
Ships in gitx. Installing the plugin adds it to Claude Code.
Commit changes with conventional messages and optional smart grouping.
Extract from $ARGUMENTS or hook additional context:
--files, and each --files creates a separate commit.
Here identified as $GROUPS for the array of file groups,
$GROUPS[i] for the i-th file group, and $MODE="lists"--context is present.
Select files matching a contextual description.
Here identified as $DESCRIPTION for the context description,
and $MODE="context-description"--multi is present,
Intelligent grouping of files into multiple logical commits.
Here identified as $MODE="multi-commit"--staged is present,
commit only the files that are already staged in the git index.
Here identified as $MODE="staged" and $STAGED_ONLY="true".--no-push is present,
Create commits but skip push. Here identified as $NO_PUSH="true"
if the no-push flag is present, otherwise $NO_PUSH="false".
Also set $STAGED_ONLY="false" for all non-staged modes.Each $GROUPS[i] represents a separate list of files for a individual commit.
Skip to Phase 2.
Launch the file-selector agent to determine which files match the description:
Agent(subagent_type: "gitx:commit:file-selector", prompt: "$DESCRIPTION", description: "Select commit files")
Store the returned JSON array directly as $GROUPS[0].
Use the Agent tool to spawn the agent change-grouper to intelligently group files:
Agent(subagent_type: gitx:commit:change-grouper, prompt: "Group the changed files into logical commits", description: "Group commit files")
Store the result as $GROUPS.
Get the list of currently staged files:
Bash(git diff --cached --name-only)
If no files are staged, inform the user and stop.
Store the returned file list as $GROUPS[0].
For EACH file group in $GROUPS, use the Agent tool to spawn the agent gitx:commit:commit-writer IN PARALLEL:
For each $group in $GROUPS:
Agent(subagent_type: gitx:commit:commit-writer, prompt: "$group", description: "Generate commit message")
If $DESCRIPTION exists (from context-description mode), include it in the prompt:
prompt: "<task>$DESCRIPTION</task> $group"
Store a map of agent id to the index of the group in $TASK_AGENTS_MAP.
The agent will generate a conventional commit message storing in a map of agent id to the message in $MESSAGES.
Wait for all tasks to complete, collecting each result as a pair: ($GROUPS[$TASK_AGENTS_MAP[$agent_id]], $MESSAGES[$agent_id])
Store all output in an array $OUTPUTS
Build commit pairs json:
{
"no_push": $NO_PUSH,
"staged_only": $STAGED_ONLY,
"pairs": [
{"files": [$OUTPUTS[0][0]], "message": "$OUTPUTS[0][1]"},
{"files": [$OUTPUTS[1][0]], "message": "$OUTPUTS[1][1]"}
]
}
Escape that JSON and store it in $JSON_COMMIT_PAIRS. Execute the commit-push script directly:
Bash(${CLAUDE_PLUGIN_ROOT}/scripts/commits/commit-push-execute.sh "${CLAUDE_PLUGIN_ROOT}" "$JSON_COMMIT_PAIRS")
The script will stage files, create commits, push to remote, and return results.
{
"no_push": false,
"staged_only": false,
"pairs": [
{"files": ["src/a.ts", "src/b.ts"], "message": "feat(core): ..."},
{"files": ["test.ts"], "message": "test(core): ..."}
]
}
The script outputs results directly. Display the formatted output to the user showing:
If push failed, follow the hook's suggestion to ask the user about rebase vs force push.
/gitx:commit-push
/gitx:commit-push --files src/auth.ts tests/auth.test.ts --files README.md
Creates two commits: one for auth files, one for README.
/gitx:commit-push --context "authentication changes"
Selects files related to authentication, creates one commit.
/gitx:commit-push --multi
Analyzes all changes and creates separate commits for each logical group.
/gitx:commit-push --staged
Commits only files already in the staging area without re-staging.
/gitx:commit-push --no-push
Creates commit(s) but doesn't push to remote.
What the command file sets; muted values are Claude Code's defaults
haiku7-day visitors to each command page
21 commands in this plugin
/address-ciAddress CI Failures - Multi-Agent PipelineResponds to CI failures with multi-agent analysis, planning, and automated fixes./address-reviewStep 0: Hook Additional Context ParsingResponds to PR review comments when feedback needs addressing. Use for iterating on pull request feedback./comment-to-issueComment on IssueComments on a GitHub issue when sharing progress or updates. Use for team communication or documenting work./comment-to-prComment on Pull RequestComments on a pull request when sharing status or responding. Use for PR discussion or posting summaries./create-issueCreate IssueCreate a GitHub issue from informal description/fix-issueFix IssueOrchestrates full fix workflow when addressing a GitHub issue. Use for end-to-end issue resolution with worktree setup.npx claudepluginhub jaodsilv/claudius --plugin gitxOther plugins' commands for the same job