Skip to content
Agentmart
Submit a tool

代码检查

检查数学建模Python求解代码的规范性,包括绘图标准、执行顺序、依赖限制、统计输出

Skill by hongdotien10-hash

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/hongdotien10-hash

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

检查数学建模Python求解代码的规范性,包括绘图标准、执行顺序、依赖限制、统计输出

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/mrite-check

What's inside

Skill name
代码检查
Description
检查数学建模Python求解代码的规范性,包括绘图标准、执行顺序、依赖限制、统计输出
License
MIT
Instructions
189 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • name: only lowercase letters, digits and single hyphens allowed
  • name: "代码检查" does not match folder "mrite-check"

Files (1)

  • SKILL.md

SKILL.md (first lines)

# 代码检查

## 目的

检查数学建模求解脚本是否符合项目规范,自动发现并修复问题。

## 检查清单

### 1. 导入检查

**禁止的导入:**
```python
# ❌ 禁止
import seaborn as sns
import plotly
import plotnine
import altair
import bokeh
import holoviews

# ✅ 允许
import pandas as pd
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from scipy import stats, optimize
from sklearn import *
import warnings
warnings.filterwarnings('ignore')
```

**检查命令:**
```bash
grep -rn 'seaborn\|plotly\|plotnine\|altair\|bokeh\|holoviews' 求解/
```

### 2. 执行模式检查

**必须使用 Agg 后端:**
```python
matplotlib.use('Agg')  # ✅ 必须
```

**检查命令:**
```bash
grep -rn "matplotlib.use" 求解/
# 每个py文件必须包含 matplotlib.use('Agg')
```

### 3. 字体配置检查

每个脚本必须包含中文字体配置:
```python
plt.rcParams['font.sans-serif'] = ['STHeiti', 'SimHei', ...]
plt.rcParams['axes.unicode_minus'] = False
plt.rcParams['figure.dpi'] = 150
plt.rcParams['savefig.dpi'] = 150
plt.rcParams['savefig.bbox'] = 'tight'
```

### 4. 两阶段执行检查

脚本必须遵循"先算后画"顺序:
```python
# ✅ 第一阶段:纯计算
# 数据加载 → 预处理 → 建模 → 求解 → 数值结果

# ✅ 打印统计量
print_stats(data, '数据集名')  # min/max/mean/std/CV/amplitude

# ✅ 第二阶段:画图
# 所有计算完成后才开始画图
```

**检查要点:**
- 没有在计算之前画图
- 画图前打印了所有必需的统计量
- `plt.savefig` 在 `plt.close()` 之前

### 5. set_title() 检查

图上不能有 `set_title()`,标题由论文 `\caption{}` 承担。

**检查命令:**
```bash
grep -rn '\.set_title(' 求解/
# 应该返回空或仅在注释中
```

### 6. 图表数量检查

每题至少 4-6 张图:

```bash
# 检查每个问题目录下的图片数量
for dir in 求解/问题*/图片/; do
  count=$(ls "$dir"*.png 2>/dev/null | wc -l)
  echo "$dir: $count 张图"
  if [ "$count" -lt 4 ]; then
    echo "  ⚠ 不足4张,需补充"
  fi
done
```

### 7. 输出文件检查

```bash
# 检查CSV输出
for dir in 求解/问题*/结果/; do
  echo "=== $dir ==="
  ls "$dir"*.csv 2>/dev/null || echo "  无CSV输出"
done

# 检查预处理数据
ls 求解/预处理数据.csv 2>/dev/null || echo "  预处理数据.csv 不存在(仅问题1需要)"
```

### 8. 代码结构检查

From hongdotien10-hash/mathmodel-toolkit, MIT.

More from hongdotien10-hash/mathmodel-toolkit

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Jul 22, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from hongdotien10-hash

Cite this page

代码检查 skill. Agent Mart. https://agentmart.dev/skills/hongdotien10-hash (last updated 2026-10-24)