既存コードの役割や読みやすさを保ちながら、命名、関数分割、コメント、型、安全な編集前後の確認を判断するためのコーディング基準を示します。
- 既存コードをレビューしたいとき
- 命名や関数分割を見直したいとき
- コメントを追加するか判断したいとき
GitHub PRの差分を確認し、変更点やアップグレード時の注意をまとめたコミットメッセージを作って、条件に応じてスカッシュマージするスキルです。
Squash merge a GitHub PR with a conventional-commit title and a body that describes everything the PR changed, so the release tooling can build the version bump and release notes from it. Use when the user says "merge", "/merge", "squash merge this PR", or "merge
実行スコア 未検証
インストール方法を見るGitHub PRの差分を確認し、変更内容を利用者向けにまとめたコミットタイトルと本文を作成します。PRのタイトルやブランチ上のコミットメッセージだけで判断せず、最終的な差分を読み、追加・変更・修正・アップグレード時の作業などを整理します。タイトルにはConventional Commits形式を使い、リリースツールがバージョン更新幅やリリースノートを判断できる形にします。PRの状態、競合、必須チェックも確認し、条件に応じてスカッシュマージまで進めます。
PRの変更点を漏れなくリリースノートへ反映したいときや、レビュー済みのPRを squash merge したいときに向いています。セルフホスト利用者に必要な環境変数やマイグレーションなどの案内を整理したい場合にも使えます。
GitHub CLIのghとGitコマンドを使います。必須チェックが失敗中または実行中の場合はマージを止めます。featによるマイナー更新、またはセルフホスト利用者に対応が必要な変更がある場合は、メッセージを提示して確認を求めます。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Squash merge one PR. The squash commit is the only thing that lands on the
base branch, so its message is the changelog entry: tooling/release reads it
twice.
next-version.ts picks the version bump from the subject: feat: /
feat(scope): is minor, everything else is patch. [minor] or [major]
anywhere in the message overrides that.release-notes.ts sends subject + body of every commit since the last
tag to a model that writes the notes self-hosters read. It is told to
describe only what the messages say, so anything missing from the body is
missing from the notes.The commit message rules in AGENTS.md ("Commit messages") apply here. Read
them if they are not already in context.
The argument is a PR number or URL. With no argument, use the PR for the
current branch (gh pr view). If there is none, stop and say so.
gh pr view <pr> --json number,title,url,body,state,isDraft,baseRefName,headRefName,mergeable,mergeStateStatus,reviewDecision,statusCheckRollup,commits,files,additions,deletions
Stop and report instead of merging when:
mergeable is CONFLICTING;statusCheckRollup). Name the
check. A failed non-required check is worth mentioning but does not block.The PR title, PR body and branch commit messages are a starting point, not the source. Branch commits are often "wip", "fix review", or describe a step that a later commit undid. Describe the end state of the diff against the base.
gh pr diff <pr> --name-only
gh pr diff <pr>
GitHub refuses diffs over 20,000 lines (HTTP 406 ... too_large). Then read
it locally instead:
git fetch -q origin <base> <head>
base=$(git merge-base origin/<base> origin/<head>)
git diff --stat "$base" origin/<head>
git diff "$base" origin/<head> -- <paths>
Branch commit bodies (git log -1 --format=%B <sha>) often explain the why
behind a fix better than the diff does; read them for the fix commits.
For a large PR (hundreds of files), start from the file list grouped by directory and the commit list, then read the diff for the parts that change behaviour: routes, procedures, jobs, schema, env, UI routes. Skip lockfiles, generated files and snapshots.
Check specifically for things a self-hoster has to act on. These are the paths
tooling/release treats as upgrade-sensitive:
self-hosting/apps/api/src/config/env.ts (new, renamed, removed or newly required env vars)packages/db/prisma/migrations/, packages/db/src/code-migrations/apps/api/Dockerfile, apps/start/DockerfileAlso note removed features, changed API/SDK behaviour, and changed defaults.
Subject
<type>(<scope>): <what changed, from the user's side> (#<number>)
type: feat only if users can do something they could not before. If the
PR mixes a feature with fixes, it is feat. Otherwise fix, perf,
refactor, docs, test, ci, chore.scope: the main area (api, dashboard, ingest, self-hosting,
sdk, ...). Leave it out if the PR spans everything.(#123) suffix.Body
Plain Markdown, written for someone running OpenPanel, not for the reviewer. Use this shape and drop any section that would be empty:
<One or two sentences: what this PR does and why.>
Added
- <new capability, one line each>
Changed
- <behaviour that is different now>
Fixed
- <bug a user could hit, and the symptom>
Upgrade notes
- <env var added/renamed/removed, migration, compose change, removed
feature, anything someone must do when upgrading>
Internal
- <refactors, tests, CI, tooling; short, grouped>
Closes #<issue>
Co-authored-by: <name> <email>
Rules:
.env, compose).Closes #N / Fixes #N references from the PR body.Co-authored-by: trailers for every other person who authored commits
on the branch (from commits[].authors), so GitHub credits them.[minor], [major], [release now], ! after the type, or a
BREAKING CHANGE: footer. Strip them if they come from branch commits. A
breaking change is described in "Upgrade notes" and pointed out to the user
in step 4; a major version is the maintainer's call.Show the user the subject and body, and say which version bump it causes
(minor for feat, otherwise patch) and whether the base is main (releases)
or another branch.
Ask with AskUserQuestion (merge as written, or change it) only when the
merge is a minor bump (feat) or the diff breaks something a self-hoster
must act on. Point out the breakage in the question. Otherwise do not ask:
show the message and continue. Never ask about anything else, such as extra
guards, smoke tests or follow-up work. Mention those in the report instead.
Write the body to a temp file so Markdown survives quoting:
body_file=$(mktemp)
cat > "$body_file" <<'EOF'
...body...
EOF
With no PR yet, push and open one with the same subject (without the
(#N) suffix) and body:
git push -u origin HEAD
gh pr create --base <base> --title "<subject>" --body-file "$body_file"
Wait for the required checks, then apply the stop conditions from step 1. If a required check fails, stop, name it, and leave the PR open:
gh pr checks <pr> --required --watch --fail-fast
Merge, with the (#N) suffix on the subject:
gh pr merge <pr> --squash --subject "<subject>" --body-file "$body_file"
rm "$body_file"
Do not pass --admin to bypass failing checks or protections, and do not pass
--delete-branch unless the user asks; the repo setting decides.
Give the merged commit (gh pr view <pr> --json mergeCommit,url), the
subject, and the bump. If the local checkout is on the base branch, say that
git pull brings it in; do not pull for the user.
まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
既存コードの役割や読みやすさを保ちながら、命名、関数分割、コメント、型、安全な編集前後の確認を判断するためのコーディング基準を示します。
現在のブランチをPRにし、CodeRabbitのレビューコメントを確認して妥当な指摘を修正し、判断理由の返信や再レビューへの対応まで進めます。
JavaScript SDKの変更をテスト用ショップで実際に操作し、ローカルAPIを経由してClickHouseに保存されたイベントや属性を確かめます。