Agent skill

Python Code Reviewer

by zhnnky329 in zhnnky329/MathModeling-skills

Review, run, debug, and verify approved Python modeling code against its code plan, data contract, method decision, risk conditions, and experiment outputs, saving one compact JSON review.

MITAuto-check passedDevelopment

Install Python Code Reviewer

skills CLI
$ npx skills add zhnnky329/MathModeling-skills --skill python-code-reviewer -a claude-code

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

GitHub CLI
$ gh skill install zhnnky329/MathModeling-skills python-code-reviewer --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/python-code-reviewer .claude/skills/python-code-reviewer && 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
python-code-reviewer
GitHub stars
1.1k
Token cost
~688 tokens
SKILL.md length
253 words
Files
1
Skills in repo
29
Repo updated
First seen
Licence
MIT

At a glance

Review, run, debug, and verify approved Python modeling code against its code plan, data contract, method decision, risk conditions, and experiment outputs, saving one compact JSON review.

  • Works in 6 steps: Resolve the approved main and usable… → Inspect and run the code in the intended… → Evaluate required checks → …
  • Tasks that involve Code review
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Data governance

What it does

Python Code Reviewer is an agent skill from zhnnky329/MathModeling-skills. Review, run, debug, and verify approved Python modeling code against its code plan, data contract, method decision, risk conditions, and experiment outputs, saving one compact JSON review.

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.

It sits in Development, covering Code review and Data governance. It works with Python. The repository describes itself as: 面向数学建模竞赛的 Claude Code / Codex Skills ,支持分阶段建模流程与 Python、MATLAB/北太天元代码分支。 The licence is MIT.

When your agent uses it

  • Tasks that involve Code review
  • Tasks that involve Data governance

Example prompts

  • “/python-code-reviewer”

Requirements

  • Python 3

Workflow steps

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

  1. Resolve the approved main and usable baseline. Flag scripts for unapproved candidates unless a fallback activation exists.
  2. Inspect and run the code in the intended order.
  3. Evaluate required checks
  4. Add risk-specific checks only when relevant, such as leakage, constraint feasibility, numerical stability, or scale.
  5. If asked to fix findings, make minimal changes, rerun affected checks, and record the repair. Otherwise report findings without changing…
  6. Save code/Qx/reviews/qx_python_review.json.

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 (its code samples are json).

    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

Python Code Reviewer loads about 688 tokens when it runs. Until then it costs about 52 tokens; SKILL.md has 253 words of instructions outside code blocks.

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

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). 253 words, ~688 tokens.

