# Model Code Analyzer

Translate a human-approved main method and usable baseline into a minimal...

- Repository: https://github.com/zhnnky329/MathModeling-skills (1073 stars)
- Category: Writing
- License: MIT
- Last updated: 2026-09-24
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add zhnnky329/MathModeling-skills --skill model-code-analyzer -g -a claude-code -y`
Codex: `npx skills add zhnnky329/MathModeling-skills --skill model-code-analyzer -g -a codex -y`
Cursor: `npx skills add zhnnky329/MathModeling-skills --skill model-code-analyzer -g -a cursor -y`
Gemini CLI: `npx skills add zhnnky329/MathModeling-skills --skill model-code-analyzer -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add zhnnky329/MathModeling-skills`

## Description

Translate a human-approved main method and usable baseline into a minimal language-neutral implementation and experiment contract. Use after G2.5 and data readiness, before Python or MATLAB code generation.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Purpose

Define exactly what code must implement and save. Do not expand the approved experiment scope or fully plan a dormant fallback.

# Preconditions

- `methods/Qx/qx_method_card.md` and probe summary exist.
- `methods/Qx/qx_decisions.jsonl` contains a human `DECIDED` method choice.
- A usable baseline is identified.
- Cleaned data and `data_profile.json` are ready when data is required.
- Implementation target and round are known.

Read legacy candidate/decision artifacts only when the new artifacts are absent.

# Workflow

1. Read the approved choice, method card, probe conditions, and experiment budget.
2. Plan only:
   - approved `main`;
   - approved `usable_baseline`;
   - shared helpers and comparison logic.
3. Record the fallback ID and trigger, but do not plan its full implementation unless the trigger is already evidenced and the human chose activation.
4. Map mathematical definitions to inputs, processing steps, intermediate evidence, outputs, and validation checks.
5. Define a directly comparable metric/output contract for main and baseline.
6. Define the round output:

```text
results/Qx/experiments/roundN/
├── figures/
├── tables/
├── metrics/
└── run_summary.json
```

Create `logs/` only for failures, warnings, or reproducibility needs.
7. Write `code/Qx/qx_code_plan.md` for Python or `code/matlab/Qx/qx_code_plan.md` for MATLAB.
8. Hand off to the matching language generator.

# Run Summary Contract

Require:

The rest: https://github.com/zhnnky329/MathModeling-skills/blob/HEAD/.claude/skills/model-code-analyzer/SKILL.md
