cn-thesis-format-layout
Checks and fixes Chinese thesis formatting against your university's rules for layout and style.
Installation
Paste this into Claude Code, Cursor, or any agent that can run commands.
SKILL.mdShow the author's original SKILL.md
--- name: cn-thesis-format-layout description: Support Chinese graduate thesis formatting, Word/docx layout audits, school template matching, table of contents, headings, captions, pagination, front matter, page headers/footers, and LaTeX template routing. Use when the user needs to check or fix thesis format against a Chinese university template or formatting rule. --- # CN Thesis Format Layout This skill uses a router plus manifest architecture. Do not apply the formatting workflow from memory. ## Routing Protocol 1. Read `manifest.yaml`. 2. Read every path listed in `always_load`. 3. Detect the axis values from the user request: - `degree_level`: master, doctoral, professional, or undergraduate. - `discipline`: life-sciences, computer-science, humanities-social-sciences, engineering, or generic. - `thesis_type`: empirical-experimental, mechanism-hypothesis, method-protocol, engineering-system, review-synthesis, or case-text-analysis. - `language`: zh, en, or bilingual. - `format_mode`: format-audit, docx-contract-audit, docx-repair-plan, word-repair, latex-routing, or template-source. 4. Read only the fragments mapped to the detected values. 5. State the detected values in one short line before the main answer. 6. Run `static/core/workflow.md` end to end. ## Format Record Protocol Use strict format-record JSON as the formatting authority whenever possible. Priority: 1. User-supplied format-record JSON. 2. Existing project-local record under `.cn-thesis-format/records/`. 3. User-supplied template file converted with `scripts/generate_format_record.py`. 4. A single project-local template candidate converted into `.cn-thesis-format/records/`. 5. Built-in distilled school rule under `resources/external-templates/distilled-rules/`. 6. Generic fallback record. Run `scripts/resolve_format_record.py` to inspect the available source when paths are not explicit. If multiple project records or templates are found, ask the user to choose; do not guess. Use `scripts/discover_template_attachments.py` for official source pages, `scripts/extract_template_format.py` for raw extraction, `scripts/generate_format_record.py` for strict records, `scripts/seed_distilled_format_rules.py` for the maintained default/school records, and `scripts/validate_format_records.py` before relying on a generated record. Page setup rules are part of the format record. Treat page size, margins, orientation, header/footer distance, gutter, and section breaks as auditable constraints. Large design drawings, wide tables, wide figures, maps, and engineering diagrams may use landscape sections when the active record allows `landscape_page_setup`; preserve page numbering and restore portrait orientation after the landscape section. For Word/docx work, build and audit the heading style table before TOC, body layout, captions, pagination, or headers/footers. Heading styles are the backbone for TOC generation, chapter headers, cross references, and stable layout repair. Hard rule: if a requested or detected format detail is not covered by the active format record, user template, built-in distilled rule, or generic default, consult the school handbook/template/manual or official source page before giving a concrete rule. If no authoritative source is available, mark the item as needing user/school confirmation and do not infer or silently apply a guessed format. ## Boundaries - User-provided current school template is authoritative. - Word/docx is the default path; LaTeX is supplemental unless the school or user requires it. - Use `cn-thesis-formula` for formula content, notation, derivation logic, equation labels, and editable formula source. This format skill handles final layout checks such as equation alignment, spacing, and school-specific display rules. - Do not alter official forms, signatures, declarations, or section breaks without explicit need. - Do not delete or flatten landscape section breaks used for large figures, wide tables, or design drawings; repair their margins/orientation from the active format record instead. - Do not invent unknown formatting details. Unknown requirements must be checked against the school handbook, template instructions, official page, or user-provided manual; otherwise they remain confirmation items. - Treat rules with `needs_confirmation: true` as audit guidance only. Do not silently apply them during automatic repair. - Treat `confidence: medium` rules with `needs_confirmation: false` as auto-applicable defaults. They remain lower authority than user templates and school-reviewed records.
Ships with 10 supporting files:
- agents/openai.yaml
- manifest.yaml
- README.md
- static/core/workflow.md
- static/fragments/format_mode/docx-contract-audit.md
- static/fragments/format_mode/docx-repair-plan.md
- static/fragments/format_mode/format-audit.md
- static/fragments/format_mode/latex-routing.md
- static/fragments/format_mode/template-source.md
- static/fragments/format_mode/word-repair.md
Mirrored from the author's public source. Install counts from the open skills registry.