New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Triages PR changes into categories, surface checks, and required references, writing results to .pr-triage.json for later review.

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

What it does

  • Covers PR metadata, changed-file lists, and diffs via gh pr view and gh pr diff, skipping full diffs when 15 or more files change
  • Classifies changes into auth, DB, RLS, API, test, config, and skill categories, and detects languages and frameworks
  • Runs incremental mode against .pr-review-state.json, rechecking only files changed since the last reviewed commit
  • Flags Minor and Suggestion issues such as any types, var usage, magic numbers, and missing tests
  • Designed for cost-optimized CI reviews where a lightweight model triages before the code-review phase

Install

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

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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 が存在する場合)

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

Details

Repository
github.com/xtone/ai_development_tools
Categories
Code Review & Quality, Git & Releases
First seen
Apr 16, 2026

More from xtone/ai_development_tools

All 2

Similar to Pr Triage

More Code Review & Quality