pr-review

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PR Review Skill

PR评审Skill

Review pull requests against repository standards. Two-phase process: automated validation, then manual content review.
针对仓库标准对拉取请求(PR)进行评审。分为两个阶段:自动化验证,然后是人工内容评审。

Phase 1: Automated Validation (Hard Rules)

阶段1:自动化验证(硬性规则)

Run the validation script to check structural requirements:
bash
python .claude/skills/pr-review/scripts/validate_skills.py
The script checks:
  • SKILL.md
    exists in every skill directory
  • YAML frontmatter is parseable
  • Required fields present:
    name
    ,
    description
  • name
    matches directory name
  • No hardcoded secrets detected
All ERROR-level checks must pass. WARNING-level items (missing
license
,
metadata
) should be flagged but are not blockers.
See references/structure-rules.md for the complete hard rules specification.
运行验证脚本检查结构要求:
bash
python .claude/skills/pr-review/scripts/validate_skills.py
该脚本会检查:
  • 每个技能目录下是否存在
    SKILL.md
    文件
  • YAML前置元数据是否可解析
  • 是否包含必填字段:
    name
    description
  • name
    是否与目录名称匹配
  • 是否检测到硬编码的密钥
所有ERROR级别的检查必须通过。WARNING级别的项(缺少
license
metadata
)应被标记,但不会阻碍合并。
完整的硬性规则规范请参阅references/structure-rules.md

Phase 2: Content Review (Soft Guidelines)

阶段2:内容评审(软性准则)

After automated checks pass, review the PR against quality guidelines:
  1. Skill scope — Does it overlap with existing skills? Is the boundary clear?
  2. Description quality — Does the
    description
    include clear trigger conditions?
  3. File size — Are reference docs reasonably sized for context window consumption?
  4. API key handling — If external APIs are used, are credentials read from environment variables?
  5. Script quality — Do scripts have shebang, requirements.txt, and error handling?
  6. README sync — Are
    README.md
    and
    README_zh.md
    updated for new skills?
See references/quality-guidelines.md for soft guidelines details.
在自动化检查通过后,根据质量准则评审PR:
  1. 技能范围 —— 它是否与现有技能重叠?边界是否清晰?
  2. 描述质量 ——
    description
    是否包含明确的触发条件?
  3. 文件大小 —— 参考文档的大小是否适合上下文窗口的处理?
  4. API密钥处理 —— 如果使用外部API,是否从环境变量中读取凭据?
  5. 脚本质量 —— 脚本是否包含shebang、requirements.txt和错误处理?
  6. README同步 —— 新增技能时是否更新了
    README.md
    README_zh.md
软性准则的详细内容请参阅references/quality-guidelines.md

Review Checklist Summary

评审检查清单摘要

Must Pass (Blockers)

必须通过(阻碍项)

  • validate_skills.py
    exits with code 0
  • PR title follows conventional commit format
  • One PR, one purpose
  • validate_skills.py
    以代码0退出
  • PR标题遵循约定式提交格式
  • 一个PR对应一个目标

Should Pass (Flagged in Review)

建议通过(评审中标记)

  • No functional overlap with existing skills
  • Description includes trigger conditions
  • Files are reasonably sized
  • API keys via environment variables
  • README tables updated for new skills (Source column set to
    Community
    )
  • 与现有技能无功能重叠
  • 描述包含触发条件
  • 文件大小合理
  • 通过环境变量获取API密钥
  • 新增技能时更新了README表格(Source列设为
    Community