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

matlab-testing-ci

MATLAB testing, validation, and CI workflow for matlab.unittest, MATLAB Test, Simulink Test, coverage, artifact generation, GitHub Actions, and open-source reproducibility. Use whenever MATLAB work needs verification, regression tests, CI, GitHub publication, or acceptance criteria.

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

연동 도구GitHub
설치 방법 보기

포함된 파일(15)

  • SKILL.md4.5 KB
  • scripts/mas_bench_record.m11.5 KB
  • scripts/mas_capability_check.m11.6 KB
  • scripts/mas_grade.m4.1 KB
  • scripts/mas_phase43_grade.m12.4 KB
  • scripts/mas_ref_derive.m21.7 KB
  • scripts/mas_ref_spec.m6.3 KB
  • scripts/mas_refcheck.m10.7 KB
  • scripts/mas_skill_audit.m10.9 KB
  • scripts/mas_verify_task.m3.9 KB
  • tests/test_bench.m5.4 KB
  • tests/test_capability.m5.7 KB
  • tests/test_grade.m3.0 KB
  • tests/test_phase43_grade.m9.1 KB
  • tests/test_refcheck.m5.0 KB

SKILL.md(원문)

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

MATLAB Testing CI

Use this skill to close the loop on MATLAB work.

Test Ladder

Start as small as possible, then broaden:

  1. Smoke script runs without error.
  2. One unit test checks a core numeric result.
  3. Project or folder tests pass with runtests.
  4. Simulink model simulates and logged signals are checked.
  5. CI workflow runs the same command.

MATLAB/Simulink Completion Rule

For MATLAB or Simulink engineering tasks, completion means the work has been self-checked after writing:

  1. Scripts/functions run without error.
  2. Simulink models load and update/compile without diagram errors.
  3. Simulations reach the requested stop time.
  4. Key logged signals are nonempty and finite.
  5. Generated figures/data/reports exist and are nonempty.
  6. If code generation or deployment is requested, generated code/project/binary artifacts are checked for existence and nonzero size.
  7. If any step cannot be completed, record the exact blocker, the command that failed, and the highest-value next action.

MATLAB Unit Test Pattern

Use:

results = runtests;
assertSuccess(results);

For scripts, add explicit assertions instead of only checking that MATLAB exits.

CI Pattern

For GitHub Actions, use MathWorks maintained actions:

  • matlab-actions/setup-matlab@v3
  • matlab-actions/run-tests@v3
  • matlab-actions/run-command@v3

Use self-hosted runners for private licenses, specialized toolboxes, hardware, or long simulations.

Artifact Requirements

Save:

  • MATLAB command log.
  • Test results or summary JSON.
  • Figures, models, generated code, and reports.
  • MATLAB release and toolbox inventory.
  • Dataset or paper reproduction manifest.

Acceptance Report

End every task with:

  • Command executed.
  • Passed checks.
  • Skipped checks and reason.
  • Artifact folder.
  • Next highest-value regression test.

Three Questions, Three Answers

"It ran", "the number is right" and "the requirement is met" are different claims, and Phase 3A/3B produced every combination of them. mas_grade keeps them apart:

r = mas_grade(checks);   % each check: executed / kind / value / reference / limit
r.ran      % did everything execute?
r.correct  % true | false | 'UNDETERMINED'  (a numeric check with no independent
           %                                  reference is UNDETERMINED, not true)
r.meets    % true | false | 'UNDETERMINED'
r.overall  % FAIL | CORRECT_NOT_ACCEPTED | UNDETERMINED | PASS

The CORRECT_NOT_ACCEPTED verdict exists for the Boost case where the output sat at 47.88 V (correct) while recovery took 2.25 ms against a 2 ms requirement. Reporting that as PASS is exactly the failure this skill is supposed to prevent.

Domain-specific thresholds (Buck S1-S9, Boost B1-B12, BER curves, THD limits) belong to the domain skill; mas_grade only consumes them. Never copy one domain's numbers into another. tests/test_grade.m covers six combinations.

References Are Frozen, Not Recomputed

A task that grades itself is not being tested. mas_verify_task(id, values) grades a task's NUMBERS against evals/references/reference_manifest.json, which is committed with a SHA-256 per entry:

v = mas_verify_task('D3', out.values);
v.status       % PASS | FAIL | UNDETERMINED
v.perCheck     % field, got, ref, op, tol, pass

Three guards, all of which must hold before a number is called a reference:

  1. Two or more INDEPENDENT derivation methods agree far tighter than the grading tolerance (mas_ref_derive.m). The Phase 4 D3 error -- the analog Butterworth formula used to grade a DIGITAL filter -- cannot survive this, because the second method is a hand-written difference-equation recursion, not a restatement.
  2. The hand-declared value in mas_ref_spec.m agrees with the derived value at freeze time. A transposed centroid or a wrong constant fails before freezing.
  3. mas_refcheck('verify') re-derives everything and compares hashes. Editing the manifest -- even consistently -- is detected.

mas_refcheck('freeze') rewrites the committed file and is deliberately NOT part of the normal test run: changing a reference must show up as a diff. tests/test_refcheck.m feeds the verifier wrong values and two kinds of tampered manifest and requires the right rejection in each case.

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

MATLAB code generation and deployment workflow for MATLAB Coder, Simulink Coder, Embedded Coder, GPU Coder, HDL Coder, fixed-point conversion, MEX validation, and embedded deployment readiness. Use whenever the user asks to generate C/C++/CUDA/HDL/code, deploy algorithms, or validate generated code.

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

wzyn20051216/matlab-agent-skills262026년 10월 21일 업데이트

MATLAB workflow for control systems, system identification, robust control, MPC, Simulink Control Design, parameter tuning, constrained optimization, and numerical validation. Use whenever the user asks for controllers, transfer functions, state-space models, tuning, identification, optimal control, or solver-based engineering.

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

wzyn20051216/matlab-agent-skills262026년 10월 21일 업데이트

MATLAB data analysis workflow for tables, timetables, statistics, fitting, optimization-assisted analysis, visualization, report artifacts, and reproducible paper figures. Use whenever the user asks MATLAB to analyze data, plot results, fit models, process CSV/Excel/MAT files, or reproduce figures.

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

wzyn20051216/matlab-agent-skills262026년 10월 21일 업데이트

MATLAB agentic workflow router. Use this whenever the user asks for MATLAB, Simulink, .m/.mlx/.slx work, toolbox-driven engineering, paper reproduction, simulation, code generation, data analysis, control, robotics, signal/image/AI workflows, or wants an end-to-end automated MATLAB task with validation. For Simulink tasks on this machine, default to a visible workflow: open MATLAB/Simulink windows first so the user can watch modeling, simulation, tuning, and plotting progress.

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

wzyn20051216/matlab-agent-skills262026년 10월 21일 업데이트

MATLAB robotics and autonomy workflow for ROS Toolbox, Robotics System Toolbox, Navigation Toolbox, UAV Toolbox, sensor fusion, trajectory planning, simulation, and reproducible robot experiments. Use for ROS/ROS 2 bags, robot models, path planning, SLAM, state estimation, and autonomy prototyping.

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

wzyn20051216/matlab-agent-skills262026년 10월 21일 업데이트

Run MATLAB tasks from Codex with reliable MCP-based execution, logs, artifacts, toolbox inventory, smoke tests, and reproducible validation. Use whenever MATLAB code, .m/.mlx scripts, MATLAB tests, local toolbox probing, or command-line automation is needed.

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

wzyn20051216/matlab-agent-skills262026년 10월 21일 업데이트

wzyn20051216의 스킬 모두 보기

이 스킬의 문제 신고