本文へ移動
cccskills
無料GitHub で公開

my-pr

Unified pull request workflow: prepare a safe branch, run read-only review, fix Required findings, create/update a GitHub draft PR, and verify CI plus automated review comments. Subcommands: `create` (simplify + PR, skip code review), `review` (read-only findings only), `fix` (Required fixes + commit, no push), `simplify` (simplification only), `verify` (existing PR checks/reviews only). Use when creating or reviewing PRs, self-reviewing changes, simplifying PR changes, or requesting "PR作成", "レビュー", "簡素化". Do NOT use for responding to review comments or a lightweight review of the current working diff without the PR workflow (use the built-in /code-review instead).

インストール方法を見る

含まれるファイル(28)

  • SKILL.md10.0 KB
  • assets/claude-review-result.schema.json289 B
  • assets/codex-review-result.schema.json1.1 KB
  • assets/review-prompts/correctness.md5.8 KB
  • assets/review-prompts/simplify.md1.5 KB
  • references/branching.md5.9 KB
  • references/commands.md6.5 KB
  • references/pr-body.md3.0 KB
  • references/review-multi.md10.5 KB
  • references/review.md19.8 KB
  • references/simplify/overview.md8.0 KB
  • references/simplify/python.md1.1 KB
  • references/simplify/shell.md1005 B
  • references/simplify/typescript.md1.3 KB
  • references/verify.md3.1 KB
  • scripts/executable_check-push-destination.sh948 B
  • scripts/executable_fetch-review-threads.sh2.1 KB
  • scripts/executable_move-changes-to-worktree.sh4.9 KB
  • scripts/executable_poll-pr-checks.sh1.6 KB
  • scripts/executable_prepare-pr-context.sh6.9 KB
  • scripts/executable_prepare-review-artifacts.sh4.4 KB
  • scripts/executable_prepare-review-prompts.sh4.3 KB
  • scripts/executable_prepare-reviewer-b-input.sh2.9 KB
  • scripts/executable_run-claude-review.sh2.7 KB
  • scripts/executable_run-codex-review.sh8.6 KB
  • scripts/executable_run-codex-reviews.sh2.9 KB
  • scripts/executable_split-review-chunks.sh8.5 KB
  • scripts/executable_validate-reviewer-b-output.sh1.4 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

PR — Pull Request Workflow

PR 作成を安全に進めるため、ブランチ準備、簡素化、レビュー、修正、PR作成、PR後検証を明確に分ける。

リポジトリ状態(呼び出し時点のスナップショット)

git status --short --branch

このスナップショットはモード判定と Safety gate の初期判断にのみ使う。以後の各ステップでは、規定のコマンド・スクリプトで取得する最新状態を正とする。

0. モード判定

$ARGUMENTS の先頭を確認し、references/commands.md を読んで実行パスを決める。

引数動作
空(デフォルト)full PR workflow
createsimplify + PR, skip local code review
reviewread-only quality review and finding integration
fixRequired fixes + verification + commit, no push
simplifysimplification-only apply, no PR/push
verifyexisting PR checks/reviews only

不明な引数の場合は停止してユーザーに確認する。

bundled scripts は chezmoi により $HOME/.claude/skills/my-pr/ へ配置される。最初のスクリプト実行前に配置を検証する。

test -f "$HOME/.claude/skills/my-pr/SKILL.md"
test -x "$HOME/.claude/skills/my-pr/scripts/prepare-review-artifacts.sh"

以後、bundled scripts は各 shell call から $HOME/.claude/skills/my-pr/scripts/... で直接参照する。前の shell call で設定した変数が残ると仮定しない。


1. Safety gate

verify 以外では、references/branching.md を読み、変更対象の分離、protected branch / worktree 処理、worktree 移動後の元ブランチ cleanup、upstream safety を確認する。

ここで対象変更と作業ブランチを確定し、protected branch に対象差分が残っていないことを確認するまで、simplify、review、fix、PR作成へ進まない。


2. Base and PR state

verify 以外では base branch と既存 PR を確認する。base branch の取得に失敗した場合は推測で main にしない。

base 取得では、ローカル main / master などの protected branch ref を直接進めない。git fetch origin "$BASE_BRANCH:$BASE_BRANCH" は禁止する。別 worktree の checked-out branch ref だけが進み、worktree/index に古い内容が逆差分として残ることがある。

artifact、PR context、レビュー用プロンプトの準備は、次の1回の shell call でまとめて行う。prepare-review-prompts.sh の行はデフォルト / review / fix だけで実行し、create / simplify では削る。

