jpskill.com
🛠️ 開発・MCP コミュニティ 🔴 エンジニア向け 👤 エンジニア・AI開発者

🛠️ Prライター

pr-writer

Sentryのエンジニアリングプラクティスに沿ったプルリクエストを自動作成するSkill。

⏱ MCPサーバー実装 1日 → 2時間

📺 まず動画で見る(YouTube)

▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗

※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。

📜 元の英語説明(参考)

Create pull requests following Sentry's engineering practices.

🇯🇵 日本人クリエイター向け解説

一言でいうと

Sentryのエンジニアリングプラクティスに沿ったプルリクエストを自動作成するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o pr-writer.zip https://jpskill.com/download/3309.zip && unzip -o pr-writer.zip && rm pr-writer.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/3309.zip -OutFile "$d\pr-writer.zip"; Expand-Archive "$d\pr-writer.zip" -DestinationPath $d -Force; ri "$d\pr-writer.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して pr-writer.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → pr-writer フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
1

💬 こう話しかけるだけ — サンプルプロンプト

  • Pr Writer を使って、最小構成のサンプルコードを示して
  • Pr Writer の主な使い方と注意点を教えて
  • Pr Writer を既存プロジェクトに組み込む方法を教えて

これをClaude Code に貼るだけで、このSkillが自動発動します。

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

PRライター

Sentryのエンジニアリングプラクティスに従ってプルリクエストを作成します。

必須: GitHub CLI (gh) が認証済みで利用可能であること。

使用する場面

  • プルリクエストを開く準備ができており、コミットされたブランチの差分に基づいた構造化された説明が必要な場合。
  • PR本文に、何が変更されたか、なぜ変更されたか、およびレビュアー向けのコンテキストを含めたい場合。
  • GitHub CLIを使用しており、アドホックに説明を作成するのではなく、再現性のあるPR作成ワークフローが必要な場合。

前提条件

PRを作成する前に、すべての変更がコミットされていることを確認してください。コミットされていない変更がある場合は、まず sentry-skills:commit スキルを実行して適切にコミットしてください。

# コミットされていない変更を確認する
git status --porcelain

出力にコミットされていない変更(変更されたファイル、追加されたファイル、または含めるべき追跡されていないファイル)が表示された場合は、続行する前に sentry-skills:commit スキルを呼び出してください。

プロセス

ステップ1: ブランチの状態を確認する

# デフォルトブランチを検出する — 後続のコマンドで使用するため、出力をメモしてください
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
# 現在のブランチとステータスを確認する(上記で検出したブランチ名をBASEに置き換えてください)
git status
git log BASE..HEAD --oneline

以下を確認してください:

  • すべての変更がコミットされていること
  • ブランチがリモートと同期していること
  • 必要に応じて、変更がベースブランチにリベースされていること

ステップ2: 変更を分析する

PRに含まれる内容を確認してください:

# PRに含まれるすべてのコミットを確認する(検出したブランチ名をBASEに置き換えてください)
git log BASE..HEAD

# 完全な差分を確認する
git diff BASE...HEAD

説明を作成する前に、すべての変更の範囲と目的を理解してください。

ステップ3: PRの説明を作成する

PRの説明には、この構造を使用してください(リポジトリのPRテンプレートは無視してください):

<PRが何をするかの簡単な説明>

<なぜこれらの変更が行われているのか - 動機>

<検討された代替アプローチがあれば>

<レビュアーが必要とする追加のコンテキスト>

含めないでください:

  • 「テスト計画」セクション
  • テスト手順のチェックボックスリスト
  • 差分の冗長な要約

含めてください:

  • 何を、なぜ、という明確な説明
  • 関連する課題やチケットへのリンク
  • コードからは明らかでないコンテキスト
  • 注意深いレビューが必要な特定の領域に関するメモ

ステップ4: PRを作成する

gh pr create --draft --title "<type>(<scope>): <description>" --body "$(cat <<'EOF'
<description body here>
EOF
)"

タイトルの形式はコミットの慣例に従います:

  • feat(scope): Add new feature
  • fix(scope): Fix the bug
  • ref: Refactor something

PR説明の例

機能PR

Add Slack thread replies for alert notifications

When an alert is updated or resolved, we now post a reply to the original
Slack thread instead of creating a new message. This keeps related
notifications grouped and reduces channel noise.

Previously considered posting edits to the original message, but threading
better preserves the timeline of events and works when the original message
is older than Slack's edit window.

Refs SENTRY-1234

バグ修正PR

Handle null response in user API endpoint

The user endpoint could return null for soft-deleted accounts, causing
dashboard crashes when accessing user properties. This adds a null check
and returns a proper 404 response.

Found while investigating SENTRY-5678.

Fixes SENTRY-5678

リファクタリングPR

Extract validation logic to shared module

Moves duplicate validation code from the alerts, issues, and projects
endpoints into a shared validator class. No behavior change.

This prepares for adding new validation rules in SENTRY-9999 without
duplicating logic across endpoints.

課題の参照

PR本文で課題を参照します:

構文 効果
Fixes #1234 マージ時にGitHubの課題をクローズします
Fixes SENTRY-1234 Sentryの課題をクローズします
Refs GH-1234 クローズせずにリンクします
Refs LINEAR-ABC-123 Linearの課題をリンクします

