In short.
MATLAB Model Code Generator is an AI assistant skill for teams implementing mathematical models, with a substantial dependency on approved project documents and a compatible execution environment. It specifies separate main and baseline scripts, experiment artifacts and a structured run summary, prohibits changing the human-approved method, and permits fallback implementation only after activation. No code was executed, so runtime compatibility, generated-code quality and reproducibility remain unassessed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage is limited to .claude/skills/matlab-model-code-generator, represented by its SKILL.md, and the repository-root MIT LICENSE. Other repository skills, referenced project documents, model-code-analyzer and code-reviewer implementations, runtimes and datasets are outside the supplied material. No code was executed; generated artifacts, runtime compatibility, numerical correctness, performance and reproducibility were not assessed.
The overview
Identity
The resource is matlab-model-code-generator, located at .claude/skills/matlab-model-code-generator/SKILL.md in zhnnky329/MathModeling-skills. It supplies instructions for an assistant to generate and, when possible, execute minimal reproducible MATLAB or 北太天元-compatible code.
Its scope starts after mathematical-method approval and ends with a handoff to code-reviewer. It is intended to work within a larger modeling process.
Assessment
The skill offers concrete implementation guidance: separate main and baseline scripts, controlled fallback activation, compact outputs and explicit reporting of execution failures or unavailable runtimes. These provisions make it potentially useful for teams that already maintain the required modeling documents.
Its usefulness depends on documents and companion contracts outside this folder. The instructions alone do not demonstrate correct mathematics, working code or successful execution in either named runtime.
Users
The intended users are mathematical-modeling teams and developers implementing a human-approved method in MATLAB or 北太天元. A baseline is a reference implementation used to judge the main method on comparable terms.
Beginners would need help preparing the method decision, data profile and code plan. Experienced developers may find the explicit artifact layout and execution records useful, but must still inspect generated code and results.
Capabilities
The skill directs creation of qx_baseline.m and qx_main.m under code/matlab/Qx/, with run_all.m only when useful. It calls for tables, metrics, useful figures and run_summary.json under results/Qx/experiments/roundN/.
It also requires the checks specified by the plan for degenerate outputs and fallback triggers. It prohibits changing the chosen mathematical method, accessing or overwriting raw data, and generating implementations for unapproved candidates.
Using it
Requirements
The stated prerequisites are a recorded G2.5 human method choice, an existing code/matlab/Qx/qx_code_plan.md, required cleaned data and a data profile, and a plan targeting MATLAB or 北太天元. The skill also expects a decision ledger, method card and probe conditions.
Execution requires an available compatible runtime. Optional toolboxes need approval in the plan. Supported runtime versions, hardware requirements and the meaning of the broader G2.5 process are not specified in this file.
Mechanism
The assistant is instructed to read the planning documents, confirm the approved main method and usable baseline, write conservative .m files, run them when possible and save evidence-bearing outputs. Fallback implementation is permitted only after activation.
Compatibility guidance favors basic matrix and table operations and functions such as readtable, readmatrix, writetable, writematrix, save, load and fullfile. The default seed is rng(2026), unless another seed is recorded. JSON output should use jsonencode when supported or deterministic field writing otherwise.
The run summary refers to the model-code-analyzer contract and must record the approved decision ID, roles, paths, metrics, output-degeneracy evidence, fallback state, timing, seed, environment, warnings and errors. That companion contract is not supplied here.
Setup
The documented skill location is .claude/skills/matlab-model-code-generator/SKILL.md. The file does not provide installation commands, assistant compatibility versions or instructions for enabling skill discovery.
Before invoking it, prepare the approved decision, code plan, cleaned inputs and supporting documents. Make the referenced run-summary contract and review handoff available. Runtime launch commands and environment configuration are unspecified.
Example
Illustrative use, not an execution result: a modeling team has approved a main method and baseline for one question. With qx_code_plan.md and cleaned inputs available, the skill would direct an assistant to create qx_main.m and qx_baseline.m, then save comparable metrics, useful figures and run_summary.json in the experiment directory.
If no compatible runtime were available, the assistant would need to report that the code was unexecuted. The source provides no worked mathematical example, sample results or numerical performance claims.
Assessment & evidence
Limitations
The skill depends on external planning artifacts and a run-summary contract whose complete definitions are absent. The particular metrics, fallback thresholds and degeneracy checks must come from the project plan.
Live Scripts, App Designer, GUI code, Simulink and toolbox-only functions are excluded unless explicitly approved. 北太天元 compatibility risks must be recorded, but no compatibility matrix or execution evidence is supplied.
The file requires separating Type 1 diagnostics from paper figures without defining Type 1 diagnostics here. No code was run, and output correctness, performance and portability were not assessed.
Reasoning
Keeping method selection with a human gives the implementation a fixed target. Requiring a baseline and recorded inputs, metrics and seed could make comparisons easier to inspect. This is an inference from the prescribed structure, not a demonstrated outcome.
A recorded seed and organized files do not by themselves establish reproducibility or mathematical validity. Those depend on the actual data, environment, implementation and execution evidence.
Alternatives
The source provides no comparison with other assistant skills or development tools. As a practical fit judgment, directly authoring a small MATLAB script could be simpler for a one-off task that does not need this document and handoff structure.
Projects centered on Live Scripts, GUI applications or Simulink would need explicitly approved instructions suited to those formats. No comparative quality, speed or cost evidence is available.
Evidence
The skill source describes intended behavior and verification requirements. It contains no generated MATLAB implementation, execution log or measured result. Original source: [https://raw.githubusercontent.com/zhnnky329/MathModeling-skills/7780c20de4bdde73d93ea784b1dadf1c5f552e65/.claude/skills/matlab-model-code-generator/SKILL.md].
The separate repository licence establishes the stated reuse permissions. Original notice: [https://raw.githubusercontent.com/zhnnky329/MathModeling-skills/7780c20de4bdde73d93ea784b1dadf1c5f552e65/LICENSE].
Access & freshness
Costs
Total operating cost is unknown. The skill specifies no assistant usage rates, runtime prices, hardware costs or execution budget.
The MIT licence grants permissions free of charge, but it does not establish the cost of the assistant, MATLAB, 北太天元 or any approved toolbox used with the skill.
Rights
The repository licence is MIT, with copyright attributed to Zhijun Zhang in 2026. It permits use, copying, modification, distribution, sublicensing and sale, provided the copyright and permission notice accompany copies or substantial portions.
The licence disclaims warranties and liability. It does not establish permissions for external runtimes, toolboxes or datasets.
Freshness
The source snapshot is dated 2026-11-16 and identifies repository revision 7780c20de4bdde73d93ea784b1dadf1c5f552e65. The skill does not state its own release number, last-update date or supported MATLAB and 北太天元 versions. Changes after this revision are unknown.
Actions
Before using the skill, confirm that the approved method, baseline, code plan and cleaned inputs are ready. Obtain the referenced model-code-analyzer contract and clarify any undefined diagnostic requirements.
For an initial application, inspect both generated implementations, confirm that their inputs and metrics support a fair comparison, and review compatibility warnings and degeneracy evidence. Require an explicit execution status; generated files alone do not demonstrate a successful run.