BASE_BRANCH=$(gh repo view --json defaultBranchRef -q .defaultBranchRef.name) &&
BASE_REF="origin/$BASE_BRANCH" &&
git fetch origin "+refs/heads/${BASE_BRANCH}:refs/remotes/origin/${BASE_BRANCH}" &&
git rev-parse --verify "$BASE_REF^{commit}" >/dev/null &&
git diff "$BASE_REF"...HEAD --stat &&
git log "$BASE_REF"..HEAD --oneline &&
ARTIFACT_ENV=$(bash "$HOME/.claude/skills/my-pr/scripts/prepare-review-artifacts.sh" "$BASE_REF") &&
bash "$HOME/.claude/skills/my-pr/scripts/prepare-pr-context.sh" "$ARTIFACT_ENV" &&
bash "$HOME/.claude/skills/my-pr/scripts/prepare-review-prompts.sh" "$ARTIFACT_ENV" &&
source "$ARTIFACT_ENV" &&
cat "$MY_PR_SCOPE_SUMMARY" "$MY_PR_CONTEXT"

途中のコマンドが失敗したら、その時点で止まる。失敗したコマンドとエラーを報告し、推測で先へ進まない。

PR scope を確認する。未コミット差分だけでなく、base branch との差分量を必ず報告する。

出力された artifact.env の絶対パスを、この run の artifact state file として保持する。以後の例にある /absolute/path/to/artifact.env は必ずその実パスへ置き換える。latest-env.sh の推測や、前の shell call の環境変数へ依存しない。

MY_PR_SCOPE_GATE が ok 以外の場合は停止する。large はユーザーがそのブランチ全体を PR 対象として明示済みの場合だけ続行できる。untracked は対象ファイルを明示して stage / git add -N するか、対象外と確認してから artifact を作り直す。

MY_PR_CONTEXT_STATE=found の場合は、PR 本文、top-level comments、reviews、inline review comments を review 入力として扱う。no_existing_pr の場合は、PR 本文と過去のやり取りが存在しないことを明示し、推測で補わない。


3. Quality workflow

3-1. create / simplify

コードレビューをスキップするモードでは、references/simplify/overview.md を読み、integrated simplify を apply mode で実行する。特に指定がない場合は Codex CLI の simplify profile(model_reasoning_effort="medium")で行う。

  • create: local correctness review なしで simplify apply → 修正があれば commit → PR 作成/更新へ進む。
  • simplify: 簡素化専用。simplify apply → 修正・検証・必要な commit まで行い、PR作成・push せず終了する。

3-2. デフォルト / review / fix: read-only quality review

references/review.md の Reviewer selection に従い、変更のリスクと規模から構成を決める。小変更は Reviewer C 単独、それ以外の指定条件では A/B/C を使い、A/B/C のときだけ references/review-multi.md も読む。選択理由を短く記録し、その構成の実行・入力検証・失敗処理に従う。

最初に simplify apply を実行せず、prepare-review-artifacts.sh が作成した repo-local artifact をレビューする。すべての選択済み reviewer が完了してから統合する。

3-3. 統合

references/review.md の Integration rules、Finding verification、Integration output に従う。選択した担当の結果を重複排除し、Required 候補と critical/high の指摘を実コードで確かめてから、各指摘を Required / Recommended / Not needed のどれか1つに分類する。

background 実行した reviewer が残っている間は最終回答しない。やむを得ず待機に入る場合は、再開に必要な artifact path、reviewer output path、次の手順を保存し、CCV の background monitor が利用可能なら監視登録する。

review は read-only なのでここで終了する。最終回答は references/review.md の判定見出し(✅ LGTM など)を1行目に置き、続けて PR の番号・タイトル・URL・状態・base/head と概要を書き、差分から確認できた具体的な良い点もまとめる。ファイル編集、検証、commit、push、PR作成をしない。

3-4. Required fix

デフォルト / fix では、🔴 Required だけ修正する。🟡 Recommended は修正しない。

変更の性質対応
タイポ、未使用 import、dead code、重複削除修正する
振る舞いが変わらない簡素化修正する
バグ・セキュリティ修正root cause を確認して修正する
振る舞い変更、API/schema/CLI/config 変更修正せず停止して報告する
好み、style、clever one-liner 化修正しない

修正後は関連検証を実行し、修正を commit する。fix は push、PR作成、verify を行わずここで終了する。


4. PR create / update

review / fix / simplify の場合はスキップする。

references/pr-body.md を読み、PR title/body を作る。PR 本文の推敲には my-japanese-editor skill を使う。push 前には references/branching.md の Push destination safety を実行する。

既存 PR がなければ draft PR を作成し、既存 PR があれば本文を更新する。


5. Verify

デフォルト、create、verify で実行する。review / fix / simplify ではスキップする。

references/verify.md を読み、既存 PR の checks polling、automated review 確認、必要な修正を行う。ready 化は行わない。


