Skip to content
Agentmart
Submit a tool

pr

ブランチの変更を分析してプルリクエストを作成 (user)

Skill by rysk-tanaka

IndexedMIT
Write a review

Chalk Labs

Need help deploying pr?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/rysk-tanaka-pr

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

ブランチの変更を分析してプルリクエストを作成 (user)

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Shell scripts

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/pr

Tools it pre-approves 2

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Bash(bash
  • *)

What's inside

Skill name
pr
Description
ブランチの変更を分析してプルリクエストを作成 (user)
License
MIT
Allowed tools
Bash(bash, *)
Instructions
132 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Pre-approves some shell commands

Files (3)

  • SKILL.md
  • collect.sh
  • pull_request_template.md

SKILL.md (first lines)

# プルリクエスト作成

ブランチの変更を分析し、PRテンプレートに従ったプルリクエストを作成する。

## 入力

`$ARGUMENTS` にベースブランチ名が渡される(省略時は `main`)。

## 手順

### 1. ヘルパースクリプトの実行

`bash ${CLAUDE_SKILL_DIR}/collect.sh <base-branch>` を実行する。

- ベースブランチは `$ARGUMENTS` が指定されていればそれを使用、なければ `main` を渡す
- スクリプトが非ゼロ終了した場合は、stderr のエラーメッセージをユーザーに報告して終了

### 2. 出力の解析

スクリプトの stdout は JSON 形式で以下のフィールドを含む。

- `current_branch` - 現在のブランチ名
- `base_branch` - ベースブランチ名
- `stat` - 変更ファイルの統計(git diff --stat)
- `log` - コミット一覧(git log --oneline)
- `diff` - 詳細な差分(lockファイル除外済み)
- `template` - PRテンプレートの内容(見つからない場合は空文字列)

diff が非常に大きい場合は、stat を中心に分析する。

テンプレートは `.github/pull_request_template.md` → `${HOME}/.claude/skills/pr/pull_request_template.md` の順で collect.sh が取得する。
後者は git 管理外のローカル運用のため、リポジトリ内検索や GitHub API では見つからない。
テンプレートの有無は collect.sh の出力のみで判断し、別リポジトリが対象でもそのリポジトリの cwd で collect.sh を実行する。

### 3. PR内容の生成

#### タイトル

- template にタイトルの指示があればそれに従う
- template が空の場合はシンプルな英文(先頭大文字、末尾ピリオドなし)
- ブランチ全体で何を達成したかを簡潔に表現

#### 本文

- template が空でなければ、テンプレートの形式と言語に従って記述
- template が空の場合は、デフォルト構成(変更の概要、主な変更点、変更の背景)で日本語で記述
  - 文末はですます調
  - 句点(。)で改行する
- 1文を短く保ち、1行がおおむね120文字を超えないように作文する(読み手の負荷を下げるため、まず文自体を短くする)
- それでも長くなる場合のみ、意味の切れ目など可読性を考慮した位置で改行する
  - 箇条書きの中で改行する場合は、継続行を項目本文の位置までインデントして箇条書きの構造を崩さない
  - インデントを揃えられず構造が崩れるくらいなら、折り返さずに1行のままにする
- 本文末尾に余分な空行を付けない
- レビュアーが読みやすいよう、簡潔で要点のみを記載
- 冗長な説明や詳細すぎる技術的説明は避ける
- テンプレートの各項目を埋めるために必要な最小限の情報のみを記載
- 個別のコミット内容ではなく、ブランチ全体で何を変更したかに焦点を当てる
- テンプレートのHTMLコメント(`<!-- -->`)は出力に含めない
- 該当する内容がないセクションは省略する(「なし」と記載しない)

#### 禁止事項

- PR本文に `🤖 Generated with [Claude Code](https://claude.com/claude-code)` を含めない
- PR本文に `Co-Authored-By: Claude <noreply@anthropic.com>` を含めない

### 4. ユーザー確認

生成したPRタイトルと本文を以下の形式でユーザーに提示する。

```text
Title: <タイトル>
Base: <ベースブランチ> ← <現在のブランチ>

<PR本文>
```

AskUserQuestion ツールでPR内容の確認と `claude-review` ラベルの付与を同時に尋ねる。

- question: `この内容でPRを作成しますか?修正があればコメントしてください。`
- header: `PR作成`
- multiSelect: false
- 選択肢
  - `作成する` - ラベルなしでPRを作成
  - `claude-review 付きで作成` - `claude-review` ラベルを付けてPRを作成
- 修正が要望された場合は、フィードバックを反映して再度確認する

### 5. PR作成

ユーザーの承認を得た後、`gh pr create` コマンドを実行する。

```bash
# ラベルなし
gh pr create --base <base-branch> --title "<タイトル>" --body "<本文>"

# claude-review ラベル付き
gh pr create --base <base-branch> --title "<タイトル>" --body "<本文>" --label claude-review
```

### 5a. ラベル未作成時のフォールバック

`--label claude-review` 付きで `gh pr create` を実行した際に `'claude-review' not found` エラーが発生した場合、
ユーザーに `mise run setup-review-label` の実行を促し、完了後にPR作成を再試行する。

### 6. 結果の報告

作成されたPRのURLを表示する。

### 7. 次のアクションのサジェスト

PR作成後、PRのURLからPR番号を抽出し、AskUserQuestion ツールで次のアクションを提示する。

- header: `次のアクション`
- question: `PR #<PR番号> を作成しました。次に行うアクションを選択してください。`
- multiSelect: false
- 選択肢
  - `/await-ci <PR番号> --watch` - CI の完了を待機
  - `/resolve-review <PR番号>` - レビュー指摘を確認・対応
  - `/review <PR番号>` - コードレビューを実行
  - `/pr-review-toolkit:review-pr` - PR の包括的レビューを実行

From rysk-tanaka/skills, MIT.

More from rysk-tanaka/skills

Signals

Stars
0
Forks
0
Open issues
1
Last commit (this folder)
Sep 3, 2026 (1 month ago)
Last release
Oct 14, 2026 (16 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from rysk-tanaka

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get pr running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying pr?

CallGet help
Cite this page

pr skill. Agent Mart. https://agentmart.dev/skills/rysk-tanaka-pr (last updated 2026-10-24)