- name
SKILL.md
The skill file stays in the publisher's repository.
Paste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add XiaoMaColtAI/math-modeling-skill --skill xlsx -a cursor -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add XiaoMaColtAI/math-modeling-skill --skill xlsx -a claude-code -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add XiaoMaColtAI/math-modeling-skill --skill xlsx -a codex -yPaste the copied command in a terminal. It installs this SKILL.md into that agent.
npx skills add XiaoMaColtAI/math-modeling-skill --skill xlsx -a grok -ySend the copied message in a Grok Bot chat. The Bot fetches this SKILL.md from GitHub and adds it to the skills all your Bots share.
Install this skill: https://github.com/XiaoMaColtAI/math-modeling-skill/tree/HEAD/tools/xlsxFrom the publisher
PROJECT_ROOT。import pandas as pd
# 第一行就是数据时必须显式使用 header=None。
data = pd.read_excel("data/input.xlsx", sheet_name=0, header=None)
assert len(data) == 7470, f"行数异常: {len(data)}"
result = pd.DataFrame({"方案": names, "目标值": values})
result.to_excel("results/结果.xlsx", index=False)
禁止依赖 pandas.read_excel() 默认的 header=0 猜测表头,否则第一行数据会被当成列名。未知表头结构或必须精确保留行时使用无隐式推断的读取工具:
from scripts.read_rows import read_excel_rows
rows = read_excel_rows(
"data/input.xlsx",
header=False,
expected_rows=7470,
)
assert rows[0][0] == 399.6747
读取后必须核对首行、末行、原始工作表有效行数和题目声明的记录数;行数不符时立即报错,不得静默继续建模。
使用模板时用 openpyxl.load_workbook() 打开,写入指定单元格后另存新文件。不要删除未知工作表、命名区域、公式或验证规则。
openpyxl 不计算公式。修改含公式的工作簿后使用 LibreOffice 隔离重算:
python scripts/recalc.py "<PROJECT_ROOT>/results/结果.xlsx" 60
工具会:
DOCX 与 XLSX 共用的 OOXML/LibreOffice 基础代码位于 ../docx/scripts/office/,本工具不再维护重复副本。
#VALUE!、#DIV/0!、#REF!、#NAME?、#NULL!、#NUM!、#N/A。读取、创建、修改和验证 XLSX,支持模板保留、公式重算和错误检查。
---name: Excel工具description: 读取、创建、修改和验证 XLSX,支持模板保留、公式重算和错误检查。---# tools/xlsx/SKILL.mdFAQ
Download tools/xlsx/SKILL.md from the publisher, or copy the path and open the repository. PlugMCP lists the skill and does not host the file.
The publisher keeps it at https://github.com/XiaoMaColtAI/math-modeling-skill.
Claude, Cursor, Codex, and Grok Build can read a SKILL.md you add from the publisher's repository. Grok Bot installs it when you send the skill's GitHub folder link in a chat.