ワンクリックで
commit-push-task
Commit changes on the worktree branch, fast-forward merge into the task branch, and push the task branch
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Commit changes on the worktree branch, fast-forward merge into the task branch, and push the task branch
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Work on a Claude Manager task whose changes ship as a STACK of dependent PRs (one PR per commit, via `git spr`). Use when the task has stacked-PR mode enabled, or the user wants to split a task's work into a chain of small, dependent, independently-reviewable PRs.
Update the shared task context file with current progress
| name | commit-push-task |
| description | Commit changes on the worktree branch, fast-forward merge into the task branch, and push the task branch |
| user-invocable | true |
Commit any pending changes on the current worktree branch, fast-forward merge them into the task branch, then push the task branch to origin. Never push the worktree branch.
The session's startup system reminder identifies:
If those lines are not present, abort and ask the user for the task branch name.
Determine the worktree path. The current working directory is a git worktree.
Check for uncommitted changes:
git status --porcelain
If there are changes, stage and commit them on the current (worktree) branch:
git add -A
git commit -m "<short message describing the change>"
Choose a concise, conventional commit message based on the diff. Do NOT include any "Generated by" / co-author trailers.
Confirm the current branch matches the worktree branch from the system reminder:
git rev-parse --abbrev-ref HEAD
If it does not match, abort and report the mismatch.
Locate the main project repository (not the worktree). Use:
git worktree list
The first entry (or the one not marked as the current worktree) is the main repository path. Run all subsequent task-branch operations there with git -C <main-repo-path> ....
Fast-forward merge the worktree branch into the task branch in the main repo:
git -C <main-repo-path> fetch . <worktree-branch>:<task-branch>
The fetch . src:dst form performs a fast-forward update of <task-branch> to <worktree-branch>. It refuses to run if the merge would not be fast-forward.
If the fast-forward fails because the task branch has diverged:
stacked-pr skill): divergence is expected — publishing the stack rewrites the task branch history (git spr rebases onto trunk + adds commit-id: trailers), so a worktree forked before the last publish no longer fast-forwards. Recover by rebasing the worktree's new commits onto the task tip, then fast-forwarding:
# on the worktree branch, in the worktree:
git fetch <main-repo-path> <task-branch>
git rebase FETCH_HEAD # replays only the worktree's new commits onto the task tip
# resolve any conflicts (git add → git rebase --continue), then ff as above:
git -C <main-repo-path> fetch . <worktree-branch>:<task-branch>
This replays just the worktree's unique commits, so the ff then succeeds. Only do this for stacked tasks or when the user confirms.Push only the task branch:
git -C <main-repo-path> push origin <task-branch>
Do NOT push the worktree branch. Do NOT use --force or --force-with-lease unless the user explicitly asks.
Report a one-line summary: commit SHA (if a new commit was made), task branch updated to that SHA, and push result.
--no-verify. Report the failure and stop.