Thesis DOCX Formatting Skill
A skill for creating, revising, and formatting thesis Word documents with audit-first discipline, strict school-template compliance, and page-by-page PDF verification.
SKILL.md prescribes audit-first editing, scope restriction to explicit school rules, anti-overreach guardrails, refusal to claim completion without PDF review, and grounding of all figures/code in real user material — good data-flow transparency; no covert or malicious behavior found. Deductions: referenced scripts are not provided, so least-privilege and rollback cannot be confirmed; -ExecutionPolicy Bypass lowers the user-confirmation bar; batch style normalization is a large external effect with no stated rollback.
Workflow is self-consistent: environment check first, dry-run before mutation, explicit failure messaging instead of silent degradation. Deductions: none of the referenced scripts/ or references/ files are included in the evidence, so runnability and error handling are unverified; no test evidence; behavior on abnormal input unknown.
Target scenario (Chinese thesis Word formatting) is clear, trigger description is specific, and non-fit boundaries are declared (no invented school standards, refuse figures without source material); Chinese docs are complete and dependencies are local (desktop Word, local Node) with no overseas-service dependency. Deductions: hard dependency on Windows desktop Word; cross-platform fit and trigger precision lack evidence.
Docs are well layered (SKILL.md workflow, references deep-dives, scripts tooling), MIT license present, bilingual README with install/quick-start. Deductions: no versioning or changelog, unclear maintainer identity and update path, examples/ contents unverified, and agents/openai.yaml only mentioned not shown.
Core claims (audit-first, style-driven editing, page-by-page PDF review, preventing AI meta-language leakage into thesis prose) target real pain points with plausible marginal value over manual work. Deductions: static review cannot confirm directly usable output; script quality unknown; benefit claims are author assertions without representative output verification.
Auditable primary material exists: full SKILL.md, bilingual README, license, explicit script inventory and repo layout. Deductions: script and reference source files absent, no CI or test evidence, claims not independently reproducible, and no explicit fact/inference separation.
- None of the scripts/ or references/ files were provided in the evidence; script behavior, error handling and rollback are unaudited — review source manually before use.
- PowerShell commands use -ExecutionPolicy Bypass; back up the original docx before batch style normalization, as the operation carries irreversible risk.
- The skill hard-depends on desktop Microsoft Word on Windows; core functions are unavailable without it.
- No versioning or changelog; publisher identity unverified and long-term maintenance unclear.
- Mermaid rendering depends on local Node.js/mmdc; confirm local installation.
What does this skill do, and when should you use it?
thesis-docx is a skill for working on graduation thesis and dissertation .docx files. It uses Word COM/DOM automation on Windows to batch-normalize styles and fix TOCs and page numbers, but only after auditing hidden OOXML issues with Python scripts. Its core principle is to avoid premature broad formatting changes: enforce only what the school guide explicitly requires, preserve anything unspecified, and export to PDF for a page-by-page review before declaring completion. It also generates Mermaid figures and LaTeX-convention code listings grounded strictly in the user's real materials, and keeps thesis prose free of AI-workflow meta-language.
Checks whether Word COM/DOM automation is available; reads the user's school template and formatting guide and classifies requirements into "must enforce" versus "preserve current state"; audits styleId, firstLineChars, titlePg, and REF field issues via audit_docx_ooxml.py; batch-normalizes body, heading, and caption styles via normalize_word_styles.ps1; fixes TOCs, page numbers, sections, and cross-references; generates Mermaid architecture, E-R, and flow diagrams from real source material; typesets code excerpts with LaTeX conventions; exports to PDF via export_word_pdf.ps1 for page-level review.
- A graduate student who must align body text, headings, figure/table captions, and references to a school template before submission
- A thesis whose TOC, page numbers, or cross-references show stale field text and need fixing without introducing new layout problems
- Generating system architecture, E-R, or flow diagrams based on actual code, SQL schemas, or API documentation
- Rewriting thesis prose that contains AI-workflow leakage such as "based on the provided code" into normal academic narration
- Verifying final layout compliance by exporting to PDF and reviewing every page after formatting changes
What are this skill's strengths and limitations?
- Audit-first workflow reduces the risk of broad formatting changes creating new problems
- Strictly separates mandatory school rules from preservable current state, avoiding unnecessary global beautification
- Audits hidden OOXML state (styleId, firstLineChars, REF fields) that pure style fixes cannot reach
- Explicitly forbids fabricated data and figures; all diagrams and code must be grounded in real material
- Requires page-by-page PDF review before completion, covering layout fidelity
- Core scripts depend on Windows desktop Microsoft Word COM/DOM automation; macOS and Linux cannot run them
- Explicitly recommends against WPS, making it unfriendly to WPS users
- No test suite or third-party validation is provided; reliability rests on the bundled scripts
- No documented trigger prompts or integration instructions for specific agent platforms
How do you install this skill?
Clone the repository and keep the folder structure intact: git clone https://github.com/the-shy123456/thesis-docx.git. Prerequisites: desktop Microsoft Word on Windows; Python with python-docx and lxml; Node.js with mmdc or npx for Mermaid rendering. The source does not document a specific install directory for Agent Skills-compatible clients such as Claude Code.
How do you use this skill?
First run scripts/check_word_com.ps1 to confirm Word automation is available; then run python scripts/audit_docx_ooxml.py to audit the thesis's OOXML; use scripts/normalize_word_styles.ps1 -AuditOnly for a dry-run of style normalization; after real fixes, run scripts/export_word_pdf.ps1 to export a PDF for page-by-page review. Read SKILL.md and the files under references/ for the complete workflow and rules.
How does this skill compare with similar options?
The README explicitly recommends Microsoft Word desktop automation over WPS-like alternatives, because WPS differs from Word in table row height, vertical alignment, and code-box title clipping, which can degrade thesis layout fidelity.