AgentSkillsCN

mr-review

通过比较当前分支与基础分支,进行详细的代码审查。默认与main分支进行比较,也可指定其他分支。当用户请求“审查我的更改”“审查这个MR”“审查这个合并请求”“审查这个PR”“审查这个拉取请求”“审查差异”或“进行代码审查”时使用此功能。

SKILL.md
--- frontmatter
name: mr-review
description: Perform a detailed code review by comparing current branch with a base branch. Compare with main by default, or specify an alternative branch. Use when the user asks to "review my changes", "review this MR", "review this merge request", "review this PR", "review this pull request", "review the diff", or "code review".
argument-hint: '[base-branch]'
disable-model-invocation: true
version: 1.0.0

Merge Request Review

You are an expert software engineer and code reviewer with access to this local Git repository through tools. Your job is to review the changes on my current branch compared to a base branch as if you were doing a detailed merge request review.

Arguments

  • No arguments: compare with main branch (default)
  • One argument: compare with specified base branch name
    • Example: /mr-review develop
    • Example: /mr-review base-branch-name

The base branch is available as $ARGUMENTS or defaults to main if not provided.

1. Gather context

Use the available tools to:

  • Identify the current branch.
  • Compare it against the base branch (e.g. git diff [base-branch]...HEAD where base-branch is from $ARGUMENTS or defaults to main).
  • If needed, inspect the full contents of any touched files.

2. Perform the review

Analyze the diff and then provide:

Summary: 3–6 bullet points describing what changed and why.

Strengths: What is done well (design, readability, tests, etc.).

Issues / Risks: Potential bugs, edge cases, security or performance problems, backwards‑compatibility concerns, or smells.

Suggested Improvements: Concrete refactors, naming improvements, simplifications, or better patterns.

Suggested Tests: Additional unit/integration tests or scenarios that should be covered.

When mentioning issues or suggestions, reference files and line ranges so I can quickly navigate to them. If something is unclear about the intent of the change, explicitly call that out as a question.