用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/mhenke/claude-code-unplugged --skill code-review命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for coding assistant plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for coding assistant.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use PLUGIN_ROOT", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing coding assistant plugin hooks with focus on advanced prompt-based hooks API.
基于 SOC 职业分类
正在显示 SKILL.md
| name | code-review |
| description | Automated PR and code reviewer guidelines |
Automated code review for pull requests using multiple specialized agents with confidence-based scoring to filter false positives.
The Code Review Plugin automates pull request review by launching multiple agents in parallel to independently audit changes from different perspectives. It uses confidence scoring to filter out false positives, ensuring only high-quality, actionable feedback is posted.
code-reviewPerforms automated code review on a pull request using multiple specialized agents.
What it does:
--comment flag)Usage:
/code-review [--comment]
Options:
--comment: Post the review as a comment on the pull request (default: outputs to terminal only)Example workflow:
# On a PR branch, run locally (outputs to terminal):
/code-review
# Post review as PR comment:
/code-review --comment
# Claude will:
# - Launch 4 review agents in parallel
# - Score each issue for confidence
# - Output issues ≥80 confidence (to terminal or PR depending on flag)
# - Skip if no high-confidence issues found
Features:
Review comment format:
## Code review
Found 3 issues:
1. Missing error handling for OAuth callback (CLAUDE.md says "Always handle OAuth errors")
https://github.com/owner/repo/blob/abc123.../src/auth.ts#L67-L72
2. Memory leak: OAuth state not cleaned up (bug due to missing cleanup in finally block)
https://github.com/owner/repo/blob/abc123.../src/auth.ts#L88-L95
3. Inconsistent naming pattern (src/conventions/CLAUDE.md says "Use camelCase for functions")
https://github.com/owner/repo/blob/abc123.../src/utils.ts#L23-L28
Confidence scoring:
False positives filtered:
This plugin is included in the coding assistant repository. The command is automatically available when using coding assistant.
code-review# Create PR with changes
# Run local review (outputs to terminal)
/code-review
# Review the automated feedback
# Make any necessary fixes
# Optionally post as PR comment
/code-review --comment
# Merge when ready
# Trigger on PR creation or update
# Use --comment flag to post review comments
/code-review --comment
# Skip if review already exists
gh) installed and authenticatedIssue: Agents are slow on large PRs
Solution:
Issue: Review flags issues that aren't real
Solution:
Issue: code-review runs but no comment appears
Solution: Check if:
Issue: Code links don't render correctly in GitHub
Solution: Links must follow this exact format:
https://github.com/owner/repo/blob/[full-sha]/path/file.ext#L[start]-L[end]
#L notationIssue: gh commands fail
Solution:
brew install gh (macOS) or see GitHub CLI installationgh auth loginThe default threshold is 80. To adjust, modify the command file at commands/code-review.md:
Filter out any issues with a score less than 80.
Change 80 to your preferred threshold (0-100).
Edit commands/code-review.md to add or modify agent tasks:
Uses gh CLI for:
Boris Cherny (boris@anthropic.com)
1.0.0
code-reviewDescription: Code review a pull request
Provide a code review for the given pull request.
Agent assumptions (applies to all agents and subagents):
To do this, follow these steps precisely:
Launch a fast lightweight agent to check if any of the following are true:
gh pr view <PR> --comments for comments left by claude)If any condition is true, stop and do not proceed.
Note: Still review Claude generated PR's.
Launch a fast lightweight agent to return a list of file paths (not their contents) for all relevant CLAUDE.md files including:
Launch a standard agent to view the pull request and return a summary of the changes
Launch 4 agents in parallel to independently review the changes. Each agent should return the list of issues, where each issue includes a description and the reason it was flagged (e.g. "CLAUDE.md adherence", "bug"). The agents should do the following:
Agents 1 + 2: CLAUDE.md compliance standard agents Audit changes for CLAUDE.md compliance in parallel. Note: When evaluating CLAUDE.md compliance for a file, you should only consider CLAUDE.md files that share a file path with the file or parents.
Agent 3: high-capability agent (parallel subagent with agent 4) Scan for obvious 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 context outside of the git diff.
Agent 4: high-capability agent (parallel subagent with agent 3) Look for problems that exist in the introduced code. This could be security issues, incorrect logic, etc. Only look for issues that fall within the changed code.
CRITICAL: We only want HIGH SIGNAL issues. Flag issues where:
Do NOT flag:
If you are not certain an issue is real, do not flag it. False positives erode trust and waste reviewer time.
In addition to the above, each subagent should be told the PR title and description. This will help provide context regarding the author's intent.
For each issue found in the previous step by agents 3 and 4, launch parallel subagents to validate the issue. These subagents should get the PR title and description along with a description of the issue. The agent's job is to review the issue to validate that the stated issue is truly an issue with high confidence. For example, if an issue such as "variable is not defined" was flagged, the subagent's job would be to validate that is actually true in the code. Another example would be CLAUDE.md issues. The agent should validate that the CLAUDE.md rule that was violated is scoped for this file and is actually violated. Use high-capability subagents for bugs and logic issues, and standard agents for CLAUDE.md violations.
Use this list when evaluating issues in Steps 4 and 5 (these are false positives, do NOT flag):
Notes:
--comment argument is provided, post a comment with the following format:No issues found. Checked for bugs and CLAUDE.md compliance.
https://github.com/owner/repo/blob/$(git rev-parse HEAD)/foo/bar will not work, since your comment will be directly rendered in Markdown.L4-7)Before executing commands or submitting reviews, you MUST output a structured XML <verification_gate> block evaluating the following checks:
conventions: All changes align with target guidelines. (PASS/FAIL)correctness: Verify code correctness and lack of logical bugs. (PASS/FAIL)Example output format:
<verification_gate>
<conventions>PASS</conventions>
<correctness>PASS</correctness>
</verification_gate>
Do not proceed until you have output this verification gate.
Filter out any issues that were not validated in step 5. This step will give us our list of high signal issues for our review.
Output a summary of the review findings to the terminal:
If --comment argument was NOT provided, stop here. Do not post any GitHub comments.
If --comment argument IS provided and NO issues were found, post a summary comment using gh pr comment and stop.
If --comment argument IS provided and issues were found, continue to step 8.
Create a list of all comments that you plan on leaving. This is only for you to make sure you are comfortable with the comments. Do not post this list anywhere.
Post inline comments for each issue using mcp__github_inline_comment__create_inline_comment with confirmed: true. For each comment:
IMPORTANT: Only post ONE comment per unique issue. Do not post duplicate comments.