Skip to content
Back to skills

zafu-thesis-formatter

ASecurity

Format a Zhejiang A&F University undergraduate thesis .docx file. Fixes fonts, headings, spacing, indentation, figure/table numbering, and checks cross-references. Outputs an editable .docx file.

  • 2 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 26, 2026
toolspythonbash

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 8 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add wjyxiaojiu-del/zafu-thesis-formatter-skill --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of zafu-thesis-formatter?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for zafu-thesis-formatter
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/wjyxiaojiu-del-zafu-thesis-formatter/badge)](https://www.skillsdirectory.com/skills/wjyxiaojiu-del-zafu-thesis-formatter)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: zafu-thesis-formatter
description: >
  Format a Zhejiang A&F University undergraduate thesis .docx file.
  Fixes fonts, headings, spacing, indentation, figure/table numbering,
  and checks cross-references. Outputs an editable .docx file.
---

# ZAFU Thesis Formatter

Use this skill when a user asks to format, fix, or check a Zhejiang A&F University undergraduate thesis (.docx).

## Quick Start

```bash
# 从参考文档学习格式规则
python scripts/thesis_format.py learn 参考论文.docx rules.json

# 用规则修格式(输出 _formatted.docx)
python scripts/thesis_format.py apply 待修论文.docx rules.json

# 检查格式差异(不修改)
python scripts/thesis_format.py check 待修论文.docx rules.json
```

## Workflow

1. **learn**:从一篇格式正确的参考论文中提取格式规则(字体、字号、行距、缩进、对齐等),保存为 `rules.json`
2. **apply**:将规则应用到其他论文,自动修复:
   - 页面设置(A4、2.7cm 边距)
   - 目录标题和条目字体
   - 论文标题(保持原样)
   - 一/二/三/四级标题字体(楷体/黑体/宋体 + 字号 + 加粗)
   - 正文格式(宋体五号 + TNR + 首行缩进 + 两端对齐)
   - 摘要/关键词(标签黑体加粗,内容楷体)
   - 图/表按章节自动编号(图 X-Y、表 X-Y)
   - p<0.05 等统计标记自动斜体
   - TOC 样式修复(宋体 + TNR 五号)
3. **check**:对比文档与规则的差异,列出所有不符之处

## Format Rules

详见 [FORMAT_SPEC.md](FORMAT_SPEC.md)。

## Key Behaviors

- **跳过封面/声明**:只处理目录之后的内容
- **论文标题保留**:居中大字号段落不会被修改
- **标题识别**:支持 Word Heading 样式 + 编号模式(`1 标题`、`1.1 标题`、`1.1.1 标题`),有无空格都能识别
- **官方规则优先**:标题字体以 FORMAT_SPEC.md 为准,不完全依赖参考文档
- **摘要拆分字体**:"摘要:"用黑体加粗,内容用楷体
- **不强制刷新域**:避免损坏的域代码报错

## Requirements

- Python 3.8+
- `pip install python-docx`

## Limitations

- 封面格式不处理(保持原样)
- 公式内容不修改
- 三线表边框需人工确认
- 交叉引用域(REF 域)不自动创建,只检查引用编号是否匹配

Files in this skill

  • FORMAT_SPEC.md3.6 KB
  • SKILL.md2.3 KB
  • agents/openai.yaml308 B
  • requirements.txt196 B
  • scripts/fix_zafu_thesis.py41.3 KB
  • scripts/split_chapters.py2.3 KB
  • scripts/thesis_format.py33 KB
  • scripts/thesis_formatter.py14.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.