注意事項

  • PR 本文は日本語で書く。
  • draft PR を作成する。ready 化は行わない。
  • --assignee @me を付ける。
  • commit message は Conventional Commits 形式の英語。
  • read-only reviewer は repo 内外を問わずファイルを書かない。.plans、/tmp、.tmp/my-pr への追加メモも禁止する。main orchestrator が作る .tmp/my-pr/ artifact だけは例外。
  • Simplify は Codex CLI の model_reasoning_effort="medium" を使う。model は上書きしない。
  • Simplify は full diff を優先する。references/review.md の line/byte chunking 条件を満たす場合だけ file-boundary chunking し、各 run/chunk の Required と Recommended をそれぞれ最大 5 件に制限する。
  • chunk の単一ファイル上限を超える差分はそのファイルだけレビューから除外し、ファイル名と byte 数を最終結果に明示する。レビュー済みとして扱わない。
  • fallback、default substitution、broad catch を追加しない。
  • 好みの問題や style 指摘は修正対象にしない。
  • テストが壊れる修正はしない。
  • worktree 使用時は、PR 作成後も自動削除しない。
  • .tmp/my-pr/ は local artifact 置き場。stage / commit しない。

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

my-agent

無料日本語概要

Delegate tasks to an external CLI agent (OpenAI Codex, Google Gemini, or Claude Code) for second opinions or parallel execution. Use when the user explicitly mentions "codex", "gemini", or "claude" or asks to delegate work to one of them (e.g., "codexで実行", "codexに聞いて", "geminiで実行", "Geminiに聞いて", "claudeで実行", "Claudeに聞いて", "run with codex", "ask gemini", "ask claude"). Also use when the user mentions Claude's "fable" model alias for delegation or consultation (e.g., "fableで実行", "fableに相談", "Fableに聞いて", "ask fable"). Do NOT use for general coding tasks that don't mention codex, gemini, claude, or fable.

Ynakatsuka/dotfiles42026年10月12日 更新

my-bulk-read

無料日本語概要

Delegate reading large or multiple files to the `bulk-read` command, which sends the files to a cheaper reader model and returns only its answer. Use when a question needs the content of a file over about 350 lines or of several files at once, when a PreToolUse guard denied an unbounded read, or when the user says "bulk read", "一括読み込み", or "まとめて読んで". Do NOT use for files you are about to edit, for subtle correctness reasoning such as concurrency bugs, or for short files that fit a bounded read.

Ynakatsuka/dotfiles42026年10月12日 更新

my-ccv

無料日本語概要

Manage Claude Code Viewer (CCV): preview in-progress CCV changes on ccv-preview, register HTML artifacts, download files, or schedule jobs via CCV local API. Use when user asks for CCV preview, ccv-preview, browser visual QA, UI/UX validation, CCV artifacts, CCV file download, or CCV scheduler jobs. Treat preview/プレビュー as the CCV app preview service first; use artifacts only when the user explicitly asks for artifact/dashboard/report HTML. Do NOT use for generic web app previews outside CCV, production deployment, Cloudflare config, or Anthropic remote triggers.

Ynakatsuka/dotfiles42026年10月12日 更新

my-code-write

無料日本語概要

Delegate writing predictable code to the `code-write` command, which has a cheaper writer model write the target file directly so the generated code never enters your context. Use for tests, scaffolding, fixtures, boilerplate, or a new file that copies an existing pattern, and when the user says "code write", "生成を委譲", or "雛形を書かせて". Do NOT use for design decisions, changes to public contracts or shared modules, edits inside an existing file that needs judgment, or logic with subtle correctness requirements.

Ynakatsuka/dotfiles42026年10月12日 更新

Disciplined diagnosis workflow for hard, intermittent, or multi-component bugs and performance regressions: inspect logs and existing evidence, build a feedback loop, test falsifiable hypotheses, instrument gaps, and verify the outcome. Use when the root cause is unclear, reproduction is unreliable, several causes or components are plausible, or performance has regressed. Do NOT use for obvious single-cause errors, straightforward configuration or syntax fixes, planned feature work, or broad architecture review. Diagnosis-only requests stop after reporting the root cause and evidence; apply a fix only when the user requested one.

日本語の概要は準備中です。原文の説明を表示しています。

Ynakatsuka/dotfiles42026年10月12日 更新

my-epic

無料

Manual-only orchestrator for medium-to-large software development. Turns a broad goal into PR-sized and operational nodes with verification gates, then coordinates approved execution across follow-up prompts. Activate only when the user explicitly invokes my-epic; once activated, keep orchestrating that epic for the rest of the session. Do NOT use for an uninvoked planning or implementation request, a single small bug fix, one obvious PR, pure code review, ordinary SDD work that fits in one spec/PR, or implementing an epic during the same first call that created it.

日本語の概要は準備中です。原文の説明を表示しています。

Ynakatsuka/dotfiles42026年10月12日 更新

Ynakatsuka のスキルをすべて見る

このスキルの問題を報告する