Parfor error fixer
Paste a failing parfor loop. Get the cause of the error and a fixed loop that runs in parallel.
Parfor error fixer is a free AI skill for the job "Test and fix code". Give the instructions to an AI assistant that supports the required files and tools, then review its output.
Free · No account · BSD 2 Clause licence · Made by MathWorks · Level: advanced · Thinking: high
Made by MathWorks. See the original on GitHub; we copied it as it is, with its licence.
What it does
A parfor loop that runs, with the exact reason the old one failed. Paste the loop or the error, and it uses MATLAB's own code checker rather than guessing the rules. Parfor sorts each variable in the loop as sliced, reduction, broadcast or temporary, and mistakes cause errors like unable to classify. AI models often misremember these rules, so the skill runs the code analyser first and trusts that. Then it explains which variable broke the rule and rewrites the loop. It also helps convert a normal for loop into parfor. It does not tune speed. You need MATLAB.
You give it
- The parfor loop or whole .m file
- The error text (optional)
- MATLAB access
You get
- Plain reason for the error
- Code checker findings
- Fixed loop
- Notes on variable types
Use it when
- MATLAB says it cannot classify a variable in your parfor.
- You want to turn a slow for loop into a parallel one.
- A sliced or reduction variable behaves oddly.
- You are reviewing a script that uses parfor and want it checked.
How to use it
- Add it to your AI once: download it and add the folder to Claude, ChatGPT or Codex as a skill.
- Ask for the job in your own words. Your AI opens the skill when it fits.
- It works best when your AI can run MATLAB.