- name
SKILL.md
Die Skill-Datei bleibt im Repository des Herausgebers.
Fügen Sie den kopierten Befehl in ein Terminal ein. Er installiert diese SKILL.md in dem jeweiligen Agenten.
npx skills add MiniMax-AI/mcode-stack --skill pr-review -a cursor -yFügen Sie den kopierten Befehl in ein Terminal ein. Er installiert diese SKILL.md in dem jeweiligen Agenten.
npx skills add MiniMax-AI/mcode-stack --skill pr-review -a claude-code -yFügen Sie den kopierten Befehl in ein Terminal ein. Er installiert diese SKILL.md in dem jeweiligen Agenten.
npx skills add MiniMax-AI/mcode-stack --skill pr-review -a codex -yFügen Sie den kopierten Befehl in ein Terminal ein. Er installiert diese SKILL.md in dem jeweiligen Agenten.
npx skills add MiniMax-AI/mcode-stack --skill pr-review -a grok -ySenden Sie die kopierte Nachricht in einem Grok Bot-Chat. Der Bot ruft diese SKILL.md von GitHub ab und fügt sie den Skills hinzu, die alle Ihre Bots gemeinsam nutzen.
Install this skill: https://github.com/MiniMax-AI/mcode-stack/tree/HEAD/stacks/jiachen/skills/pr-reviewVom Herausgeber
On GitLab a PR is a merge request. The rules below are the same on both hosts.
git; gh and glab help when they are installed.Find the host, but only when the user names a PR by number or URL; a review of the current branch does not need it. Take the host from git remote get-url origin, or from the PR URL:
github.com, or a GitHub Enterprise host: PR URLs look like https://<host>/<owner>/<repo>/pull/<n>, and gh auth status --hostname <host> succeeds when gh is logged in there.gitlab.com or a self-managed GitLab: PR URLs look like https://<host>/<group>/<project>/-/merge_requests/<n>.Find the target branch: the one the user names; otherwise the PR's target branch, when gh (GitHub) or glab (GitLab) is installed and logged in: gh pr view <n> --json baseRefName --jq .baseRefName, or target_branch in the output of glab mr view <n> --output json (without <n>, both look up the PR of the current branch); otherwise the remote default branch: git symbolic-ref --short refs/remotes/origin/HEAD without the origin/ prefix, or main when that is not set. Run git fetch origin <target>.
Find what to review: the current branch, HEAD. When the user names a PR that is not checked out, fetch its head after the target fetch: git fetch origin pull/<n>/head on GitHub, git fetch origin refs/merge-requests/<n>/head on GitLab. Then record git rev-parse FETCH_HEAD at once and review that SHA as <head>: any later fetch overwrites FETCH_HEAD.
Choose the lenses: references/lenses/general.md by default. When the user names review directions, in English or by the Chinese labels listed under References, run one pass per named lens with its checklist.
Read the rules of the repository under review, each only when it exists:
.mcode-review.json in the repository root, the repository's rule pack. When a changed file matches the globs of one of its risk_areas, ask that area's questions among the questions for a person, unless the PR description or the code already answers them. A name or questions value is plain text, or an object with one entry per language ({ "en": ..., "zh": ... }): use the entry in the user's language. Leave out files that match its generated_globs. Its other keys (tier thresholds, the author quiz) apply to CI only..mcode-review.md in the repository root: the known failure patterns of this repository. Check the diff against every pattern that applies, as if it were part of the lens checklist.references/repos/<repo>.md only for the repository under review (the last segment of the origin URL, without .git). Do not apply another repository's file.references/stacks/go-backend.md when it changes *.go or go.mod files.A local review reads .mcode-review.json and .mcode-review.md from your working tree. CI reads them from the merge base, so a PR cannot change the rules that review it. When the PR changes either file, review that change like any other change.
Review the net diff, git diff $(git merge-base origin/<target> <head>) <head>, with the procedure below.
Report in the user's language. Start with a count line such as "0 blocking, 2 for a person, 3 suggestions" (in Chinese: "0 个阻塞、2 个需人工确认、3 个建议"), then blocking findings, then questions for a person, then suggestions. Name the target branch you diffed against, and say so when it is the remote default branch rather than one the user or the PR named: a wrong target adds commits that are not part of the PR. When there is nothing to report, say so in one line (in Chinese: "没有需要修改的地方").
references/severity.md and the evidence level with references/evidence-ladder.md.pre_existing when they matter for this change);needs_human, each with concrete questions.references/severity.md: P0-P3 with examples.references/evidence-ladder.md: evidence levels and what each level allows.references/team-principles.md: review principles that apply to every lens.references/lenses/<lens>.md: one checklist per review direction: general(综合), behavior(行为保持), contracts(契约与数据), security(安全与权限), cross-feature(跨功能影响), duplication(重复与简化). An English CI summary calls them general, behavior preservation, contracts and data, security and permissions, cross-feature impact, and duplication and simplification.references/repos/<repo>.md: risk paths and known failure patterns of one repository; it applies to that repository only. references/repos/example.md shows the format, which a repository's own .mcode-review.md uses too, and describes no real repository.references/stacks/<stack>.md: failure patterns of one technology stack, read together with the lens checklist: go-backend for Go services.git fetch of the target branch and of a named PR in local mode, and the gh or glab lookup of a PR's target branch..mcode-review.json and .mcode-review.md are restored to the merge-base version. Review the PR's changes to AGENTS.md and similar files as ordinary changes.Review a pull request or the current branch with the MCode Review rules (severity, evidence ladder, lens checklists, review principles) and the repository's own .mcode-review.json and .mcode-review.md
---name: pr-reviewdescription: Review a pull request or the current branch with the MCode Review rules (severity, evidence ladder, lens…---# stacks/jiachen/skills/pr-review/SKILL.mdÜbersicht
Review a pull request or the current branch with the MCode Review rules (severity, evidence ladder, lens checklists, review principles) and the repository's own .mcode-review.json and .mcode-review.md. Works with GitHub pull requests and GitLab merge requests. Use when the MCode Review CI pipeline starts a review pass, or when a developer asks to review their PR or branch before asking a person to review it.
FAQ
Laden Sie stacks/jiachen/skills/pr-review/SKILL.md vom Herausgeber herunter oder kopieren Sie den Pfad und öffnen Sie das Repository. PlugMCP listet den Skill und hostet die Datei nicht.
Der Herausgeber pflegt es unter https://github.com/MiniMax-AI/mcode-stack.
Claude, Cursor, Codex und Grok Build können eine SKILL.md lesen, die Sie aus dem Repository des Herausgebers hinzufügen. Grok Bot installiert sie, wenn Sie den Link zum GitHub-Ordner des Skills in einem Chat senden.