← ClaudeAtlas

guosai-docx-formatlisted

Convert a Pandoc-generated Chinese research-paper .docx into 全国大学生统计建模大赛 (China National Undergraduate Statistical Modeling Contest) submission format. Trigger this whenever the user uploads a .docx that looks like a Chinese academic/thesis-style paper (特别是从 Markdown 用 pandoc 转出的那种) and asks to fix formatting, match 国赛 / 统计建模大赛 requirements, 严格按国赛标准 / 修格式 / 排版, or mentions 封面、摘要、目录、参考文献、附录 排版. Only use when the user explicitly names 统计建模大赛/国赛 or confirms this target format — do NOT default-trigger on any academic-looking docx. SKIP entirely for 华数杯 and other competitions (华数杯 format is different: 首页信息表+参赛编号、无目录、AI工具使用声明; applying 国赛 format there would be wrong). This skill rebuilds: cover page (赛事抬头 + 主标题 + 副标题), abstract block, auto-numbered headings (1 / 1.1 / 1.1.1), figure/table captions (图 N / 表 N), bibliography with [N] numbering and hanging indent, appendix with code blocks, centered page numbers, and strict page-break protection so figures and tables never get split across pages.
ychenfen/claude-agent-skills-collection · ★ 0 · AI & Automation · score 75
Install: claude install-skill ychenfen/claude-agent-skills-collection
# 国赛统计建模 DOCX 格式化 ## 这个 skill 是干什么的 把一份「用 pandoc 从 Markdown 转出来的中文学术论文 docx」改造成「全国大学生统计建模大赛」的提交格式。原始文档通常有这几个毛病,这个 skill 按顺序全部修复: - 一级标题是「一、二、三、」中文编号(国赛要求阿拉伯数字 `1 2 3`) - 没有封面区,或封面排列混乱(赛事信息被当成正文段) - 摘要和关键词段没有独立样式 - 没有目录页 - 图题表题没有「图 N / 表 N」编号 - 表格行默认允许跨页切割 - 参考文献没有 `[N]` 序号也没有悬挂缩进 - 没有页码 - 公式里的 `CO₂` `R²` 这类下标上标被 pandoc 搞成空 `<m:e>` + 孤立 sub,渲染错位 - 「参考文献」「附录」没有另起一页 ## 什么时候用它 Claude 应当主动触发这个 skill,不要等用户解释细节。触发信号: - 用户上传 `.docx` 并提到「国赛」「统计建模大赛」「全国大学生」「建模比赛」 - 用户说「按国赛格式」「严格按要求」「修格式」「排版有问题」 - 用户上传一份明显是中文学术论文结构(有摘要、关键词、多级标题、参考文献、附录)的 docx,即便没说格式要求,也大概率是要改成国赛格式 —— 这是默认假设 - 用户说「这个也修一下」「再来一份」—— 说明是批处理同类文档 ## 什么时候不用它 - 英文论文 / 非中文论文 - 非统计建模类的 docx(比如简历、合同、信件、报告) - 用户已经在 Word 里排好版、只想做局部修改的 - 不是 pandoc 转出来的 docx(比如 Word 原生编辑的、WPS 导出的)—— 这个 skill 假设源文件有 `Heading1/2/3` `BodyText` `ImageCaption` `TableCaption` `Bibliography` 这套 pandoc 默认样式;用在别的模板上会失效 ## 快速开始 **一键改造(推荐)**: ```bash python3 scripts/apply_guosai_format.py 用户文件.docx 输出_国赛格式.docx ``` 主驱动脚本会自动串联全部步骤:解包 → 替换样式 → 注册页脚 → 改标题编号 → 修公式 → 加图表编号 → 表格防切 → 参考文献加序号 → 加分页 → 打包校验。 **校验通过**的标志:最后一行输出 `✅ 校验通过`。 ## 依赖 这个 skill 依赖 Anthropic 的 **docx skill** 提供 `unpack.py` 和 `pack.py`。脚本会按顺序在以下位置查找: 1. `/mnt/skills/public/docx/scripts/office/`(Anthropic 环境默认) 2. `~/docx-skill/scripts/office/`(本地安装) 3. `/opt/skills/docx/scripts/office/` 如果都没有,脚本会报错并列出需要放置的位置。docx skill 是 Anthropic proprietary 的,请确保可用。 除此之外只需要 Python 3.9+,无第三方库。 ## 执行流程详解(Claude 阅读这段来理解该怎么用) 主驱动按 10 步执行。每一步都是独立的,出问题容易定位: 1. **解包** `input.docx` → 临时目录的 `unpacked/` 2