Skip to content

Commit 4d909c3

Browse files
committed
chore: extract common skill conventions into CLAUDE.md
Move the shared commit/PR conventions and JS-mirroring notes out of the roll skill into a top-level CLAUDE.md, aligned with the upstream playwright CLAUDE.md.
1 parent c949d83 commit 4d909c3

2 files changed

Lines changed: 45 additions & 34 deletions

File tree

.claude/skills/playwright-roll/SKILL.md

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Rolling includes:
5353

5454
## Mimicking the JavaScript implementation
5555

56-
The Java client is a port of the JS client in `../playwright/packages/playwright-core/src/client/`. When implementing a new or changed method, always read the corresponding JS file first and mirror its logic:
56+
The Java client is a port of the JS client in `../playwright/packages/playwright-core/src/client/` (see CLAUDE.md). When implementing a new or changed method, always read the corresponding JS file first and mirror its logic:
5757

5858
```
5959
../playwright/packages/playwright-core/src/client/browserContext.ts
@@ -167,36 +167,4 @@ When you've identified a hanging test:
167167

168168
## Commit Convention
169169

170-
Semantic commit messages: `label(scope): description`
171-
172-
Labels: `fix`, `feat`, `chore`, `docs`, `test`, `devops`
173-
174-
```bash
175-
git checkout -b fix-39562
176-
# ... make changes ...
177-
git add <changed-files>
178-
git commit -m "$(cat <<'EOF'
179-
fix(proxy): handle SOCKS proxy authentication
180-
181-
Fixes: https://github.com/microsoft/playwright-java/issues/39562
182-
EOF
183-
)"
184-
git push origin fix-39562
185-
gh pr create --repo microsoft/playwright-java --head username:fix-39562 \
186-
--title "fix(proxy): handle SOCKS proxy authentication" \
187-
--body "$(cat <<'EOF'
188-
## Summary
189-
- <describe the change very! briefly>
190-
191-
Fixes https://github.com/microsoft/playwright-java/issues/39562
192-
EOF
193-
)"
194-
```
195-
196-
Never add Co-Authored-By agents in commit message.
197-
Never add "Generated with" in commit message.
198-
Branch naming for issue fixes: `fix-<issue-number>`
199-
200-
## Tips & Tricks
201-
- Project checkouts are in the parent directory (`../`).
202-
- use the "gh" cli to interact with GitHub
170+
Commit and PR conventions live in CLAUDE.md. Use the running notes file as the PR body: list each upstream PR ported, each skipped (with reason), and each verified-already-supported.

CLAUDE.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Playwright Java
2+
3+
The Java client is a port of the JavaScript client in `../playwright/packages/playwright-core/src/client/`. When implementing or changing a method, read the corresponding JS file first and mirror its logic.
4+
5+
Project checkouts (including the upstream `playwright` repo) live in the parent directory (`../`). Use the `gh` cli to interact with GitHub.
6+
7+
## Commit Convention
8+
9+
Semantic commit messages: `label(scope): description`
10+
11+
Labels: `fix`, `feat`, `chore`, `docs`, `test`, `devops`
12+
13+
```bash
14+
git checkout -b fix-39562
15+
# ... make changes ...
16+
git add <changed-files>
17+
git commit -m "$(cat <<'EOF'
18+
fix(proxy): handle SOCKS proxy authentication
19+
20+
Fixes: https://github.com/microsoft/playwright-java/issues/39562
21+
EOF
22+
)"
23+
# **Never `git push` without an explicit instruction to push.**
24+
git push origin fix-39562
25+
gh pr create --repo microsoft/playwright-java --head <user>:fix-39562 \
26+
--title "fix(proxy): handle SOCKS proxy authentication" \
27+
--body "$(cat <<'EOF'
28+
## Summary
29+
- <describe the change very! briefly>
30+
31+
Fixes https://github.com/microsoft/playwright-java/issues/39562
32+
EOF
33+
)"
34+
```
35+
36+
Never add Co-Authored-By agents in commit message.
37+
Never add "Generated with" in commit message.
38+
Never add test plan to PR description. Keep PR description short — a few bullet points at most.
39+
Branch naming for issue fixes: `fix-<issue-number>`.
40+
41+
**Never amend commits.** Always create a new commit for follow-up changes, even when iterating on an open PR. Amending rewrites history and forces a force-push, losing the incremental review trail. Only amend if the user explicitly says so.
42+
43+
**Never `git push` without an explicit instruction to push.** Applies even when a PR is already open for the branch — additional commits are immediately visible to reviewers. Commit locally, report what was committed, and wait. Only push when the user's message contains "push", "upload", "create PR", "ship it", or equivalent.

0 commit comments

Comments
 (0)