Agent skill

Matlab Model Code Generator

by zhnnky329 in zhnnky329/MathModeling-skills

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.

MITAuto-check passed

Install Matlab Model Code Generator

skills CLI
$ npx skills add zhnnky329/MathModeling-skills --skill matlab-model-code-generator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install zhnnky329/MathModeling-skills matlab-model-code-generator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/zhnnky329/MathModeling-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/matlab-model-code-generator .claude/skills/matlab-model-code-generator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
matlab-model-code-generator
GitHub stars
1.1k
Token cost
~685 tokens
SKILL.md length
305 words
Files
1
Skills in repo
29
Repo updated
First seen
Licence
MIT

At a glance

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.

  • Works in 9 steps: Read the code plan, decision ledger,… → Confirm scope: approved main plus usable… → Generate conservative .m files under… → …
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Matlab Model Code Generator is an agent skill from zhnnky329/MathModeling-skills. 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.

Its SKILL.md is about 690 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: 面向数学建模竞赛的 Claude Code / Codex Skills ,支持分阶段建模流程与 Python、MATLAB/北太天元代码分支。 The licence is MIT.

Example prompts

  • “/matlab-model-code-generator”

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. Read the code plan, decision ledger, method card, probe conditions, and data profile.
  2. Confirm scope: approved main plus usable baseline. Implement a fallback only after activation.
  3. Generate conservative .m files under code/matlab/Qx/.
  4. Prefer basic matrix/table operations and avoid optional toolboxes unless the plan approves them.
  5. Save tables, metrics, useful figures, and run_summary.json under results/Qx/experiments/roundN/.
  6. Evaluate output-degeneracy and fallback-trigger metrics required by the plan.
  7. Use diary or another full log only for a failure or reproducibility warning.
  8. Run in the available compatible runtime. If unavailable, report the unexecuted state explicitly.
  9. Hand off to code-reviewer.

What it can do on your machine

Read from SKILL.md and the folder at commit 0b46e9c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Matlab Model Code Generator loads about 685 tokens when it runs. Until then it costs about 56 tokens; SKILL.md has 305 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~56
When it runs · the whole SKILL.md, loaded when a task matches
~685

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from zhnnky329/MathModeling-skills at commit 0b46e9c, republished under its MIT licence (© zhnnky329). 305 words, ~685 tokens.

