design-creative
Coaching MATLAB Debugging Through Evidence, Not Guesswork
How matlab-coach-debugging turns agents into guided debugging tutors that make MATLAB learners use evidence, not guesswork.
Where this fits
A teaching assistant agent sees the same MATLAB lab error every week—"Index exceeds the number of array elements."—and the learner has already guessed three fixes and made things worse. Instead of handing over corrected code, you need the agent to coach the student through locating the failing assumption and testing a small repair. This skill gives that interaction a repeatable, evidence-based structure.
Why agents benefit
- The agent learns to treat errors as evidence, not as a trigger to rewrite code.
- It can run guided debugging drills that keep the learner responsible for the next step.
- It supports teach-the-agent critique, where the agent's own debugging reasoning is examined and improved.
- It composes with execution-based MATLAB debugging skills when runtime state, breakpoints, or array shapes need inspection.
- It turns vague "it doesn't work" reports into explicit failing assumptions and a test plan.
Practical scenarios
Indexing out of bounds in a student loop
A learner's script fails on scores(i+1) with "Index exceeds the number of array elements." The agent asks for the loop bounds, then prompts the learner to print numel(scores) and i at the last iteration. The student sees the mismatch and adjusts the stop condition themselves.
Function argument mismatch in a lab submission
The learner passes a vector to a function that expects a matrix. Instead of explaining the function signature, the agent asks, "What shape did whos report for your input, and what shape does the function's help text expect?" The learner runs whos and discovers the transpose issue.
Failed tests with incorrect output shape
A learner's test suite fails only for a 3-D array input. The agent guides the learner to compare size(actual) and size(expected) before reading the assertion message. This isolates the problem to a missing squeeze or permute call, and the learner practices evidence-based repair.
Add it to your agent workflow
Install the skill with:
npx skills add matlab/agent-skills-playground --skill matlab-coach-debugging
Then define a simple workflow rule:
When a MATLAB learner reports an error, use matlab-coach-debugging.
Ask for the exact error message, guide them to inspect program state,
and have them repair the code themselves.
Compare before adopting
Look at the skill's quality signals: it is authored by MathWorks, packaged under BSD-3-Clause, and lives in the same playground as other MATLAB tutor skills. Check maintenance freshness by seeing whether the GitHub repository has recent updates and active issues. Alternatives include generic "debugging tutor" prompts, but they usually lack MATLAB-specific error patterns such as array-shape and indexing mistakes. The strongest workflow fit is when your agent already has MATLAB execution or a learner profile to combine with this coaching skill.
Why it is worth tracking
With 173 GitHub stars and an official MathWorks maintainer, this skill is a signal that MATLAB education is moving toward agent-assisted tutoring. It is worth tracking because it targets a high-value learning outcome: using evidence to debug, not guessing. Evaluators should try it during a debugging drill, then assess whether the learner, not the agent, performed the repair. For a broader view of the MATLAB coaching skill family, see https://www.openagentskill.com/skills/matlab-matlab-coach-debugging.
Featured Skill
matlab-coach-debugging
Skill by matlab