Commit 4120d34
feat(skills): add github-complete-pr and rename github-pr to github-create-update-pr (#11)
* feat(skills): add github-complete-pr and rename github-pr to github-create-update-pr
Add a new skill that defines post-merge cleanup steps (switch back to the
repository default branch, fast-forward it, delete the feature branch
locally and on the remote if it still exists). Rename the existing
github-pr skill to github-create-update-pr to make room for the full
create/update/complete PR lifecycle.
Also drop the per-skill table and skill listing from README so the
catalogue does not need updating on every new skill.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(skills): use explicit if/else for remote branch deletion in github-complete-pr
The previous `git ls-remote ... && git push --delete ... || echo "already
deleted"` chain would also print "already deleted" when `git push` itself
failed (permissions, network), masking real errors. Replace both
occurrences with an explicit `if/else` so `git push` failures surface as
errors.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(skills): harden github-complete-pr force-delete and full recipe
Rule §4 now distinguishes MERGED from CLOSED (unmerged) when allowing
force-delete, and calls out the data-loss tradeoff for closed branches
whose commits live nowhere else.
Full Recipe now enforces Rule §1 by capturing PR state and headRefName
from `gh pr view` and aborting when state is OPEN, refuses to delete
default/protected branches, and only force-deletes after state has been
validated (no more unconditional `|| git branch -D`). Deriving
FEATURE_BRANCH from the PR prevents a mistyped argument from targeting
the wrong branch.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(skills): gate force-delete on MERGED state in github-complete-pr recipe
The recipe's safe-delete fallback previously ran `git branch -D`
whenever `-d` failed, even for CLOSED (unmerged) PRs. This contradicted
Rule §4, which requires explicit user confirmation before discarding
commits that live only on a closed-unmerged branch.
The fallback now branches on $PR_STATE: auto force-delete for MERGED
(safe — commits are preserved under a new hash on the default branch);
abort with rerun instructions for any other state so the user must
opt in explicitly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(skills): add github-resolve-pr for triaging PR review comments
Defines a consistent workflow for addressing review feedback on a PR:
fetch unresolved threads via GraphQL, judge each comment on technical
merit (not auto-accept for bots, not auto-reject for disagreement),
apply fixes on the PR branch with conventional commits, always reply
with either a fix summary or a rationale for declining, and only
resolve threads after push + reply. Force-delete of threads declined
without user authorization is explicitly forbidden.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(skills): address PR review feedback on resolve-pr and complete-pr
- github-resolve-pr: align the frontmatter description and Overview
with Rule §8 — only fixed threads (or declines the user explicitly
authorized closing) should be resolved. Silent resolution of a
decline is now explicitly called out as forbidden.
- github-resolve-pr: replace the French word "traiter" in the trigger
list with "handle" to comply with the docs-english skill.
- github-complete-pr: validate $DEFAULT after `gh repo view` in the
full recipe and abort with a clear error when empty (gh auth/config
issues or not a git repo) before running any checkout or delete
steps.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(skills): verify CI workflow status in github-create-update-pr
Add a new rule that requires verifying CI completion after `gh pr create`
or any push updating an open PR. Detects absence of workflows and
no-ops; otherwise waits via `gh pr checks --watch --fail-fast`, fetches
failing logs with `gh run view --log-failed`, and categorises failures
(code defect, broken workflow, pre-existing unrelated failure, flake)
rather than blindly adding retries or `continue-on-error`. Explicitly
forbids merging around red CI without informed authorization.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(skills): prefer --jq over -q and add pagination guidance
- github-complete-pr: replace `-q` with `--jq` in all four `gh pr view`
/ `gh repo view` calls for consistency with the existing
`github-actions` skill and readability.
- github-resolve-pr: Rule §1 now calls out that the fixed-size
GraphQL query can truncate on large PRs and points readers at the
paginated Full Recipe snippet. The Full Recipe itself loops through
`reviewThreads.pageInfo.endCursor` until `hasNextPage` is false and
notes that per-thread `comments.pageInfo` also needs paginating when
a thread has more than 20 turns.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* refactor(skills): resolve declined threads too in github-resolve-pr
Previously Rule §8 required leaving declined threads unresolved unless
the user explicitly authorized closing them. In practice this left
threads open forever once the rationale was on the record, burying the
still-actionable ones under noise.
Flip the default: resolve every thread — fix or decline — as long as a
substantive reply was posted first. Silent resolution (without a reply)
remains explicitly forbidden. Also reframe Rule §8 around that single
invariant (never resolve without replying) and call out the
reviewer-pushback path where a re-opened thread must be treated as a
fresh unresolved item.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent f2fea77 commit 4120d34
5 files changed
Lines changed: 564 additions & 124 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 7 | + | |
12 | 8 | | |
13 | 9 | | |
14 | 10 | | |
| |||
71 | 67 | | |
72 | 68 | | |
73 | 69 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 70 | + | |
81 | 71 | | |
82 | 72 | | |
83 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
0 commit comments