Download SKILL.mdSave it as .claude/skills/matlab-model-code-generator/SKILL.md (or your agent's skills folder).
name
matlab-model-code-generator
description
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.

Preconditions

  • G2.5 human method choice is recorded.
  • code/matlab/Qx/qx_code_plan.md exists.
  • 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

  1. Read the code plan, decision ledger, method card, probe conditions, and data profile.
  2. Confirm scope: approved main plus usable baseline. Implement a fallback only after activation.
  3. Generate conservative .m files under code/matlab/Qx/.
  4. Prefer basic matrix/table operations and avoid optional toolboxes unless the plan approves them.
  5. Save tables, metrics, useful figures, and run_summary.json under results/Qx/experiments/roundN/.
  6. Evaluate output-degeneracy and fallback-trigger metrics required by the plan.
  7. Use diary or another full log only for a failure or reproducibility warning.
  8. Run in the available compatible runtime. If unavailable, report the unexecuted state explicitly.
  9. Hand off to code-reviewer.

Script Layout

text
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, and fullfile.
  • Use rng(2026) or the recorded seed.
  • Use jsonencode when 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.

© zhnnky329, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .codex/skills/matlab-model-code-generator of zhnnky329/MathModeling-skills.

Open the folder on GitHubat commit 0b46e9c

Compare with similar skills

Matlab Model Code Generator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Matlab Model Code Generator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Matlab Model Code Generator this skillzhnnky329/MathModeling-skills1.1k—~685Automated safety check: PassMIT
Generatealirezarezvani/claude-skills28k1 repos~1.1kAutomated safety check: PassMIT
MatlabK-Dense-AI/scientific-agent-skills48k1 repos~4.1kAutomated safety check: NotesMIT
Matlab Generate Codematlab/matlab-agentic-toolkit1.1k—~4.2kAutomated safety check: PassCustom licence
Matlab Generate Wlan Waveformmatlab/matlab-agentic-toolkit1.1k—~5.3kAutomated safety check: PassCustom licence
Minimalismsickn33/agentic-awesome-skills47k1 repos~2.2kAutomated safety check: PassMIT

Similar skills

  • Generate

    alirezarezvani/claude-skills

    Generate Playwright tests. An agent skill from alirezarezvani/claude-skills.

    28k GitHub starsUsed in 1 repo~1.1k tokens
    Testing & QAAuto-check passed
  • Matlab

    K-Dense-AI/scientific-agent-skills

    Builds, reviews, migrates, and plans MATLAB or GNU Octave numerical workflows.

    48k GitHub starsUsed in 1 repo~4.1k tokens
    Research & ScienceAuto-check: notes
  • Matlab Generate Code

    matlab/matlab-agentic-toolkit

    Generate, verify, refine, and accelerate C/C++ or CUDA code from MATLAB with MATLAB Coder, Embedded Coder, GPU Coder, or MATLAB Test.

    1.1k GitHub stars~4.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Matlab Generate Wlan Waveform

    matlab/matlab-agentic-toolkit

    Generate standard-compliant IEEE 802.11 waveforms using MATLAB WLAN Toolbox.

    1.1k GitHub stars~5.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Minimalism

    sickn33/agentic-awesome-skills

    Web and App implementation guide for the Minimalism design style.

    47k GitHub starsUsed in 1 repo~2.2k tokens
    MobileAuto-check passed
  • Fal Generate

    nexu-io/open-design

    Generate images and videos using fal.ai AI models. An agent skill from nexu-io/open-design.

    100k GitHub stars~306 tokensUpdated today
    Media & CreativeAuto-check passed

More from zhnnky329/MathModeling-skills

All 29 skills in this repo
  • Method Selector

    zhnnky329/MathModeling-skills

    Build and risk-screen a compact role-based method shortlist for a mathematical-modeling subquestion.

    1.1k GitHub stars~1.6k tokensUpdated 13 days ago
    Auto-check passed
  • Problem Classifier

    zhnnky329/MathModeling-skills

    Classify each parsed mathematical-modeling subquestion by required output and structure, surface ambiguous framing trade-offs for human choice, and record primary/secondary task types without…

    1.1k GitHub stars~611 tokensUpdated 13 days ago
    Auto-check passed
  • Data Auditor Cleaner

    zhnnky329/MathModeling-skills

    Map contest attachments to subquestions, audit and clean raw data, and emit one reusable data profile with quality, coverage, imbalance, concentration, and method-readiness evidence for downstream…

    1.1k GitHub stars~1.1k tokensUpdated 13 days ago
    Auto-check passed
  • Decision Prompt Builder

    zhnnky329/MathModeling-skills

    Build one compact choice card at a genuine mathematical-modeling judgment point.

    1.1k GitHub stars~837 tokensUpdated 13 days ago
    Auto-check passed
  • Model Code Analyzer

    zhnnky329/MathModeling-skills

    Translate a human-approved main method and usable baseline into a minimal language-neutral implementation and experiment contract.

    1.1k GitHub stars~881 tokensUpdated 13 days ago
    Auto-check passed
  • Modeler Decision Logger

    zhnnky329/MathModeling-skills

    Faithfully append a human modeler's choice and rationale to one canonical per-subquestion JSONL decision ledger.

    1.1k GitHub stars~783 tokensUpdated 13 days ago
    Auto-check passed

Questions about Matlab Model Code Generator

What does Matlab Model Code Generator 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. Matlab Model Code Generator is an agent skill from zhnnky329/MathModeling-skills. 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 in Claude Code?

Run `npx skills add zhnnky329/MathModeling-skills --skill matlab-model-code-generator -a claude-code`. Or copy the skill folder (.codex/skills/matlab-model-code-generator in zhnnky329/MathModeling-skills) into .claude/skills/matlab-model-code-generator in your project. Claude Code loads it when a task matches its description.

How do I install Matlab Model Code Generator in Codex?

Run `npx skills add zhnnky329/MathModeling-skills --skill matlab-model-code-generator -a codex`. Or copy the skill folder (.codex/skills/matlab-model-code-generator in zhnnky329/MathModeling-skills) into .agents/skills/matlab-model-code-generator in your project. Codex loads it when a task matches its description.

Can I use Matlab Model Code Generator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add zhnnky329/MathModeling-skills --skill matlab-model-code-generator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/matlab-model-code-generator, .gemini/skills/matlab-model-code-generator, .github/skills/matlab-model-code-generator and .opencode/skills/matlab-model-code-generator in your project.

What does Matlab Model Code Generator need to run?

SKILL.md names no scripts, command-line tools or credentials: Matlab Model Code Generator is instructions for the agent only.

Does Matlab Model Code Generator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Matlab Model Code Generator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Matlab Model Code Generator use?

Matlab Model Code Generator is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Matlab Model Code Generator use?

About 685 tokens (SKILL.md is roughly 2.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Matlab Model Code Generator?

Skills that share tags, products or a category with Matlab Model Code Generator: Generate (alirezarezvani/claude-skills, 28k stars), Matlab (K-Dense-AI/scientific-agent-skills, 48k stars), Matlab Generate Code (matlab/matlab-agentic-toolkit, 1.1k stars) and Matlab Generate Wlan Waveform (matlab/matlab-agentic-toolkit, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Matlab Model Code Generator?

zhnnky329 (a GitHub user) maintains it in zhnnky329/MathModeling-skills, which has 1,059 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on September 24, 2026.

Source: zhnnky329/MathModeling-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.