catleop/llm-basic/code-review-triage

Claude Code and agent skill by catleop/llm-basic

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

对 GitHub PR 进行分类,判断是否可以自动 Review 还是需要人工介入。 内部 skill,由 code-review 调用。也可单独触发: "classify this PR", "should this PR be auto-reviewed", "triage PR #N", "判断这个 PR 是否需要人工 review", "PR 分类", "评估 PR 复杂度"。 Make sure to use this skill whenever the user asks to classify, triage, or assess whether a PR needs human review.

Install

npx vskill@latest install catleop/llm-basic/code-review-triage

SKILL.md

Code Review Triage

对 PR 进行快速分类,决定走自动 Review 路径还是需要人工介入。

输入

  • owner/repo:仓库标识
  • pr_number:PR 编号
  • Memory 规则摘要(可选,由 code-review-memory 提供)

执行流程

Step 1:获取 PR 基本信息(0 LLM 调用)

并发调用:

  • mcp__github__get_pull_request:获取标题、描述、状态
  • mcp__github__get_pull_request_files:获取变更文件列表
Step 2:硬规则检查(0 LLM 调用)

以下任一条件满足 → 立即返回 human_required,跳过 LLM 分类:

规则条件原因
超大 PR变更行数 > 500自动 review 效果差
Breaking Change标题/描述含 "breaking change"、"BREAKING"影响范围大,需人工评估
RFC/设计文档标题含 "RFC"、"[RFC]"、"design doc"需要架构讨论
安全核心文件涉及 3+ 个安全核心文件安全变更需人工确认
Draft PRPR 状态为 draft尚未完成

安全核心文件判断:按文件计数,每个匹配以下任意模式的文件算1个(不是按模式组计数):

  • */auth/*、*authentication*、*authorization*
  • */security/*、*permission*、*access_control*
  • *secret*、*credential*、*password*、*token*(排除路径含 test 或 mock 的文件)

例:auth/login.py(1个)+ security/permissions.py(1个)+ utils/token_helper.py(1个)= 3个 → 触发 human_required

Step 3:LLM 分类(1 次 LLM 调用)

若硬规则未触发,调用 LLM 进行语义分类。

Prompt 结构:

你是一个代码 Review 分类器。根据以下 PR 信息,判断是否可以自动 Review。
PR 标题:{title}
PR 描述:{description}
变更文件:{file_list}
团队规则摘要:{memory_rules_summary}
请输出 JSON:
{
"review_type": "auto" | "human_required",
"confidence": 0.0-1.0,
"focus_areas": ["security", "style", "logic", "performance"],
"files_to_review": ["优先审查的文件路径列表"],
"estimated_complexity": "simple" | "moderate" | "complex",
"skip_reason": null | "原因说明"
}
human_required 的判断标准:
- 涉及核心业务逻辑重构
- 多个模块之间有复杂依赖变更
- 变更影响数据库 schema
- 涉及第三方集成变更
- 置信度 < 0.6 时自动降级

置信度处理:

  • confidence < 0.6 → 强制设置 review_type = "human_required",skip_reason = "置信度不足,建议人工确认"
Step 4:输出 ReviewPlan
json
{
"review_type": "auto",
"focus_areas": ["security", "style"],
"files_to_review": ["app/views.py", "app/models.py"],
"estimated_complexity": "simple",
"skip_reason": null,
"hard_rule_triggered": false,
"confidence": 0.85
}

输出格式

向用户展示分类结果:

## PR Triage 结果
**PR**: #{pr_number} - {title}
**分类**: ✅ 自动 Review | ⚠️ 需要人工介入
**复杂度**: simple/moderate/complex
**关注领域**: security, style
**优先审查文件**:
- app/views.py
- app/models.py
{若 human_required: "跳过原因: {skip_reason}"}

读取 references/triage-rules.md 了解详细的分类规则和边界情况。

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/catleop/llm-basic/code-review-triage/badge)](https://verified-skill.com/skills/catleop/llm-basic/code-review-triage)

Something wrong with this skill or its page? Tell us.