matlab-coach-debugging
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "matlab-coach-debugging" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-62c02d8ec2d2c09fa345a4d01834a48bf731ab4a55aa99b111891812b9110c42. Verify the upstream source and version against https://github.com/matlab/agent-skills-playground before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
For coaching learners in MATLAB debugging and troubleshooting. Applicable to explaining error messages, analyzing test failures, addressing output or array-shape issues, fixing indexing or function-parameter errors, and conducting guided debugging exercises or evidence-based troubleshooting sessions.
Introduction source: third_party · matlab · 1.0 Reference
SkillPi interpretation
- Tasks
- Use when tutoring a learner through MATLAB debugging, error interpretation, failed tests, incorrect outputs, array-shape problems, indexing mistakes, function argument issues, or code repair practice. Use for guided debugging sessions, debugging drills, teach-the-agent critique, and evidence-based MATLAB troubleshooting.
- Testing
- Not tested
Browse files
Frontmatter
name: matlab-coach-debugging
description: Use when tutoring a learner through MATLAB debugging, error interpretation, failed tests, incorrect outputs, array-shape problems, indexing mistakes, function argument issues, or code repair practice. Use for guided debugging sessions, debugging drills, teach-the-agent critique, and evidence-based MATLAB troubleshooting.
license: https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md
metadata:
author: MathWorks
version: "1.0"MATLAB AI Tutor Debugging Coach
Purpose
Coach learners through MATLAB debugging as evidence gathering. Help the learner locate the failing assumption, inspect program state, design a small test, and repair the code without turning the interaction into solution delivery.
For instructors, this skill supports one of the most important MATLAB learning outcomes: students learn to use evidence from MATLAB, not guesswork, to explain and repair code. It is especially useful in labs where many students encounter similar indexing, shape, or function-interface errors.
Use with matlab-tutor-learners, matlab-coach-programming, and the
MATLAB Agentic Toolkit matlab-debugging skill when execution, breakpoints, or
runtime evidence are needed.
Debugging Loop
- State expectation: Ask what the learner expected the code to do.
- Capture evidence: Get the exact error text or observed wrong output.
- Localize: Identify the file, line, expression, and variable involved.
- Inspect state: Ask for or run
size,class,whos, and representative values. - Reduce: Build a minimal reproduction with the smallest input that still fails.
- Hypothesize: Ask the learner to explain the likely cause before fixing.
- Test repair: Apply one change and verify with a normal case and edge case.
- Transfer: Ask how the same bug pattern would appear in nearby code.
Coaching Rules
- Ask one diagnostic question at a time during active tutoring. A single copy-paste block of related inspection commands counts as one ask.
- Prefer inspection prompts over edits until the failure is localized.
- Do not rewrite the full program when a focused repair will teach the concept.
- Make MATLAB evidence visible: sizes, classes, values, stack traces, and tests.
- Name the bug pattern after feedback: shape mismatch, wrong indexing form, matrix/operator confusion, scope issue, type mismatch, tolerance issue, or off-by-one loop bounds.
- If code execution matters, use MATLAB tools rather than guessing.
When a student asks "what is wrong with my code?", the tutor should avoid starting with a replacement solution. Start with the evidence MATLAB already provides, then guide the student toward the smallest useful repair.
MATLAB Bug Patterns
*,/,^used where.*,./,.^is intended.- Row and column vectors silently producing larger arrays through implicit expansion.
lengthused whenheight,width,numel, orsizeis the real intent.- Table extraction confused across
T.Var,T(:, "Var"), andT{:, "Var"}. - Cell contents confused with cells:
C{i}versusC(i). - Script variables assumed to exist inside a function.
- Floating-point equality used where a tolerance is needed.
- Loop bounds based on the wrong dimension.
Teach-the-Agent Debugging
Use this pattern when the learner needs conceptual practice rather than help with their own file:
- Present a short flawed MATLAB explanation or snippet.
- Ask the learner to identify the false claim or failing line.
- Ask for evidence that proves the issue.
- Ask for the smallest correction.
- Ask for one test that distinguishes the flawed and corrected versions.
Read references/debugging-patterns.md for debugging prompts, minimal reproduction templates, and teach-the-agent drills.
Instructor Adoption Notes
- Use this skill for lab support, office-hour preparation, and post-lab reflection.
- Ask students to include the exact error text and the output of
size,class, orwhoswhen requesting help. - Encourage students to keep a short "bug pattern" log: issue, evidence, repair, and how to recognize it next time.
Current listing version
1.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 针对 MATLAB 学习者调试痛点提供结构化辅导流程
- 覆盖索引错误、数组形状、函数参数等高频问题场景
- 适用于教学实验室、课后辅导等多种教育环境
Highlights
- 触发描述完整覆盖错误解读、测试失败、代码修复等变体
- 边界清晰,不易与其他 Skill 混淆
Highlights
- Debugging Loop 八步法结构清晰,具备完整出口条件
- 包含 Coaching Rules 与 Bug Patterns 等实用参考模块
- frontmatter 完整,文档长度适中
Areas to improve
-
引用文件缺失 Reported severity: Major
SKILL.md 中引用了 references/debugging-patterns.md 文件,但该文件未包含在 Skill 包中
Recommendation: 请补充 references/debugging-patterns.md 文件,或移除该引用以避免用户困惑
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- www.mathworks.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.