From d008874c14e8bc20fc48ab59e7b87079c77b509e Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Wed, 18 Feb 2026 13:12:11 +0100 Subject: [PATCH] chore(skills): add commit step to push-pr workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit push-pr now runs /commit first when uncommitted changes are detected, making it a one-stop commit→push→PR command. Added Skill to allowed-tools for cross-skill invocation. Co-Authored-By: Claude Opus 4.6 --- .claude/skills/push-pr/SKILL.md | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/.claude/skills/push-pr/SKILL.md b/.claude/skills/push-pr/SKILL.md index 739a7b58a..bc11044ec 100644 --- a/.claude/skills/push-pr/SKILL.md +++ b/.claude/skills/push-pr/SKILL.md @@ -8,7 +8,7 @@ description: > existing PR was updated. NEVER merges the PR into main — this skill only pushes to the branch and manages the PR lifecycle. user-invocable: true -allowed-tools: Bash, Read, Grep, Glob, AskUserQuestion +allowed-tools: Bash, Read, Grep, Glob, AskUserQuestion, Skill --- # Push PR Skill @@ -34,17 +34,29 @@ git branch --show-current If on `main`, stop: "You're on main. Switch to a team branch first." -### 2. Check for unpushed commits +### 2. Commit uncommitted changes + +```bash +git status +``` + +If there are uncommitted changes (staged or unstaged), run the **commit skill** +first. Use the `/commit` skill to group changes into logical commits with +proper conventional commit messages. Wait for commit to complete before +proceeding. + +If the working tree is clean (no uncommitted changes), skip to step 3. + +### 3. Check for unpushed commits ```bash git fetch --all -git status git log --oneline origin/.. ``` -If no unpushed commits, skip to step 4 (PR check). +If no unpushed commits, skip to step 5 (PR check). -### 3. Check for conflicts with main +### 4. Check for conflicts with main ```bash git merge-tree --write-tree origin/main HEAD 2>&1 @@ -59,7 +71,7 @@ git merge origin/main --no-edit If merge conflicts, **stop and report** — let the user resolve. If clean, continue. -### 4. Push +### 5. Push ```bash git push origin @@ -67,7 +79,7 @@ git push origin If push fails, stop and report. Never force-push without explicit request. -### 5. Check for existing PR +### 6. Check for existing PR ```bash tea pr list --login schweitz --repo jpmschweitzer/settled-reach --state open --output simple @@ -76,9 +88,9 @@ tea pr list --login schweitz --repo jpmschweitzer/settled-reach --state open --o Match current branch name in PR list. - **PR exists**: Report "Pushed N commits to ``. PR #X updated." Done. -- **No PR**: Continue to step 6. +- **No PR**: Continue to step 7. -### 6. Create a new PR +### 7. Create a new PR ```bash git log --oneline main.. @@ -103,7 +115,7 @@ tea pr create \ Report PR URL when done. -### 7. Update ticket status to review +### 8. Update ticket status to review Scan all commit messages in the PR for ticket references (`#NNN`):