Install Matlab Model Code Generator
Pick your agent. Every command is ready to paste.
npx skills add zhnnky329/MathModeling-skills --skill matlab-model-code-generatorThe open skills CLI detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.
01
Install it
Run the command above, or upload the folder in Claude.
02
Ask naturally
Describe the task. Your agent loads matlab-model-code-generator when the request matches its description.
03
Name it if needed
If it does not trigger, say “use the matlab-model-code-generator skill”. In Codex, type $matlab-model-code-generator.
Preconditions
- G2.5 human method choice is recorded.
code/matlab/Qx/qx_code_plan.mdexists.- Required cleaned data and profile exist.
- The plan targets MATLAB or 北太天元.
Legacy artifacts may be read during migration but do not override the human decision.
Workflow
- Read the code plan, decision ledger, method card, probe conditions, and data profile.
- Confirm scope: approved main plus usable baseline. Implement a fallback only after activation.
- Generate conservative
.mfiles undercode/matlab/Qx/. - Prefer basic matrix/table operations and avoid optional toolboxes unless the plan approves them.
- Save tables, metrics, useful figures, and
run_summary.jsonunderresults/Qx/experiments/roundN/. - Evaluate output-degeneracy and fallback-trigger metrics required by the plan.
- Use
diaryor another full log only for a failure or reproducibility warning. - Run in the available compatible runtime. If unavailable, report the unexecuted state explicitly.
- Hand off to
code-reviewer.
Script Layout
code/matlab/Qx/
├── qx_code_plan.md
├── qx_baseline.m
├── qx_main.m
└── run_all.m % only when useful
Do not create scripts for unapproved candidates or a duplicate README.
Compatibility Rules
- Prefer
readtable,readmatrix,writetable,writematrix,save,load, andfullfile. - Use
rng(2026)or the recorded seed. - Use
jsonencodewhen supported; otherwise write the required JSON fields deterministically. - Avoid Live Scripts, App Designer, GUI code, Simulink, and toolbox-only functions unless explicitly approved.
- Note any 北太天元 compatibility risk in the run summary.
Run Summary
Follow the model-code-analyzer contract, including approved decision ID, roles, paths, metrics, output-degeneracy evidence, fallback state, timing, seed, environment, warnings, and errors.
Rules
- Do not change the selected mathematical method.
- Do not access or overwrite raw data.
- Do not fabricate successful execution when MATLAB/北太天元 is unavailable.
- Keep only evidence-bearing intermediate outputs.
- Separate Type 1 diagnostics from paper figures.
Verification
- Main and baseline are directly comparable and both executed when a runtime is available.
- Fallback code exists only when activated.
- Formal outputs and run summary exist.
- Compatibility, seed, inputs, warnings, and errors are recorded.
- Required concentration/degeneracy checks are saved.
- Next handoff is
code-reviewer.
Tips for Matlab Model Code Generator
- • Start a fresh session after installing so your agent picks up the new skill.
- • It is part of a pack with 29 skills. Install only the ones you need with --skill to keep triggers precise.
- • If two skills overlap, mention the one you want by name.
Questions about Matlab Model Code Generator
What does the Matlab Model Code Generator skill do?
Generate and run minimal reproducible MATLAB or Beita Tianyuan compatible code for the human-approved main method and usable baseline, with compact experiment artifacts and a canonical run summary.
How do I install Matlab Model Code Generator?
Run "npx skills add zhnnky329/MathModeling-skills --skill matlab-model-code-generator" in your project. The skills CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.
Does Matlab Model Code Generator work in Cursor and Codex?
Yes. Matlab Model Code Generator uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.
Is Matlab Model Code Generator free?
Matlab Model Code Generator is open source on GitHub under the MIT license. It is free to install; check the license before commercial use.
Who made Matlab Model Code Generator?
Matlab Model Code Generator is published by zhnnky329 in the zhnnky329/MathModeling-skills repository, together with 28 other skills.



