一键导入
code-review
Review the code and run quick checks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review the code and run quick checks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Guide for writing a new Pedro BPF plugin — structured output via .pedro_meta, build setup, and testing.
Complete the required presubmit. Use before declaring a feature finished, after a large refactor or when asked.
First-time repo setup — submodules, dependencies, and verification
基于 SOC 职业分类
| name | code-review |
| description | Review the code and run quick checks. |
| allowed-tools | ["Bash(${CLAUDE_PLUGIN_ROOT}/scripts/diff.sh:*)","Bash(${CLAUDE_PLUGIN_ROOT}/scripts/lint.sh)","Bash(${CLAUDE_PLUGIN_ROOT}/scripts/comments.sh:*)","Read","Skill","TodoWrite","Grep","Glob"] |
This skill specifies how to review the code on a local feature branch or a range of commits. Optionally can take into account PR comments.
Follow these steps exactly:
${CLAUDE_PLUGIN_ROOT}/scripts/diff.sh to get lines under review. If the user specified
commits or ranges, pass them as arguments.${CLAUDE_PLUGIN_ROOT}/scripts/comments.sh list.Launch 5 agents in parallel to independently review the changes. Each agent should return a list of issues, with each issue including a description, the reason it was flagged and confidence. The agents should do the following:
Agent 1: Sonnet CLAUDE.md compliance agent Audit changes for CLAUDE.md compliance. Only consider CLAUDE.md files that share a path with the file under review.
Agent 2: Opus bug agent Scan for bugs. Focus only on the diff itself without reading extra context. Flag only significant bugs; ignore nitpicks and likely false positives. Do not flag issues that you cannot validate without looking at content outside of the git diff.
Agent 3: Opus bug agent Look for problems that exist in the introduced code. Include security
issues, incorrect logic, etc. Only look for issues that are related to the changed code. Consult
non-exhaustive checklists in reference/, but do not be limited by them.
Agent 4: Opus architecture & style agent Look for deviations from the project architecture and style. Primary concerns: (1) file organization (2) testing strategy (3) architecture and design (4) maintainability. Agent should flag code that is overly complex, explanations that are too verbose, tests that are redundant. The threshold for confidence is high: do not flag issues that are subjective or uncertain.
Agent 5: Opus performance optimizer Look for opportunities to optimize the code. Focus on the
performance checklist in reference/
Important: We only want high-signal issues. This means:
We specifically do not want:
In addition to the above, each subagent should be told the change summary to communicate author intent and important context.
For each issue found in the previous phase, launch parallel subagents to validate the issue. These subagents should get the change summary and a description of the issue. The agent's job is to review the issue and validate that the stated issue is real and significant. For example, if an issue such as "variable is not defined", then the subagent's job would be to validate that is actually true in the code.
For each comment on the PR, launch parallel subagents to investigate. Assign high confidence to human comments and low confidence to bot comments. The agent's job is to review the issues and validate that it's real and significant.
Use Opus agents for bugs, logic issues and PR comments and Sonnet agents for CLAUDE.md violations.
Filter out any issues that were not validated in phase 3. This will give us the final list of high-signal issues for review.
Present the user with a summary. For each issue include:
path: The file pathlines: The buggy line or lines so the the user sees thembody: Description of the issue. For small fixes, include a suggestion with corrected code.After discussing findings with the user and addressing any valid concerns:
${CLAUDE_PLUGIN_ROOT}/scripts/comments.sh resolve --bot to resolve bot comments.comments.sh resolve --human or resolve individually as appropriate.Key questions:
Effective feedback is:
Use non-exhaustive checklists for consistency and thoroughness. They include:
Important: The checklists are not complete. They point out common issues, but are not a replacement for a thorough review.
diff.sh - Show diff of code under review.
abc123): shows that commit's changesabc123..def456): shows changes in that rangelint.sh - Run some fast automated checks.comments.sh - Manage PR review comments.
comments.sh list [PR]: List unresolved comments (human comments first)comments.sh count [PR]: Count comments (human:N bot:N total:N)comments.sh resolve [PR] [--bot|--human]: Resolve comments