一键导入
matlab
Run MATLAB scripts from the terminal in batch mode (no GUI, no splash screen). Use when the user wants to execute .m files or MATLAB commands.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run MATLAB scripts from the terminal in batch mode (no GUI, no splash screen). Use when the user wants to execute .m files or MATLAB commands.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Interview the user relentlessly about a plan or design until reaching shared understanding, collecting decisions without performing implementation. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
Triage TI-Toolbox telemetry error clusters from TI-toolbox-stats, using the artifact-first workflow to classify BigQuery-derived failures, compare them against current TI-Toolbox releases, and only open or close GitHub issues after review.
Use the global docx-tools CLI for Microsoft Word .docx writing workflows, including building documents from JSON specs, reading .docx files back to specs, patching specs, handling comments, adding authors/figures, and parsing BibTeX.
BIDS (Brain Imaging Data Structure) conventions for organizing neuroimaging datasets. Use when creating, reading, validating, or navigating BIDS-compliant directory trees, file names, metadata sidecars, or derivatives.
Production code quality standards and review checklist. Use when writing or reviewing code.
EEGLAB toolbox reference for EEG/MEG processing in MATLAB. Use when writing or modifying EEGLAB scripts, working with the EEG struct, ICA, clean_rawdata, ICLabel, pop_* functions, STUDY designs, or BIDS-EEG import. Covers the EEG structure, preprocessing pipeline, plugin API, and function lookup.
| name | matlab |
| description | Run MATLAB scripts from the terminal in batch mode (no GUI, no splash screen). Use when the user wants to execute .m files or MATLAB commands. |
| user-invocable | false |
MATLAB is installed at /Applications/MATLAB_R2023b.app/bin/matlab.
When running MATLAB scripts or commands, ALWAYS use these flags:
/Applications/MATLAB_R2023b.app/bin/matlab -batch "<command_or_script>"
The -batch flag:
-nosplash -nodisplay -nodesktop -r "...; exit" pattern# Run a .m file (omit the .m extension)
/Applications/MATLAB_R2023b.app/bin/matlab -batch "run('/path/to/script.m')"
# Or if already in the script's directory:
/Applications/MATLAB_R2023b.app/bin/matlab -batch "cd('/path/to/dir'); my_script"
/Applications/MATLAB_R2023b.app/bin/matlab -batch "disp('hello'); x = 1+1; disp(x)"
MATLAB -batch does not support direct argument passing. Use environment variables or write a wrapper:
# Via environment variable
export MY_PARAM=42
/Applications/MATLAB_R2023b.app/bin/matlab -batch "param = str2double(getenv('MY_PARAM')); my_script"
If the user has /Applications/MATLAB_R2023b.app/bin on their PATH, use matlab -batch directly.
-batch.-batch is preferred over -r because it auto-exits and sets exit codes correctly.timeout or run_in_background.figure() or plotting, add set(0, 'DefaultFigureVisible', 'off') at the top or use -batch which already suppresses display, then save figures with saveas() or exportgraphics().fullfile() for paths.cd unless necessary; prefer absolute or constructed paths.size(A) returns dimensions; be explicit with size(A, dim).length(A) is often wrong for matrices; prefer numel or size.== on floats is fragile; use tolerances.A = zeros(n, m);
idx = ismember(labels, wanted);
out = mean(X, 2, 'omitnan');
T = readtable(path);
writetable(T, outPath);
S = load(matPath);
save(outPath, 'var1', 'var2', '-v7.3');