pr-triage▌
xtone/ai_development_tools · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
PRの変更内容を分析し、後続のコードレビューフェーズに必要な情報を構造化して出力するスキルです。
- ›軽量モデル(Haiku)での実行を想定しており、CI環境でのコスト最適化に寄与します。
PRトリアージ
PRの変更内容を分析し、後続のコードレビューフェーズに必要な情報を構造化して出力するスキルです。 軽量モデル(Haiku)での実行を想定しており、CI環境でのコスト最適化に寄与します。
手順
gh pr view <PR番号> --json title,body,headRefName,baseRefName,changedFilesでPR情報を取得gh pr diff <PR番号> --name-onlyで変更ファイル一覧を取得- 差分の取得(changedFilesが15以上の場合、手順3はスキップしてファイル名とPR説明のみで分析する):
- changedFilesが15未満の場合のみ
gh pr diff <PR番号>でコード差分を取得 - 表層チェックが必要なファイル(.ts, .js, .tsx, .jsx)が多い場合は個別に
gh pr diff <PR番号> -- <file>で取得
- changedFilesが15未満の場合のみ
.pr-review-state.jsonが存在するか確認する(前回レビュー状態)- 以下の分析を行う:
- 変更ファイルのカテゴリ分類(added/modified/deleted)
- 使用言語・フレームワークの検出
- 変更カテゴリの判定(認可変更、DB変更、RLS変更、API変更、テスト変更、設定変更、スキル変更)
- 必要なリファレンスファイルの判定
- Minor/Suggestionレベルの表層的問題の検出(インクリメンタルモード時は変更ファイルのみ)
- 差分の要約(200文字以内)
- レビュー時に注目すべきポイント
- 分析結果を
.pr-triage.jsonファイルに出力する
インクリメンタルモード(.pr-review-state.json が存在する場合)
前回のレビュー状態を活用してチェック範囲を最適化する:
.pr-review-state.jsonのlast_reviewed_commitを取得するgit diff <last_reviewed_commit>..HEAD --name-onlyで前回レビュー以降に変更されたファイルを特定する- 変更のないファイルの
surface_issuesは前回の状態からそのまま引き継ぐ("carried_over": trueを付与)。再チェックしない。 - 変更があったファイルのみ表層チェックを実行する
- 前回の
surface_issuesとreview_commentsのうち、該当箇所が修正されたものをresolved_issuesに含める - 出力の
.pr-triage.jsonに"incremental": true、"base_commit"、"changed_since_last_review"、"unchanged_since_last_review"、"resolved_issues"フィールドを追加する
resolved_issues のフォーマット:
{
"comment_id": 12345678,
"file": "<ファイルパス>",
"line": 42,
"issue": "<元の問題の説明>",
"resolution": "fixed"
}
.pr-review-state.jsonが存在しない場合は、通常のフルトリアージを実行する。.pr-review-state.jsonが不正な形式(JSONパースエラー等)の場合は、警告を出力してフルトリアージを実行する。破損した状態ファイルに基づいてインクリメンタルモードを実行してはならない。
必要なリファレンスの判定基準
以下の条件に該当する場合のみ、対応するリファレンスを required_references に含める:
- TypeScript/JavaScript ファイルの変更あり →
typescript-best-practices.md - 認証・認可に関わるコード変更あり(auth, permission, role, session, token等のキーワード) →
authorization-review-general.md - PostgreSQL RLS に関わる変更あり(RLS, row level security, policy等のキーワード) →
authorization-review-postgres-rls.md - SKILL.md ファイルの変更あり →
skill-review.md - CI環境でのGitHub投稿が必要 →
github-pr-review-actions.md(常に含める)
表層チェック項目(Minor/Suggestion)
差分を確認し、以下の問題を検出する(該当するもののみ):
any型の使用(TypeScript)varキーワードの使用(TypeScript/JavaScript)- 空のインターフェイス定義
- マジックナンバーの使用
- 命名規則違反(camelCase/PascalCase/UPPER_CASE)
- テストの未追加(新規ファイルがあるのにテストファイルがない)
出力フォーマット
.pr-triage.json に以下のJSON構造で出力すること:
{
"pr_number": 123,
"incremental": false,
"base_commit": "<前回レビュー時のコミットSHA(インクリメンタル時のみ)>",
"summary": "<変更の概要(1-2文)>",
"files": {
"added": ["<追加ファイルパス>"],
"modified": ["<変更ファイルパス>"],
"deleted": ["<削除ファイルパス>"]
},
"changed_since_last_review": ["<前回から変更があったファイル(インクリメンタル時のみ)>"],
"unchanged_since_last_review": ["<前回から変更がないファイル(インクリメンタル時のみ)>"],
"languages": ["<検出された言語>"],
"frameworks": ["<検出されたフレームワーク>"],
"change_categories": {
"has_auth_changes": false,
"has_db_changes": false,
"has_rls_changes": false,
"has_api_changes": false,
"has_test_changes": false,
"has_config_changes": true,
"has_skill_changes": true
},
"required_references": ["<必要なリファレンスファイル名>"],
"surface_issues": [
{
"severity": "Minor|Suggestion",
"file": "<ファイルパス>",
"line": 15,
"issue": "<問題の説明>",
"suggestion": "<改善案>",
"carried_over": true
}
],
"resolved_issues": [
{
"comment_id": 12345678,
"file": "<ファイルパス>",
"line": 42,
"issue": "<元の問題の説明>",
"resolution": "fixed"
}
],
"diff_summary": "<差分の要約(200文字以内)>",
"estimated_complexity": "low|medium|high",
"focus_areas": ["<レビュー時の注目ポイント>"]
}
重要:
- テキスト出力は最小限にし、
.pr-triage.jsonの出力に集中してください。
How to use pr-triage on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add pr-triage
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches pr-triage from GitHub repository xtone/ai_development_tools and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate pr-triage. Access the skill through slash commands (e.g., /pr-triage) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.5★★★★★75 reviews- ★★★★★Evelyn Menon· Dec 28, 2024
pr-triage fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Dhruvi Jain· Dec 24, 2024
pr-triage is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Hiroshi White· Dec 24, 2024
I recommend pr-triage for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Diego Sharma· Dec 24, 2024
Keeps context tight: pr-triage is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Valentina Rao· Dec 20, 2024
Solid pick for teams standardizing on skills: pr-triage is focused, and the summary matches what you get after install.
- ★★★★★Emma Taylor· Dec 12, 2024
Solid pick for teams standardizing on skills: pr-triage is focused, and the summary matches what you get after install.
- ★★★★★Michael Torres· Dec 8, 2024
Keeps context tight: pr-triage is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Mia Mehta· Dec 8, 2024
pr-triage has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Yusuf Lopez· Dec 8, 2024
We added pr-triage from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★James Flores· Nov 27, 2024
pr-triage has been reliable in day-to-day use. Documentation quality is above average for community skills.
showing 1-10 of 75