You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c37c75b
Browse filesBrowse the repository at this point in the historyBrowse files
ref(skill): Defer to the shared Sentry skills in create-java-pr
Branch naming, commit format, and PR title format now come from create-branch, commit, and
pr-writer instead of local copies that had already drifted (the commit types lacked revert).
Add #skip-changelog to the first PR body instead of editing it afterwards, and write PR bodies
to per-branch or per-PR files. The shared /tmp/pr-body.md outlives sessions and once opened a
PR with another PR's body.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .claude/skills/create-java-pr/SKILL.md
+12-35Lines changed: 12 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,17 +55,7 @@ If the user explicitly says "stack", "stacked PR", or provides numbered stack ti
55
55
56
56
## Step 1: Ensure Feature Branch
57
57
58
-
```bash
59
-
git branch --show-current
60
-
```
61
-
62
-
If on `main` or `master`, create and switch to a new branch:
63
-
64
-
```bash
65
-
git checkout -b <type>/<short-description>
66
-
```
67
-
68
-
Derive the branch name from the changes being made. Use `feat/`, `fix/`, `ref/`, etc. matching the commit type conventions.
58
+
If on `main` or `master`, invoke the `sentry-skills:create-branch` skill.
69
59
70
60
**For stacked PRs:** For the first PR in a new stack, first create and push the collection branch (see `references/stacked-prs.md` § "Why a Collection Branch"), then branch the PR off it. For subsequent PRs, branch off the previous stack branch. Give every branch in the stack a shared prefix naming the feature, with a descriptive suffix per PR.
71
61
@@ -89,13 +79,7 @@ Check for uncommitted changes:
89
79
git status --porcelain
90
80
```
91
81
92
-
If there are uncommitted changes, invoke the `sentry-skills:commit` skill to stage and commit them following [Sentry commit message conventions](https://develop.sentry.dev/engineering-practices/commit-messages/):
If there are uncommitted changes, invoke the `sentry-skills:commit` skill to stage and commit them.
99
83
100
84
**Important:** When staging, ignore changes that are only relevant for local testing and should not be part of the PR. Common examples:
101
85
@@ -128,22 +112,19 @@ default body shape — it is the single source of truth for the sections and che
128
112
reproduce it from memory. Fill in each section based on the changes being PR'd, drop the HTML
129
113
comment hints, and check any checklist items that apply.
130
114
131
-
**PR title format** — same as the commit subject (Step 3):
132
-
133
-
```
134
-
<type>(<scope>): <Subject>
135
-
```
115
+
Write the body to `/tmp/pr-body-<branch>.md`, with each `/` in the branch name replaced by `-`, not
116
+
to pr-writer's `/tmp/pr-body.md`: that file outlives sessions and can still hold another PR's body.
117
+
Run `gh pr create` only after the write succeeds.
136
118
137
-
Examples:
138
-
- `feat(core): Add structured logging support`
139
-
- `fix(android): Prevent crash on API 21 when registering receiver`
119
+
If the change needs no changelog entry (see Step 6), make `#skip-changelog` the last line of the
120
+
body to disable the changelog CI check.
140
121
141
122
**For stacked PRs:**
142
123
143
124
- Pass `--base <previous-stack-branch>` so the PR targets the previous branch (first PR in a stack targets the collection branch).
144
125
- Use the stacked PR title format: `<type>(<scope>): [<Topic> <N>] <Subject>` (see `references/stacked-prs.md` § "PR Title Naming").
145
126
- Include the stack list at the top of the PR body, before the `## :scroll: Description` section (see `references/stacked-prs.md` § "Stack List in PR Description" for the format).
146
-
- Add a merge method reminder at the very end of the PR body (see `references/stacked-prs.md` § "Stack List in PR Description" for the exact text). This only applies to stack PRs, not the collection branch PR.
127
+
- Add a merge method reminder at the end of the PR body, above any `#skip-changelog` (see `references/stacked-prs.md` § "Stack List in PR Description" for the exact text). This only applies to stack PRs, not the collection branch PR.
147
128
148
129
Then continue to Step 5.5 (stacked PRs only) or Step 6.
149
130
@@ -157,7 +138,8 @@ Edit each body using the procedure in § "Editing PR Descriptions" below.
157
138
158
139
## Step 6: Update Changelog
159
140
160
-
First, determine whether a changelog entry is needed. **Skip this step** (and go straight to "No changelog needed" below) if the changes are not user-facing, for example:
141
+
Decide whether a changelog entry is needed before Step 5, which adds `#skip-changelog` to the PR
142
+
body when it is not. **Skip this step** if the changes are not user-facing, for example:
161
143
162
144
- Test-only changes (new tests, test refactors, test fixtures)
163
145
- CI/CD or build configuration changes
@@ -203,16 +185,11 @@ git commit -m "changelog"
203
185
git push
204
186
```
205
187
206
-
### No changelog needed
207
-
208
-
If no changelog entry is needed, append `#skip-changelog` to the end of the PR description to disable
209
-
the changelog CI check, using the procedure in § "Editing PR Descriptions" below.
210
-
211
188
## Editing PR Descriptions
212
189
213
190
Do not use shell redirects (`>`, `>>`), pipes (`|`), or compound commands (`&&`, `||`). These create
214
191
compound shell expressions that won't match permission patterns. Instead:
215
192
216
193
1. Read the body with `gh pr view <PR_NUMBER> --json body --jq '.body'` (output is returned directly)
217
-
2. Use the `Write` tool to save it to `/tmp/pr-body.md`, and the `Edit` tool to modify it
218
-
3. Update with `gh pr edit <PR_NUMBER> --body-file /tmp/pr-body.md`
194
+
2. Use the `Write` tool to save it to `/tmp/pr-body-<PR_NUMBER>.md`, and the `Edit` tool to modify it
195
+
3. Once the write succeeds, update with `gh pr edit <PR_NUMBER> --body-file /tmp/pr-body-<PR_NUMBER>.md`
0 commit comments