Download SKILL.mdSave it as .claude/skills/python-code-reviewer/SKILL.md (or your agent's skills folder).
name
python-code-reviewer
description
Review, run, debug, and verify approved Python modeling code against its code plan, data contract, method decision, risk conditions, and experiment outputs, saving one compact JSON review.

Preconditions

  • Python code and code/Qx/qx_code_plan.md exist.
  • Approved method decision, method card, data profile, and relevant run summary are available.
  • Required inputs are accessible.

Workflow

  1. Resolve the approved main and usable baseline. Flag scripts for unapproved candidates unless a fallback activation exists.
  2. Inspect and run the code in the intended order.
  3. Evaluate required checks:
    • syntax: imports, execution, exceptions, and obvious runtime faults.
    • input_contract: paths, fields, units, shapes, missing-data handling, and raw-data protection.
    • method_alignment: formulas, objectives, constraints, assumptions, main/baseline roles, and fallback scope match the approved plan.
    • reproducibility: seed, deterministic setup, dependency/runtime record, and rerun consistency.
    • output_contract: saved tables/metrics/figures, valid run summary, comparable main/baseline metrics, degeneracy evidence, and fallback-trigger state.
  4. Add risk-specific checks only when relevant, such as leakage, constraint feasibility, numerical stability, or scale.
  5. If asked to fix findings, make minimal changes, rerun affected checks, and record the repair. Otherwise report findings without changing code.
  6. Save code/Qx/reviews/qx_python_review.json.

Review Schema

json
{
  "schema_version": 1,
  "question_id": "Q1",
  "language": "python",
  "reviewed_files": [],
  "decision_id": "q1_method_choice",
  "checks": {
    "syntax": {"status": "PASS", "evidence": []},
    "input_contract": {"status": "PASS", "evidence": []},
    "method_alignment": {"status": "PASS", "evidence": []},
    "reproducibility": {"status": "PASS", "evidence": []},
    "output_contract": {"status": "PASS", "evidence": []}
  },
  "findings": [],
  "verdict": "PASSED",
  "reviewed_at": "ISO-8601"
}

Statuses are PASS, FAIL, or NOT_APPLICABLE with a reason. Any required FAIL blocks G3.

Rules

  • Do not pad evidence to reach a count.
  • Do not fabricate execution or outputs.
  • Do not approve a toy diagnostic reference as the official baseline.
  • Do not silently change mathematical meaning.
  • Do not create success logs beyond the review JSON.
  • Treat code newer than its review as requiring the affected checks to rerun, not necessarily the entire pipeline.

Verification

  • Every required named check has concrete evidence.
  • Main and baseline are approved and comparable.
  • Run summary and on-disk outputs agree.
  • Review verdict follows check statuses.

© 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/python-code-reviewer of zhnnky329/MathModeling-skills.

Open the folder on GitHubat commit 0b46e9c

Compare with similar skills

Python Code Reviewer 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.

Python Code Reviewer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Python Code Reviewer this skillzhnnky329/MathModeling-skills1.1k—~688Automated safety check: PassMIT
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
Dignified Python Standardsdocling-project/docling68k—~1.5kAutomated safety check: PassApache-2.0
Code Review Skillawesome-skills/code-review-skill2.1k—~2.8kAutomated safety check: NotesMIT
Docling Pull Request Reviewdocling-project/docling68k—~1kAutomated safety check: PassMIT
Git History Bug Auditben-manes/caffeine18k—~3.3kAutomated safety check: PassApache-2.0

Similar skills

  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Dignified Python Standards

    docling-project/docling

    Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.

    68k GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Code Review Skill

    awesome-skills/code-review-skill

    Provides comprehensive code review guidance for React 19, Vue 3, Angular 17+, Svelte 5, Rust, TypeScript, Java, Java 8, PHP, Ruby, Rails, Python, Django, FastAPI, Go, C/.NET, Kotlin, Swift, Dart…

    2.1k GitHub stars~2.8k tokensUpdated 29 days ago
    DevelopmentAuto-check: notes
  • Docling Pull Request Review

    docling-project/docling

    Reviews or re-reviews a Docling pull request in fixed stages, with findings that can be reproduced and an explicit record of every check that was run.

    68k GitHub stars~1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Git History Bug Audit

    ben-manes/caffeine

    Audits a module by walking its git history commit by commit, tracking unresolved issues forward, and reporting the ones that survive to HEAD as findings.

    18k GitHub stars~3.3k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Code Reviewer

    jewbetcha/opentrace

    Comprehensive code review skill for TypeScript, JavaScript, Python, Swift, Kotlin, Go.

    116 GitHub starsUsed in 2 repos~1.1k tokens
    DevelopmentAuto-check: notes

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
  • Matlab Model Code Generator

    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.

    1.1k GitHub stars~685 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

Works with

Questions about Python Code Reviewer

What does Python Code Reviewer do?

Review, run, debug, and verify approved Python modeling code against its code plan, data contract, method decision, risk conditions, and experiment outputs, saving one compact JSON review. Python Code Reviewer is an agent skill from zhnnky329/MathModeling-skills. Review, run, debug, and verify approved Python modeling code against its code plan, data contract, method decision, risk conditions, and experiment outputs, saving one compact JSON review.

When should I use Python Code Reviewer?

Python Code Reviewer fits situations like: tasks that involve Code review; tasks that involve Data governance.

How do I install Python Code Reviewer in Claude Code?

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

How do I install Python Code Reviewer in Codex?

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

Can I use Python Code Reviewer 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 python-code-reviewer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/python-code-reviewer, .gemini/skills/python-code-reviewer, .github/skills/python-code-reviewer and .opencode/skills/python-code-reviewer in your project.

What does Python Code Reviewer need to run?

SKILL.md names no scripts, command-line tools or credentials: Python Code Reviewer is instructions for the agent only. Our summary lists: Python 3.

Does Python Code Reviewer 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 Python Code Reviewer 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 Python Code Reviewer use?

Python Code Reviewer 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 Python Code Reviewer use?

About 688 tokens (SKILL.md is roughly 2.8k 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 Python Code Reviewer?

Skills that share tags, products or a category with Python Code Reviewer: Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars), Dignified Python Standards (docling-project/docling, 68k stars), Code Review Skill (awesome-skills/code-review-skill, 2.1k stars) and Docling Pull Request Review (docling-project/docling, 68k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Python Code Reviewer?

zhnnky329 (a GitHub user) maintains it in zhnnky329/MathModeling-skills, which has 1,060 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.