matlab-review-code

Review MATLAB source code for quality, correctness risks, and MathWorks coding standards via static analysis.

883|109|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-review-code
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: matlab-review-code
Source: https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/matlab-core/matlab-review-code
Command: npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-review-code

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you identify issues in MATLAB code quality and maintainability—such as violations of MathWorks coding conventions, risky patterns, and structural problems—before they become bugs, performance regressions, or hard-to-maintain code.

Core Features & Use Cases

  • Automated static analysis: Runs check_matlab_code on target files to surface warnings and errors early.
  • Standards-aligned review: Loads matlab_coding_guidelines from the MCP resource as the baseline for naming, formatting, and structure.
  • Consistency and code-smell detection: Checks naming conventions, function signatures (including arguments blocks and name-value patterns), structural complexity, and common modern vs. legacy patterns.
  • Practical handoff reporting: Produces a severity-focused summary (errors > warnings > suggestions) suitable for code review, cleanup, and publication readiness.
  • Use Case: Review a MATLAB function before handoff by running static analysis across a folder, then validating that public APIs use arguments blocks and modern patterns (e.g., datetime, tiledlayout) rather than legacy constructs.

Quick Start

Ask your AI agent to review the MATLAB files in your project for quality, coding-standard compliance, and code smells using matlab-review-code.

Frequently Asked Questions about matlab-review-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review MATLAB code for quality and MathWorks coding standards?▼

To review MATLAB code for quality, run automated static analysis to surface warnings and errors, then validate naming conventions, function signatures, and structural complexity against MathWorks coding guidelines to ensure maintainability.

What is static analysis for MATLAB code and when do I need it?▼

Static analysis for MATLAB code evaluates source files without execution to detect coding smells, risky patterns like eval, and standard violations. You need it before code publication, handoff, or pre-commit verification to prevent bugs and performance regressions.

How do I check MATLAB code for risky patterns like eval before handoff?▼

To check MATLAB code for risky patterns like eval before handoff, use static analysis to flag high-risk constructs and legacy constructs, prioritizing findings by severity from errors to warnings and suggestions for a practical cleanup report.

Can I automatically detect legacy MATLAB patterns and code smells in my project?▼

Yes, you can automatically detect legacy MATLAB patterns and code smells by running static analysis across project folders to check for modern vs. legacy constructs like datetime and tiledlayout, ensuring public APIs use arguments blocks.

Does MATLAB code review support severity-based reporting for code cleanup?▼

MATLAB code review supports severity-based reporting by prioritizing findings from errors to warnings and then suggestions, producing a practical summary suitable for code cleanup, publication readiness, and development audits.

What are the limitations of automated MATLAB static analysis for code quality?▼

Automated MATLAB static analysis focuses on structural complexity, naming conventions, and known risky patterns but requires the check_matlab_code tool and matlab_coding_guidelines reference to function, limiting its scope to predefined coding standards.