ce-commit-push-pr
Git Commit, Push, and PR
Asking the user: When this skill says "ask the user", use the platform's blocking question tool: AskUserQuestion in Claude Code (call ToolSearch with select:AskUserQuestion first if its schema isn't loaded), request_user_input in Codex, ask_question in Antigravity CLI (agy), ask_user in Pi (requires the pi-ask-user extension). Fall back to presenting the question in chat only when no blocking tool exists in the harness or the call errors (e.g., Codex edit modes) — not because a schema load is required. Never silently skip the question.
Mode
- Description-only — user wants just a description ("write/draft a PR description", "describe this PR", or pasted a PR URL/number alone). Run Step 4 only; print the result. Apply only if the user asks. If a PR ref was pasted, pass it to Step 4 so Pre-A resolves the right range.
- Description update — user wants to refresh/rewrite an existing PR's description with no commit/push intent. Determine PR presence with the same rule used everywhere: only an exit-0
[]from the existing-PR check means "no open PR" (report and stop); a non-zero check is unknown (resolvegh auth status/ connectivity first — never treat it as "no PR"). With an open PR, run Step 4 (PR mode using the existing PR's URL), then Step 5 to preview, confirm, and apply viagh pr edit. - Full workflow — otherwise. Run Steps 1-5 in order. When user intent or standing preference wants a PR stack, enter Stack mode (below) instead of ordinary single-PR create in Step 5; do not add
posture:to this skill's argument-hint.
mode:pipeline modifier — set by orchestrated callers (e.g., lfg). Run the resolved mode non-interactively: suppress every blocking ask. Step 5's existing-PR rewrite question defaults to not rewriting; in description-update mode the preview ask is skipped and the rewrite applies directly (the update invocation itself is the apply intent); any other suppressed ask takes its conservative documented default (keep the current branch; if Pre-A cannot resolve a base, stop and report rather than guess). Pipeline stack mode uses only intent/scope already on the invocation — never ask; pass posture into the babysit handoff args when stacking.
Stack mode (opt-in)
Opt-in only. Enter stack mode when user intent or standing preference wants a multi-PR stack. An explicit stack request is required intent — do not re-read it as a single PR with a custom --base. Do not proactively suggest PR stacks. When the user did not ask for one, refuse nonsense stacks (one logical change, artificial slices) and stay on the single-PR path.
When stack mode is active, load references/stack-submit.md before Step 3. At this point follow only its Probe, Topology, and, when needed, Retrospective construction sections; do not submit. When that reference constructs a retrospective stack, its layer-by-layer commit flow replaces ordinary Step 3. Step 5 exclusively owns stack submission and the reference's post-submit metadata route for PRs created in this run. Soft-depend on gh stack CLI only. On missing/unavailable CLI: required stack intent → hard-stop with residual; soft intent → residual + ordinary single-PR create.
After successful submit with ready (non-draft) PRs, continue to the babysit handoff below using the bottom open non-draft PR. Derive babysit posture from ship intent: default posture:stack-ready; use posture:stack-land only when land/merge-when-green intent is explicit. Pass that posture on the ce-babysit-pr invocation (do not put posture: on this skill's argument-hint). Draft-only submit → hard residual before babysit when babysit is on.