Safely inspect a mixed git worktree, split pending changes into task-based commits, push each commit in order, and optionally open a draft PR when explicitly requested.
Use this skill when worktree changes are mixed and the user wants commits separated by task before publishing.
Operating stance: the publish request itself authorizes staging, committing, and pushing the changes it covers. Act on what the request already decides; reserve questions for decisions the request leaves genuinely open, and ask them once, batched, with concrete options. Finish the whole loop rather than stopping after the first group, and lead the final report with the outcome.
Follow references/workflow.md for the full procedure and references/grouping-rules.md for the commit-boundary rubric. The core loop:
git status -sb, git diff --stat, git branch --show-current, git remote -v. Before staging or committing for a publish, git remote get-url origin and git ls-remote origin must succeed, else stop and report the blocker with the concrete next action. Clean worktree → report nothing to publish and stop.AGENTS.md if present, plus branch/release/validation docs relevant to the changed files.git add -A; stage explicit paths only.git add -p/git add -e (non-interactive runs: apply a per-group patch to the index with git apply --cached) or commit under the dominant intent and disclose the rider. Decide clearly defensible groupings and say so; batch the genuinely ambiguous files into one question with concrete options — never group-by-group, never "shall I proceed?".git diff --cached --stat), validate and gate the push on the result, push in order, retry transient network failures up to 4 times with exponential backoff (auth failures are blockers, not retries), and finish every group or report exactly which were pushed and which were not.gh pr create --draft.These hold regardless of how autonomous the run is:
git add -A, git add .)..env, .env.*, *.pem, *.key, credentials, tokens), dependency, build,
or cache artifacts (node_modules/, __pycache__/, dist/, build/,
.venv/, *.log), or large or machine-generated blobs (roughly >5 MB, or
anything vendored or generated). Exclude such a file from the commit and flag
it in the report; if a secret appears to be committed already, stop and warn
instead of pushing. Respect .gitignore — do not force-add ignored paths.Lead with the outcome: the first sentence answers "what happened" — for example "Pushed 3 commits to origin/feature-x" or "Stopped before committing: origin rejects authentication". Then cover, in readable prose rather than fragment checklists: