Back to Skills

pr-triage

PRの変更内容をトリアージし、変更カテゴリ分類・表層チェック・必要リファレンス判定を行います。結果を`.pr-triage.json`に出力し、後続のコードレビューフェーズで活用します。CI環境でのコスト最適化に使用してください。

3starsUpdated 8/4/2026

Security Assessment

Safe(95/100)
Security Score95/100

About pr-triage

PR Triage is a CI cost-optimization skill (documented in Japanese) that analyzes the contents of a pull request and emits a structured .pr-triage.json for a later code-review phase to consume. It solves the problem of spending expensive review compute indiscriminately: designed to run on a lightweight model such as Haiku, it does the cheap classification and surface-level checks first so the heavier review only runs where it matters.

Using the gh and git CLIs read-only, it fetches PR metadata and the changed-file list, then conditionally pulls the diff (skipping the full diff and analyzing by filename and PR description alone when 15 or more files changed). It classifies files as added, modified, or deleted, detects languages and frameworks, and determines change categories (authorization, database, PostgreSQL RLS, API, tests, config, skill changes). Based on those categories it decides which reference guides a reviewer will need (TypeScript best practices, general authorization review, Postgres RLS review, skill review, and always the GitHub PR-review-actions guide). It detects minor/suggestion surface issues such as use of the any type, var, empty interfaces, magic numbers, naming-convention violations, and missing tests, and writes a bounded diff summary and focus areas. An incremental mode reads a prior .pr-review-state.json, uses git diff to find files changed since the last reviewed commit, carries over unchanged files' issues, re-checks only changed files, and records resolved issues, with an explicit guard to fall back to a full triage if that state file is missing or malformed.

The target users are teams running AI-assisted code review in CI who want to reduce token cost and structure the review pipeline. It performs only read-only repository inspection and JSON output; it makes no changes to the code or repository.

FAQ

What does this skill output?

A .pr-triage.json file containing the PR number, a summary, file classifications, detected languages and frameworks, change-category flags, required reference files, surface-level minor issues, a bounded diff summary, estimated complexity, and review focus areas.

Why run it on a lightweight model?

It is designed for a cheap model like Haiku to perform classification and surface checks so the more expensive code-review phase runs only where needed, optimizing CI cost.

How does it handle large PRs?

If 15 or more files changed, it skips fetching the full diff and analyzes using only filenames and the PR description; below that threshold it fetches the code diff, optionally per-file for TypeScript/JavaScript files.

What is incremental mode?

When a prior .pr-review-state.json exists, it uses the last reviewed commit and git diff to find files changed since, carries over surface issues for unchanged files, re-checks only changed files, and records resolved issues. If that state file is missing or malformed, it warns and falls back to a full triage.

Does it modify my repository?

No. It uses gh and git only to read PR metadata, file lists, and diffs, and writes a local .pr-triage.json. It makes no commits, comments, or changes to the code.

Install pr-triage

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill