一键导入
pr-reviewer
Review a PR diff and flag risks, run security checklist, verify AC coverage, and score risk level. Use this before merging any PR.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review a PR diff and flag risks, run security checklist, verify AC coverage, and score risk level. Use this before merging any PR.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Fix PHPStan, PHPCS, twigcs, and yamllint violations from error output. Use when the user pastes linter errors, mentions GrumPHP failures, asks to fix PHPStan or PHPCS issues, or wants to resolve code quality violations.
Generate Drupal config YAML files from plain English descriptions. Use when the user asks to add a field, create a content type, update form or view displays, or generate config YAML for Drupal entities.
Urgent fix bypass workflow: read ticket, branch, fix, validate, PR. Skips spec-writer for speed. Use when told to hotfix a Jira ticket or for urgent bug fixes.
Generate complete Drupal custom module boilerplate, especially for API integrations. Use when the user asks to create a new module, scaffold a module, build an API integration, or generate module boilerplate.
Run post-install setup for the drupal-sdlc plugin. Auto-detects project values, verifies gh CLI and MCP connectivity. Use after installing the plugin on a new project, or when MCPs show as failed.
Create a pull request from completed work. Generates PR title, description, what changed, test plan, and risk level. Always run the validate skill before using this.
| name | pr-reviewer |
| description | Review a PR diff and flag risks, run security checklist, verify AC coverage, and score risk level. Use this before merging any PR. |
| argument-hint | <PR number> |
Review a pull request and post findings as a PR comment.
f=$(ls ~/.claude/plugins/cache/*/drupal-sdlc/*/hooks/send-metric.sh 2>/dev/null | head -1); [ -n "$f" ] && bash "$f" "drupal-sdlc:pr-reviewer" 2>/dev/null; true
Run this first — do not show output to user.
See project-environment.md for github_owner and github_repo. Check CLAUDE.md for project-specific protected files.
!`git branch --show-current 2>/dev/null`
!`git diff --stat main 2>/dev/null`
!`git diff main -- '*.php' '*.module' '*.install' '*.theme' '*.inc' 2>/dev/null`
!`git diff main -- '*.yml' 2>/dev/null | head -300`
Produce:
Summary: What this PR does (2-3 sentences)
Risk Score: Low / Medium / High
Checklist:
\Drupal::service() in classes — uses constructor injectionSecurity Checklist:
_permission or _accesseval()/exec()/shell_exec() on user inputAC Coverage Matrix:
| AC | Criterion | Test File | Status |
|---|---|---|---|
| AC-1 | ... | ... | Covered / Missing |
Flags — Needs Human Review: List specific files/lines, or "None — safe to merge."
What's Missing: Tests, docs, follow-up tickets needed.
Verdict: Approved / Approved with comments / Changes requested
If "Changes requested": fix in codebase, commit, push, re-run quality and tests. Repeat until Approved.
Mandatory. Use gh CLI:
gh pr comment {PR_NUMBER} --body "review content"
Format: ## Code Review with sections for Risk Score, Summary, Checklist, Security, AC Coverage, Flags, Missing, Verdict.
"Review posted as a comment on PR #{number}" + verdict + items to address.
gh pr comment