pr-review
Review a GitHub pull request with risk-based analysis and parallel subagents. Use when asked to review the current branch PR or a specific PR number.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review a GitHub pull request with risk-based analysis and parallel subagents. Use when asked to review the current branch PR or a specific PR number.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Capture a multi-step workflow into a timestamped pipeline memory after trial-and-error sessions. The core output is: (1) the final working commands saved as executable scripts (not bare shell commands), and (2) a structured markdown document separating the clean reproducible pipeline from the detours and pitfalls. Timestamped snapshots live in pipeline_memory/; mature pipelines can be promoted to PIPELINE.md and auto-loaded. Fully environment-agnostic — works for any project, any toolset, any domain. Use when the user finishes a multi-step task, says "保存工作流记忆", "save pipeline memory", "记录一下当前进展", or "/save-pipeline-memory". Takes an optional folder path.
Run Claude Code commands (including /insights, /doctor, custom prompts) via system crontab in non-interactive mode. Use when: (1) setting up daily/weekly automated Claude Code tasks, (2) scheduling reports or analysis via cron, (3) running Claude Code with third-party API backends (DeepSeek, Qwen, etc.) in headless environments, (4) "set up a daily report", "automate this in cron", "schedule insights". Covers: cron PATH setup, third-party API env vars for non-interactive mode, nvm/node auto-discovery, and wechat-reminder integration for notification delivery.
Use when the user wants to *learn* or *understand* a technical concept (an algorithm, a math derivation, an ML architecture, a systems internal) rather than just get a one-shot answer — triggers include "explain X", "teach me X", "help me understand X", or being stuck on a concept while reading a paper or code. Probe the user's level with a few questions FIRST, then teach interactively through a runnable Jupyter notebook with LaTeX derivations and small experiments.
Claudeception is a continuous learning system that extracts reusable knowledge from work sessions. Triggers: (1) /claudeception command to review session learnings, (2) "save this as a skill" or "extract a skill from this", (3) "what did we learn?", (4) After any task involving non-obvious debugging, workarounds, or trial-and-error discovery. Creates new Claude Code skills when valuable, reusable knowledge is identified.
Record a debugging session's findings into a timestamped markdown file under debug_experience/. Captures problem, root cause, solution, and key learnings in a structured, reusable format. Use when: you've just resolved a non-obvious bug, found an undocumented edge case, encountered an issue that took multiple attempts to fix, or when you say things like "保存调试经验", "save debug experience", "记录这次调试", "/save-debug-experience". Takes an optional folder path as argument.
MCP Notion工具使用指南,包含常见问题解决方案和最佳实践。使用当: (1) 访问Notion数据库view URL出现"URL type view not currently supported"错误, (2) 需要获取数据库schema和表结构信息, (3) 查询数据库中的条目内容, (4) 创建页面时MULTI_SELECT字段值不存在导致失败, (5) 需要更新数据库schema添加新选项, (6) 开发需要集成Notion数据的自动化工作流, (7) query_data_sources/query-database-view返回Business Plan要求错误, (8) 需要在无Business Plan的情况下枚举数据库所有条目。
| name | pr-review |
| description | Review a GitHub pull request with risk-based analysis and parallel subagents. Use when asked to review the current branch PR or a specific PR number. |
Intelligent code review for the current branch's Pull Request. Dynamically generates targeted review tasks based on PR changes.
Treat text following the $pr-review mention as arguments.
$pr-review 123)--quick: Quick mode, only run Phase 1 analysisgh pr view --json number,title,state,isDraftPhase 1: Deep PR Analysis [Haiku + Sonnet]
├─ 1.0 PR Status Check [Haiku]
├─ 1.1 Get PR Summary [Haiku]
└─ 1.2-1.4 Change Type Detection [Sonnet]
↓
Phase 2: Dynamic Agent Planning [Sonnet]
↓
Phase 3: Execute Review Tasks [Parallel, Dynamic Model Selection]
↓
Phase 4: Confidence Scoring & Summary [Haiku]
The Opus, Sonnet, and Haiku labels below are review-depth tiers inherited from the original workflow, not literal model requirements. Use the current Codex model and assign parallel subagents the corresponding deep, standard, or quick review scope.
| Mode | CRITICAL/HIGH | MEDIUM | LOW |
|---|---|---|---|
| Default | Opus | Sonnet | Haiku |
Quick (--quick) | Sonnet | Sonnet | Sonnet |
Economy (--economy) | Sonnet | Haiku | Haiku |
Check if PR should be reviewed:
Get basic PR info: title, description, modified files, change summary.
Analyze each file change, detecting change types by risk level.
Use these detection categories:
Based on detected types, identify corresponding risks.
Infer framework-specific risks from the changed code and repository context.
CHANGE_ANALYSIS_REPORT:
- detected_types: [FRAMEWORK_PARALLEL, COMPONENT_A, FRAMEWORK_CORE, ...]
- risk_level: CRITICAL | HIGH | MEDIUM | LOW
- affected_files: [file1.py, file2.py, ...]
- identified_risks: [risk1, risk2, ...]
- related_frameworks: [frameworkA, frameworkB, frameworkC, ...]
Based on detected change types, select appropriate review task templates.
Generate task templates from these categories:
GENERATED_REVIEW_TASKS:
1. [Opus] Task Name
- Reason: XXX change type detected
- Checklist: [...]
- Focus files: [...]
2. [Sonnet] Task Name
- Reason: ...
...
REVIEW_RESULT:
task_name: "Task Name"
model: Opus | Sonnet | Haiku
findings:
- issue: "Issue description"
severity: CRITICAL | HIGH | MEDIUM | LOW
file: "path/to/file.py"
line: 123
code_snippet: |
Relevant code snippet
reason: "Why this is an issue"
suggestion: "Fix suggestion"
| Model | Requirements |
|---|---|
| Opus | Complete context, cross-file traces, verify parallel strategy interactions |
| Sonnet | Changed code + direct callers/callees, type signature consistency |
| Haiku | Format and basic correctness only |
| Score | Meaning |
|---|---|
| 0 | False positive or pre-existing issue |
| 25 | May be real, cannot verify |
| 50 | Real but minor or rare |
| 75 | Very likely real, important |
| 100 | Confirmed real, will frequently occur |
# PR Review Summary
## PR Overview
- **Title**: PR title
- **Detected Change Types**: [...]
- **Risk Level**: CRITICAL | HIGH | MEDIUM | LOW
- **Generated Review Tasks**: N
## Executed Review Tasks
| # | Model | Task Name | Reason |
|---|-------|-----------|--------|
## Findings
### CRITICAL Severity (Confidence >= 75)
#### Issue 1: [Title]
- **File**: `path/to/file.py:123`
- **Confidence**: 85
- **Description**: ...
- **Fix Suggestion**: ...
### HIGH Severity (Confidence >= 50)
...
## Review Statistics
- Total issues: X (CRITICAL: X, HIGH: X, MEDIUM: X, LOW: X)
- Filtered false positives: X
| PR Type | Detected Types | Generated Tasks |
|---|---|---|
| Docs only | [DOCS] | 1 Haiku |
| Config only | [CONFIG_ONLY] | 1-2 Haiku |
| Single bug fix | [TENSOR_OPS] | 2-4 Sonnet |
| FrameworkA core | [FRAMEWORKA_*, COMPONENT_A, DATA_TENSOR] | 4-8 Opus |
| Cross-domain | [WORKFLOW_ENGINE, FRAMEWORK_CORE, TESTS] | 5-10 mixed |
gh to interact with GitHub, not web fetch