This is a PR preprocessing step designed to run before your main code review, ideally with a cheaper model like Haiku to save costs in CI. It categorizes file changes, detects what frameworks and languages are in play, flags surface level issues like `any` types or magic numbers, and determines which reference docs your actual reviewer will need. The incremental mode is clever: it reads `.pr-review-state.json` from previous runs and only rechecks files that changed since the last review, carrying over issues from untouched files. Everything gets dumped into `.pr-triage.json` for the next phase to consume. If you're running automated reviews in CI and want to optimize token usage, this gives you a lightweight triage pass before the heavy lifting.

skills.sh installs
1.7K
GitHub stars
3
last updated
Aug 21, 2026

Install

$ npx -y skills add xtone/ai_development_tools --skill pr-triage --agent claude-code

Installs into .claude/skills of the current project.

Files

PRトリアージ

PRの変更内容を分析し、後続のコードレビューフェーズに必要な情報を構造化して出力するスキルです。 軽量モデル(Haiku)での実行を想定しており、CI環境でのコスト最適化に寄与します。

手順

  1. gh pr view <PR番号> --json title,body,headRefName,baseRefName,changedFiles でPR情報を取得
  2. gh pr diff <PR番号> --name-only で変更ファイル一覧を取得
  3. 差分の取得(changedFilesが15以上の場合、手順3はスキップしてファイル名とPR説明のみで分析する):
    • changedFilesが15未満の場合のみ gh pr diff <PR番号> でコード差分を取得
    • 表層チェックが必要なファイル(.ts, .js, .tsx, .jsx)が多い場合は個別に gh pr diff <PR番号> -- <file> で取得
  4. .pr-review-state.json が存在するか確認する(前回レビュー状態)
  5. 以下の分析を行う:
    • 変更ファイルのカテゴリ分類(added/modified/deleted)
    • 使用言語・フレームワークの検出
    • 変更カテゴリの判定(認可変更、DB変更、RLS変更、API変更、テスト変更、設定変更、スキル変更)
    • 必要なリファレンスファイルの判定
    • Minor/Suggestionレベルの表層的問題の検出(インクリメンタルモード時は変更ファイルのみ)
    • 差分の要約(200文字以内)
    • レビュー時に注目すべきポイント
  6. 分析結果を .pr-triage.json ファイルに出力する

インクリメンタルモード(.pr-review-state.json が存在する場合)

前回のレビュー状態を活用してチェック範囲を最適化する:

Sponsors

Details

Repository
github.com/xtone/ai_development_tools
Categories
Git & Pull Requests, AI & Agent Building
First seen
Apr 16, 2026

More from xtone/ai_development_tools

All 2
1daymade avatargithub-opsdaymade/claude-code-skillsProvides comprehensive GitHub operations using gh CLI and GitHub API. Activates when working with pull requests, issues, repositories, workflows, or GitHub API 1.6Kskills.sh installs
2github avatarthreat-model-analystgithub/awesome-copilotFull STRIDE-A threat model analysis and incremental update skill for repositories and systems. Supports two modes: (1) Single analysis — full STRIDE-A threat mo1.5Kskills.sh installs
3code-yeongyu avatargithub-triagecode-yeongyu/oh-my-opencodegithub triage1.5Kskills.sh installs
4jezweb avatargithub-releasejezweb/claude-skillsPrepare and publish GitHub releases. Sanitizes code for public release (secrets scan, personal artifacts, LICENSE/README validation), creates version tags, and 1.3Kskills.sh installs
5alinaqi avatarcode-reviewalinaqi/claude-bootstrapcode review1.3Kskills.sh installs
6ruvnet avatargithub-workflow-automationruvnet/rufloAdvanced GitHub Actions workflow automation with AI swarm coordination, intelligent CI/CD pipelines, and comprehensive repository management1.3Kskills.sh installs