본문으로 건너뛰기
cccskills
무료GitHub에 공개

matlab-coach-debugging

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md4.1 KB
  • references/debugging-patterns.md2.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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

  1. State expectation: Ask what the learner expected the code to do.
  2. Capture evidence: Get the exact error text or observed wrong output.
  3. Localize: Identify the file, line, expression, and variable involved.
  4. Inspect state: Ask for or run size, class, whos, and representative values.
  5. Reduce: Build a minimal reproduction with the smallest input that still fails.
  6. Hypothesize: Ask the learner to explain the likely cause before fixing.
  7. Test repair: Apply one change and verify with a normal case and edge case.
  8. 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.
  • length used when height, width, numel, or size is the real intent.
  • Table extraction confused across T.Var, T(:, "Var"), and T{:, "Var"}.
  • Cell contents confused with cells: C{i} versus C(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:

  1. Present a short flawed MATLAB explanation or snippet.
  2. Ask the learner to identify the false claim or failing line.
  3. Ask for evidence that proves the issue.
  4. Ask for the smallest correction.
  5. 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, or whos when requesting help.
  • Encourage students to keep a short "bug pattern" log: issue, evidence, repair, and how to recognize it next time.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use this skill when the user wants to author, design, scope, or refine an Agent Skill (a SKILL.md file). Trigger phrases include "build a new skill", "design an agent skill", "scope a SKILL.md", "how should I structure this skill", "write a skill for X", "my skill isn't working well", or any request to improve an existing SKILL.md. Walks the user through an empirical, test-first process — probe the agent for real failures, design only for genuine knowledge gaps, iterate against runnable examples, and verify across models.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

matlab/agent-skills-playground1882026년 10월 15일 업데이트

Deploy AI models to embedded hardware using MathWorks tools (MATLAB, Simulink, Embedded Coder). Covers two workflow patterns: (1) MathWorks-native or 3P-imported models rebuilt as dlnetwork for lean hardware (Cortex-M, DSP), (2) direct C/C++ code generation from PyTorch and LiteRT models for high-performance hardware (Cortex-A, x86, GPU). Trigger when: user wants to deploy AI to embedded targets; generate C/CUDA from neural networks; compress AI models for MCU/DSP; integrate AI in Simulink for system-level simulation; import PyTorch/ONNX/TensorFlow models for embedded deployment; optimize AI for resource-constrained hardware; or use loadPyTorchExportedProgram, importNetworkFromPyTorch, dlquantizer, exportNetworkToSimulink, or Embedded Coder with AI models.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

matlab/agent-skills-playground1882026년 10월 15일 업데이트

Use when a learner asks for help with MATLAB homework, labs, projects, graded assignments, take-home exams, quizzes, or any programming task where academic integrity, course policy, or instructor constraints may limit direct solutions. Use to provide policy-aware hints, conceptual coaching, partial feedback, and assignment-safe MATLAB tutoring.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

matlab/agent-skills-playground1882026년 10월 15일 업데이트

Use when an AI tutor session concerns MATLAB programming concepts, MATLAB syntax, MATLAB errors, MATLAB code style, MATLAB projects, or MATLAB toolbox workflows.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

matlab/agent-skills-playground1882026년 10월 15일 업데이트

Use when an instructor wants to create, interview for, configure, install, update, or review a course AI-use policy for MATLAB AI tutoring. Produces an AI-POLICY.md file for LMS sharing and local tutoring-session enforcement by assignment guardrails.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

matlab/agent-skills-playground1882026년 10월 15일 업데이트

Create MATLAB Course Designer MATLAB Exercise learning activities by wrapping the existing matlab-generate-grader-assessments skill, then validating generated solution.m, template.m, and tests.m files with MATLAB MCP Server tool calls. Use when the user asks to create a MATLAB Exercise, MATLAB course activity, Course Designer MATLAB activity, validated MATLAB solution file, or MATLAB Exercise component folder.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

matlab/agent-skills-playground1882026년 10월 15일 업데이트

matlab의 스킬 모두 보기

이 스킬의 문제 신고