ガイドライン

  • 1つの機能/修正につき1つのPR - 無関係な変更をまとめないでください
  • PRをレビュー可能に保つ - 小さなPRはより速く、より良いレビューを受けられます
  • 理由を説明する - コードは何を示し、説明はなぜを説明します
  • WIPを早期にマークする - 早期のフィードバックのためにドラフトPRを使用してください

既存のPRの編集

PR作成後にPRを更新する必要がある場合は、gh pr edit の代わりに gh api を使用してください:

# PRの説明を更新する
gh api -X PATCH repos/{owner}/{repo}/pulls/PR_NUMBER -f body="$(cat <<'EOF'
Updated description here
EOF
)"

# PRのタイトルを更新する
gh api -X PATCH repos/{owner}/{repo}/pulls/PR_NUMBER -f title='new: Title here'

# 両方を更新する
gh api -X PATCH repos/{owner}/{repo}/pulls/PR_NUMBER \
  -f title='new: Title' \
  -f body='New description'

注: gh pr edit は現在、GitHubのProjects (classic) の非推奨化により機能していません。

参考文献

制限事項

  • このスキルは、タスクが上記で説明された範囲と明確に一致する場合にのみ使用してください。
  • 出力を、環境固有の検証、テスト、または専門家によるレビューの代わりとして扱わないでください。
  • 必要な入力、権限、安全境界、または成功基準が不足している場合は、立ち止まって説明を求めてください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

PR Writer

Create pull requests following Sentry's engineering practices.

Requires: GitHub CLI (gh) authenticated and available.

When to Use

  • You are ready to open a pull request and need a structured description based on the committed branch diff.
  • You want the PR body to capture what changed, why it changed, and any reviewer context.
  • You are using GitHub CLI and need a repeatable PR-writing workflow rather than writing the description ad hoc.

Prerequisites

Before creating a PR, ensure all changes are committed. If there are uncommitted changes, run the sentry-skills:commit skill first to commit them properly.

# Check for uncommitted changes
git status --porcelain

If the output shows any uncommitted changes (modified, added, or untracked files that should be included), invoke the sentry-skills:commit skill before proceeding.

Process

Step 1: Verify Branch State

# Detect the default branch — note the output for use in subsequent commands
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
# Check current branch and status (substitute the detected branch name above for BASE)
git status
git log BASE..HEAD --oneline

Ensure:

  • All changes are committed
  • Branch is up to date with remote
  • Changes are rebased on the base branch if needed

Step 2: Analyze Changes

Review what will be included in the PR:

# See all commits that will be in the PR (substitute detected branch name for BASE)
git log BASE..HEAD

# See the full diff
git diff BASE...HEAD

Understand the scope and purpose of all changes before writing the description.

Step 3: Write the PR Description

Use this structure for PR descriptions (ignoring any repository PR templates):

<brief description of what the PR does>

<why these changes are being made - the motivation>

<alternative approaches considered, if any>

<any additional context reviewers need>

Do NOT include:

  • "Test plan" sections
  • Checkbox lists of testing steps
  • Redundant summaries of the diff

Do include:

  • Clear explanation of what and why
  • Links to relevant issues or tickets
  • Context that isn't obvious from the code
  • Notes on specific areas that need careful review

Step 4: Create the PR

gh pr create --draft --title "<type>(<scope>): <description>" --body "$(cat <<'EOF'
<description body here>
EOF
)"

Title format follows commit conventions:

  • feat(scope): Add new feature
  • fix(scope): Fix the bug
  • ref: Refactor something

PR Description Examples

Feature PR

Add Slack thread replies for alert notifications

When an alert is updated or resolved, we now post a reply to the original
Slack thread instead of creating a new message. This keeps related
notifications grouped and reduces channel noise.

Previously considered posting edits to the original message, but threading
better preserves the timeline of events and works when the original message
is older than Slack's edit window.

Refs SENTRY-1234

Bug Fix PR

Handle null response in user API endpoint

The user endpoint could return null for soft-deleted accounts, causing
dashboard crashes when accessing user properties. This adds a null check
and returns a proper 404 response.

Found while investigating SENTRY-5678.

Fixes SENTRY-5678

Refactor PR

Extract validation logic to shared module

Moves duplicate validation code from the alerts, issues, and projects
endpoints into a shared validator class. No behavior change.

This prepares for adding new validation rules in SENTRY-9999 without
duplicating logic across endpoints.

Issue References

Reference issues in the PR body:

Syntax Effect
Fixes #1234 Closes GitHub issue on merge
Fixes SENTRY-1234 Closes Sentry issue
Refs GH-1234 Links without closing
Refs LINEAR-ABC-123 Links Linear issue

Guidelines

  • One PR per feature/fix - Don't bundle unrelated changes
  • Keep PRs reviewable - Smaller PRs get faster, better reviews
  • Explain the why - Code shows what; description explains why
  • Mark WIP early - Use draft PRs for early feedback

Editing Existing PRs

If you need to update a PR after creation, use gh api instead of gh pr edit:

# Update PR description
gh api -X PATCH repos/{owner}/{repo}/pulls/PR_NUMBER -f body="$(cat <<'EOF'
Updated description here
EOF
)"

# Update PR title
gh api -X PATCH repos/{owner}/{repo}/pulls/PR_NUMBER -f title='new: Title here'

# Update both
gh api -X PATCH repos/{owner}/{repo}/pulls/PR_NUMBER \
  -f title='new: Title' \
  -f body='New description'

Note: gh pr edit is currently broken due to GitHub's Projects (classic) deprecation.

References

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.