用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/matlab/mcp-framework-matlab-production-server --skill mps-review命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Create and deploy MCP tools from MATLAB functions to MATLAB Production Server using the MCP Framework for MATLAB Production Server support package
Create and deploy MCP tools from MATLAB functions to MATLAB Production Server using the MCP Framework for MATLAB Production Server support package
Run a code review and publish it to the reviews branch for the review-gate CI check
正在显示 SKILL.md
| name | mps-review |
| description | Run a code review and publish it to the reviews branch for the review-gate CI check |
| argument-hint | <PR number> |
| allowed-tools | Read Write Bash(git *) Bash(grep *) Bash(mkdir *) Bash(rm *) Bash(cat *) |
You are helping the user run a code review on the current branch and publish the results to the reviews branch so the review-gate CI check can pass.
If the user provided a PR number as an argument, use that.
Otherwise, derive it from the current branch:
git branch --show-current
The PR number may be embedded in the branch name (e.g., feature/PR-21-description) or you may need to ask the user. If you cannot determine the PR number, ask the user to provide it.
Review the current branch's changes against main directly. Do NOT use gh or the /review skill — they are unavailable in this environment.
First, determine the review scope:
git log --oneline main..HEAD
Scope rules:
git diff main..HEADgit diff HEAD~5..HEADThen perform a thorough code review of the diff, covering:
Test coverage expectation: If the diff introduces new public functions (new .m files outside of Test/ and +test/ directories), check whether corresponding tests are also included. If new public functions are added without new or modified test files, flag this in the review as a finding:
Automatic rejection rule: If any new MATLAB code (.m files) contains Java calls (e.g., java.util.*, java.lang.*, javaObject, javaMethod, or any java. reference), the verdict MUST be Reject. Java must never appear in new MATLAB code. Flag every occurrence and state clearly in the verdict that the PR cannot be approved until all Java usage is removed.
Format the review with clear sections and bullet points.
Create the review file locally:
mkdir -p reviews
The file is reviews/PR-<N>.md. It may already exist from a previous review run. Check the remote reviews branch for an existing file:
git show origin/reviews:reviews/PR-<N>.md 2>/dev/null
If this command outputs content, the file exists — use the re-review flow below. If it errors (file not found), this is the first review.
Write it with this structure:
## Claude Code Review — <YYYY-MM-DDTHH:MM>
<full review content from Step 2>
## Review Response
<!-- Add your response to the review findings here -->
The file contains one or more prior review runs. Restructure it as follows:
## Claude Code Review — <YYYY-MM-DDTHH:MM>## Review Response placeholder--- separatorThe resulting structure looks like:
## Claude Code Review — 2026-08-17T15:00
<latest review content>
## Review Response
<!-- Add your response to the review findings here -->
---
## Claude Code Review — 2026-08-17T14:00
<previous review content>
## Review Response
<user's previous response, if filled in>
The CI review-gate checks only the topmost ## Review Response section. Prior reviews serve as history.
This repo may be on a CIFS/SMB network share where git's atomic ref-file renames fail. Do NOT use git worktree or git commit to update the reviews branch — they will fail with couldn't set 'refs/branches/reviews'. Instead, use git plumbing commands to build a commit and push it directly:
# Fetch the latest reviews branch state
git fetch origin reviews
# Get the current reviews branch HEAD
REVIEWS_HEAD=$(git rev-parse origin/reviews)
# Hash the review file as a git blob
BLOB=$(git hash-object -w reviews/PR-<N>.md)
# Build the reviews/ subtree: existing entries + new/updated file
SUBTREE=$( (git ls-tree "$REVIEWS_HEAD:reviews" | grep -v "PR-<N>.md"; echo "100644 blob $BLOB PR-<N>.md") | git mktree )
# Build the root tree: existing root entries with updated reviews subtree
ROOT_TREE=$( (git ls-tree "$REVIEWS_HEAD" | grep -v "^.* reviews$"; echo "040000 tree $SUBTREE reviews") | git mktree )
# Create a commit object
COMMIT=$(git commit-tree "$ROOT_TREE" -p "$REVIEWS_HEAD" -m "Review for PR #<N>")
# Push to remote (ignore harmless local tracking ref update error)
git push origin "$COMMIT:refs/heads/reviews" 2>&1 | grep -v "update_ref failed" || true
Important: The grep -v at the end suppresses the CIFS error update_ref failed for ref 'refs/remotes/origin/reviews'. This error means the local tracking ref could not be updated, but the push itself succeeded — the remote has the correct commit.
Tell the user:
reviews branch as reviews/PR-<N>.md--- separator## Review Response section<!-- Add your response ... -->) or a blank section will NOT pass the gatereviews/PR-<N>.md and push again using the same plumbing technique, or you can help them do itreviews branch does not exist on the remote, tell the user they need to create it first (one-time setup)git push reports update_ref failed for ref 'refs/remotes/origin/reviews' but the push line shows the remote accepted it (e.g., 3b02741..3d01904 ... -> reviews), the push succeeded. This is a harmless CIFS/SMB artifact.origin/reviews and rebuild the commit on top of the new HEAD.--- Copyright 2026 The MathWorks, Inc. ---