面向 Word→LaTeX 迁移、引用完整性、中文语言规范、格式验证与高校规则包的确定性论文工作流仓库。
SaferSkills independently audited thesis-skills (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
<div align="center">
Deterministic thesis workflow tools for citation sync, format checks, review handoff, and pre-submission readiness.
Spend your time thinking, not fixing formatting.
What's New · Quickstart · Outputs · Scenarios · Updating · Rule Packs · Creating Your Own · Boundaries
</div>
Thesis Skills is not an AI writing assistant, not a thesis template, and not a tool that writes thesis content for you.
It is a CLI workflow system that connects the tools many graduate students and researchers already use: Word, Zotero, EndNote, LaTeX, structured check reports, safe fix patches, review handoff artifacts, and pre-submission readiness checks.
┌───────────────────────────────────────────┐
Zotero / EndNote ─┤ ├─→ LaTeX thesis
Word .docx ───────┤ Thesis Skills ├─→ Review Word export
LaTeX project ────┤ ├─→ Defense pack
└───────────────────────────────────────────┘
│
▼
check reports → dry-run fixes → readiness gateThe goal is simple: turn scattered, manual, error-prone thesis finishing work into a workflow that is checkable, repeatable, and auditable.
For repetitive finishing work, the expected time savings are concrete:
| Workflow | Manual baseline | With Thesis Skills | Speedup |
|---|---|---|---|
| Bibliography intake | 30-60 min | 2-5 min | ~10× faster |
| Word ↔ LaTeX review handoff | 1-3 hrs | 5-10 min | ~15× faster |
| Deterministic format checks | 1-3 hrs | 2-5 min | ~20× faster |
| Safe report-driven fixes | 1-2 hrs | 5-10 min | ~10× faster |
| Pre-submission readiness review | 30-60 min | 1-2 min | ~30× faster |
| Defense prep inventory | 2-4 hrs | 10-15 min | ~15× faster |
Time savings are conservative estimates for repetitive formatting and handoff work. Thesis Skills does not replace writing, thinking, advisor judgment, or institutional confirmation.
33-final-delivery/run_final_delivery.py orchestrates evidence generation, final-audit checks, optional bounded fixes, and bundle rebuild in one command.run_fix_cycle.py now supports final-audit and all modes for running the new fixers.index, final-audit, reference-ledger, claim-citation, readiness, and raw JSON / CSV artifacts more consistently.possible_overclaim no longer duplicates possible_topic_mismatch when a PASS reference is already flagged by the more specific topic-mismatch signal.reports/index.html, reports/final-audit-report.html, reports/reference-audit-ledger.html, and reports/claim-citation-triage.html make JSON / CSV artifacts easier to review without replacing them as source of truth.run_evidence_pipeline.py.Run the built-in sample project through the check pipeline:
git clone https://github.com/quzhiii/thesis-skills.git
cd thesis-skills
test -d examples/minimal-latex-project
python run_check_once.py \
--project-root examples/minimal-latex-project \
--ruleset university-generic \
--skip-compileExpected result: JSON reports are written to examples/minimal-latex-project/reports/, including run-summary.json and readiness-report.json, without requiring a local LaTeX installation.
If you already have a LaTeX thesis project:
python run_check_once.py \
--project-root thesis \
--ruleset university-generic \
--skip-compileMore details: docs/quickstart.md.
1. Intake 2. Check 3. Fix safely 4. Gate 5. Handoff
────────── ─────────── ───────────── ───────── ─────────────
Zotero references dry-run patches PASS advisor Word
EndNote → language → preview first → WARN → review TODOs
Word/LaTeX format apply explicitly BLOCK defense pack┌──────────────────────────────────────────────────────────────┐
│ Readiness verdict: WARN │
├───────────────────────┬────────┬─────────────────────────────┤
│ Dimension │ Status │ Why it matters │
├───────────────────────┼────────┼─────────────────────────────┤
│ References │ PASS │ all cite keys resolve │
│ Language │ WARN │ 2 style warnings remain │
│ Format │ PASS │ labels and refs are stable │
│ Compile evidence │ WARN │ skipped in demo mode │
│ Export evidence │ WARN │ not produced by smoke test │
│ Review-loop evidence │ WARN │ not produced by smoke test │
└───────────────────────┴────────┴─────────────────────────────┘
Next actions:
1. Review reports/check_language-report.json
2. Generate Word export / review-loop artifacts when those handoffs are needed
3. Re-run without --skip-compile before final submissionThe baseline run_check_once.py command writes machine-readable artifacts such as:
reports/check_bib_quality-report.jsonreports/check_references-report.jsonreports/citation-integrity-report.jsonreports/citation-integrity-report.mdreports/citation-issues.csvreports/check_language-report.jsonreports/check_language_deep-report.jsonreports/check_format-report.jsonreports/check_content-report.jsonreports/readiness-report.jsonreports/run-summary.jsonOptional final-audit foundation artifact:
reports/final-cleanup-report.json from 23-check-final-cleanup/check_final_cleanup.pyreports/statistical-consistency-report.json from 25-check-statistical-consistency/check_statistical_consistency.pyreports/manual-anchor-report.json from 26-check-manual-anchor/check_manual_anchor.pyreports/final-audit-report.json from 27-final-audit-report/build_final_audit_report.pyreports/reference-audit-ledger.csv from 28-reference-audit-ledger/build_reference_audit_ledger.pyreports/index.html from 29-report-index/build_report_index.pyreports/final-audit-report.html from 30-final-audit-html/build_final_audit_html.pyreports/reference-audit-ledger.html from 31-reference-ledger-html/build_reference_audit_ledger_html.pyreports/claim-citation-triage.html from 32-claim-citation-html/build_claim_citation_html.pyBounded auto-fix modules (preview-first, low-risk only):
23-fix-final-cleanup/fix_final_cleanup.py — remove exact process markers (TODO, FIXME, ???, draft, debug, \textcolor{blue})25-fix-statistical-consistency/fix_statistical_consistency.py — normalize non-dominant statistical notation when dominant style is unambiguous26-fix-manual-anchor/fix_manual_anchor.py — insert \phantomsection before flagged \addcontentsline entries28-fix-reference-audit-ledger/fix_reference_audit_ledger.py — remove truly unused bibliography entries (is_unused_bib_entry=true, is_cited_in_tex=false, is_final_reference=false)Final delivery workflow:
33-final-delivery/run_final_delivery.py — orchestrate evidence generation, final-audit checks, optional bounded fixes, and bundle rebuildThe optional v3.3 evidence pipeline writes the citation evidence artifacts:
reports/final-reference-set-report.jsonreports/final-reference-set-report.csvreports/external-verification-report.json when external verification is not skippedreports/missing-doi-candidates.json when external verification is not skippedreports/missing-doi-candidates.csv when external verification is not skippedreports/url-verification-report.json when external verification is not skippedreports/url-verification-flagged.csv when external verification is not skippedreports/hallucination-risk-report.jsonreports/high-risk-references.csvreports/claim-citation-triage-report.jsonreports/claim-citation-triage.mdreports/claim-citation-triage.csvExample JSON snippets and demo walkthroughs: docs/examples.md.
The current v3.5.0 release line keeps local Citation Integrity as the first layer of pre-submission reference checking:
References: BLOCK
- cited keys missing from bibliography files
- duplicate citation keys with conflicting metadata
- DOI/year field warnings
- LaTeX undefined-citation warnings from local compile logsBoundary: the current Citation Integrity workflow only checks local citation integrity. It does not query external databases and never auto-inserts or rewrites citations. Use the external verification and hallucination risk layers for evidence-based screening.
An optional external metadata verification layer queries CrossRef, OpenAlex, and Semantic Scholar for each bibliography entry and writes reports/external-verification-report.json.
Use this when you want a fast authenticity screen for AI-drafted or suspicious-looking references before a manual final check.
python 18-verify-references/verify_external_references.py \
--project-root thesis \
--ruleset university-genericOr via the existing reference checker with an explicit flag:
python 10-check-references/check_references.py \
--project-root thesis \
--ruleset university-generic \
--with-external-verificationV2.0 boundaries:
external_verification is advisory only.UNAVAILABLE, never crash.V3.3 hardens citation evidence by separating three scopes:
final: references that actually entered the compiled bibliography via .aux / .bblcited: citation keys extracted from TeX source \cite{} commandsall: every entry in active .bib filesThe final reference set builder writes:
reports/final-reference-set-report.jsonreports/final-reference-set-report.csvThe external verification layer can now resume long runs and write partial results safely:
python 18-verify-references/verify_external_references.py \
--project-root thesis \
--ruleset university-generic \
--scope final \
--resumeV3.3 also adds advisory follow-up reports:
reports/missing-doi-candidates.json and .csv for likely DOI additionsreports/url-verification-report.json and reports/url-verification-flagged.csv for URL resolution checksBoundaries:
.bib files.Score each bibliography entry for hallucination risk using local metadata and optional external verification evidence. The hallucination risk scorer reads reports/external-verification-report.json if present and writes reports/hallucination-risk-report.json plus reports/high-risk-references.csv.
python 19-check-hallucination-risk/check_hallucination_risk.py \
--project-root thesis \
--ruleset university-genericRisk labels:
| Label | Meaning |
|---|---|
PASS | Multi-source match with consistent metadata |
WARN | Entry exists but fields differ noticeably |
REVIEW | Possible match but evidence is weak |
HIGH_RISK | No credible match found in enabled databases |
UNSUPPORTED | Chinese-language or non-standard entry that cannot be auto-verified |
V3.0 boundaries:
external-verification-report.json if present.UNSUPPORTED means "cannot be automatically judged by enabled evidence," not "safe."HIGH_RISK means "manual verification strongly recommended," not "fake."Extract the sentence surrounding each \cite{} command from .tex files and pair it with cited bibliography metadata and V3.0 hallucination risk data. Produce deterministic triage labels that help identify claim-citation pairs that may lack credible structural support — without LLM.
python 20-check-claim-citation/check_claim_citation.py \
--project-root thesis \
--ruleset university-genericTriage labels:
| Label | Meaning |
|---|---|
WELL_SUPPORTED | Cited reference PASS in V3.0, complete metadata, substantive context |
SUPPORTED | Reference PASS/WARN in V3.0, minor risk signals |
WEAK | Reference REVIEW in V3.0, or vague context, or incomplete metadata |
ORPHANED | Citation key not found in bibliography files |
UNVERIFIABLE | Cited reference UNSUPPORTED in V3.0 (CJK, thesis type) |
The report also includes a backward-compatible support-review layer: claim_type, support_review_label, support_review_reason, support_signals, risk_signals, cluster_keys, cluster_risk_summary, and next_actions. These fields explain why a pair or grouped citation cluster deserves manual review; they do not replace the original triage_label or make final truth claims. Local lexical evidence can use title, abstract, and keyword token overlap when those .bib fields are present. Conservative risk signals such as possible_topic_mismatch, possible_outdated_support, and possible_overclaim are advisory prompts for human review, not automatic judgments. The JSON/Markdown reports may also include advisory citation_needed_candidates for uncited high-assertion sentences; these are manual review prompts, not blocking findings.
V3.1 boundaries:
reports/hallucination-risk-report.json if present; treats missing it conservatively.ORPHANED.Before final PDF or submission handoff, scan LaTeX sources for process residue such as TODO, FIXME, ???, \textcolor{blue}, \color{blue}, draft, debug, and Chinese review notes like 待修改 or 待核查.
python 23-check-final-cleanup/check_final_cleanup.py \
--project-root thesis \
--ruleset university-genericOutput: reports/final-cleanup-report.json. This checker is report-only: it does not delete markers, rewrite prose, or change source files. The final-audit workflow can aggregate this JSON into reports/final-audit-report.json and render it through reports/final-audit-report.html and the local report index.
Before final submission, scan for mixed statistical notation such as p值/P值, p=/P=, 95%CI/95\%CI/95%置信区间, Bootstrap/自助法, and SMD/标准化均数差.
python 25-check-statistical-consistency/check_statistical_consistency.py \
--project-root thesis \
--ruleset university-genericOutput: reports/statistical-consistency-report.json. The checker reports the dominant style in the current project and flags deviations; it does not force a universal notation preference or rewrite source files.
If the project uses manual contents entries, scan for \addcontentsline commands that may be missing a nearby preceding \phantomsection anchor.
python 26-check-manual-anchor/check_manual_anchor.py \
--project-root thesis \
--ruleset university-genericOutput: reports/manual-anchor-report.json. The checker reports likely TOC / LOF / LOT hyperlink-jump risks, but it does not repair labels, captions, numbering, figures, tables, or references.
After generating the source-of-truth JSON reports, aggregate them into a single final-audit handoff artifact:
python 27-final-audit-report/build_final_audit_report.py \
--project-root thesis \
--ruleset university-genericOutput: reports/final-audit-report.json. This report imports existing JSON evidence and groups dimensions, blockers, warnings, next actions, and source links. It does not rerun checks, call external services, modify thesis sources, or replace the raw JSON reports.
For spreadsheet review and advisor/service handoff, aggregate existing reference evidence into one CSV ledger:
python 28-reference-audit-ledger/build_reference_audit_ledger.py \
--project-root thesis \
--ruleset university-genericOutput: reports/reference-audit-ledger.csv. The ledger preserves source-specific statuses from local citation integrity, final reference set, external verification, DOI candidates, URL verification, and hallucination-risk reports. It does not edit .bib, insert DOI values, replace URLs, call external services, or treat NO_CANDIDATE as fake.
Generate a local HTML landing page for the reports directory:
python 29-report-index/build_report_index.py \
--project-root thesisOutput: reports/index.html. This page links available JSON / CSV artifacts and shows present / missing / unreadable counts. It is a local reading surface only; JSON and CSV remain the source of truth.
Generate a readable local detail page for the aggregated final-audit JSON:
python 30-final-audit-html/build_final_audit_html.py \
--project-root thesisOutput: reports/final-audit-report.html. This static page is generated from final-audit-report.json and shows the overall verdict, KPI row, dimension matrix, issues, next actions, and source links. JSON remains authoritative.
Generate a readable local detail page for the reference-audit CSV ledger:
python 31-reference-ledger-html/build_reference_audit_ledger_html.py \
--project-root thesisOutput: reports/reference-audit-ledger.html. This static page is generated from reference-audit-ledger.csv and shows summary stats, scope slices, citation-key groupings, and the full ledger table. CSV remains authoritative.
Generate a readable local detail page for claim-citation support review:
python 32-claim-citation-html/build_claim_citation_html.py \
--project-root thesisOutput: reports/claim-citation-triage.html. This static page is generated from claim-citation-triage-report.json and shows P0 / P1 / P2 / P3 review groups, issue-card style summaries, citation-needed candidates, uncited references, cluster review details, support/risk signals, and next actions. It also deep-links the local readiness / references / claim-citation / final-audit report surfaces so reviewers can move between summary, reference ledger, and detail pages. The HTML is a mobile-readable local HTML bundle for manual review. JSON / CSV remain the source of truth; CSV / Markdown outputs remain unchanged.
python 00-bib-zotero/sync_from_word.py \
--project-root thesis \
--word-file thesis.docx \
--apply
python run_check_once.py \
--project-root thesis \
--ruleset university-generic \
--skip-compilepython run_check_once.py \
--project-root thesis \
--ruleset university-generic
python 16-check-readiness/check_readiness.py \
--project-root thesis \
--ruleset university-generic \
--mode advisor-handoffpython 02-latex-to-word/migrate_project.py \
--project-root thesis \
--output-file thesis-review.docx \
--profile review-friendly \
--apply truepython 04-word-review-ingest/feedback_ingest.py \
--project-root thesis \
--input review-feedback.json
python 03-latex-review-diff/review_diff.py \
--project-root thesispython 17-defense-pack/generate_outline.py \
--project-root thesis \
--ruleset university-generic
python 17-defense-pack/generate_figure_inventory.py \
--project-root thesis \
--ruleset university-genericpython 18-verify-references/verify_external_references.py \
--project-root thesis \
--ruleset university-generic
python 19-check-hallucination-risk/check_hallucination_risk.py \
--project-root thesis \
--ruleset university-genericUse this when you want a fast authenticity screen for references drafted by AI or copied from sources you do not fully trust. It produces a hallucination_risk_score per entry and a high-risk-references.csv for manual review, without rewriting the bibliography. Chinese-language references are marked UNSUPPORTED since external databases do not cover them.
More scenarios: docs/examples.md.
Rule packs are the most important concept in Thesis Skills: they encode your institution's formatting requirements as structured YAML so the checkers know what counts as "correct" and what counts as an issue.
90-rules/packs/
├── university-generic/ # Generic university thesis starter (default, permissive)
├── journal-generic/ # Generic journal article starter (English, minimal)
├── tsinghua-thesis/ # Tsinghua University Master's/PhD thesis pack
│ # First-pass calibrated against 《研究生学位论文写作指南(202503)》
│ # CJK/English rules, figure numbering, and reference defaults tuned to the guide
└── demo-university-thesis/ # Concrete non-Tsinghua example packuniversity-generic is suitable for most Chinese universities — broad coverage, moderate thresholds.tsinghua-thesis is specifically calibrated for Tsinghua students: GB/T 7714 reference style, mixed CJK/English rules per the university writing guide, and Chinese chapter naming conventions. For many Tsinghua thesis projects this works as a direct starting point, but you should still verify against your department template and local requirements.journal-generic targets English journal submissions, with CJK-specific rules disabled.Each pack is a folder with three files:
90-rules/packs/your-school/
├── pack.yaml # Metadata: name, kind, version
├── rules.yaml # Rules: what to check, severity, thresholds
└── mappings.yaml # File/path mappings (main tex candidates, bib paths)rules.yaml is organized by dimension:
| Section | Controls | Examples |
|---|---|---|
project | Project structure: main tex file names, chapter globs, bib paths | main_tex_candidates, chapter_globs |
reference | Citation integrity: missing keys, orphans, duplicates, bib quality | missing_key: error |
language | Surface language: CJK/Latin spacing, brackets, punctuation, weak phrases | cjk_latin_spacing, bracket_mismatch |
language_deep | Deep language: connectors, collocations, inference strength, boundary signposts | inference_overclaim, boundary_signpost |
consistency | Terminology: variant detection for the same concept | terminology_consistency |
format | Format structure: figure/table lists, numbering, cross-references | require_list_of_figures |
content | Content completeness: required sections, keyword count | required_sections |
compile | Compile diagnostics: engine, error categories, severity mapping | engine_hint: xelatex |
If you are not a Tsinghua student, or your department/journal has specific requirements, create a custom pack from one of the built-in starters.
Step 1: Scaffold the pack
python 90-rules/create_pack.py \
--pack-id my-university \
--display-name "My University Master's Thesis" \
--starter university-generic \
--kind university-thesisThis generates three files under 90-rules/packs/my-university/, copied from university-generic as a starting point.
Step 2: Adjust project structure
Edit rules.yaml → project to match your thesis directory layout:
project:
main_tex_candidates: # Possible names for your main tex file, in priority order
- thesis.tex
- main.tex
chapter_globs: # Where chapter files live and their naming pattern
- chapters/*.tex
bibliography_files: # Paths to .bib files
- ref/refs.bibStep 3: Tune rules to your school's guide
Check your institutional thesis writing guide and decide rule by rule:
severity from warning to info (e.g., CJK/Latin spacing if not required)enabled: false (e.g., CJK rules for English-only theses)Example — demoting CJK spacing when your guide doesn't require it:
# Before
cjk_latin_spacing:
enabled: true
severity: warning
# After (school guide does not mandate CJK-Latin spacing)
cjk_latin_spacing:
enabled: true
severity: infoStep 4: Update required section names
If your thesis uses Chinese section naming (not English IMRaD), sync the content rules:
content:
required_sections:
- Introduction (or 绪论)
- Literature Review (or 文献综述)
- Methods (or 研究方法)
- Conclusion (or 结论)Step 5: Run checks with your custom pack
python run_check_once.py \
--project-root thesis \
--ruleset my-university \
--skip-compileStep 6: Validate and iterate
After running, inspect the JSON reports under reports/. If you notice:
main_tex_candidates or chapter_globsTweak → re-run → review reports. Most packs converge in 1–2 calibration rounds.
Step 7: Export a handoff bundle
After the pack passes lint, export a minimal versioned export bundle for handoff:
python 90-rules/export_pack.py \
--pack-path 90-rules/packs/my-university \
--output dist/my-university.zipThis creates a linted ZIP bundle for sharing the pack outside a local checkout. The ZIP includes manifest.json with pack metadata and the lint scorecard summary. There is still no formal registry or publish command.
For non-Tsinghua users: If your calibrated rule pack is stable and you'd like it featured, PRs adding new packs to 90-rules/packs/ are welcome. Future students from your school won't have to start from scratch.--skip-compile demo; run without --skip-compile when you want compile-log diagnostics| Thesis Skills is | Thesis Skills is not |
|---|---|
| A bridge between Word, Zotero, EndNote, and LaTeX | A thesis template or document class |
| A deterministic checker for formatting and structural rules | An AI writing assistant that generates thesis content |
| A report-driven workflow with dry-run previews | A replacement for Grammarly or other prose editors |
| A pre-submission readiness gate | An automatic final defense PPT generator |
| Extensible through institution-specific rule packs | A guarantee that every school or journal rule is already supported |
| CLI-based with auditable artifacts | A GUI or web-based editor |
| Document | Purpose |
|---|---|
docs/quickstart.md | Minimal install and first check run |
docs/examples.md | Output previews and scenario examples |
docs/modules.md | Full module reference moved out of the README |
docs/architecture.md | Workflow and module architecture |
docs/getting-started-zh.md | Step-by-step beginner guide in Chinese |
CHANGELOG.md | Release history |
v3.4.1: polished cross-report HTML navigation and calibrated duplicate support-risk signals.v3.4.0: added final-audit report surfaces, reference-audit ledger HTML, and conservative claim-citation support-risk signals.v3.3.0: hardened reference verification with final reference set parsing, resumeable external verification, DOI candidate suggestions, and URL verification.v3.2.0: integrated hallucination risk and claim-citation triage into readiness gate, added unified evidence pipeline runner, run_evidence_pipeline.py.v3.1.0: added claim-citation support triage, claim-citation-triage-report.json, deterministic triage scoring, and three demo projects.v3.0.0: added hallucination risk scoring, hallucination-risk-report.json, high-risk-references.csv, Chinese-language UNSUPPORTED handling, and three demo projects.v2.0.0: added CrossRef / OpenAlex / Semantic Scholar external verification, consensus candidates, and an external_verification readiness advisory.v1.0.0: stabilized the public workflow story across README, roadmap, site, examples, and code paths.v1.1.0: added the local-first Citation Integrity engine and readiness integration.v1.2.0: added Markdown/CSV Citation Integrity outputs, clean/broken demos, and public version-line alignment.CHANGELOG.md for the full changelog.Downloading or cloning the repository once does not make future updates appear automatically on your machine.
Choose the update path that matches how you got Thesis Skills:
Run:
git pull origin mainThis fetches the newest committed changes from GitHub into your local checkout.
If you want to see what changed before pulling:
git fetch origin
git log --oneline HEAD..origin/mainA ZIP download is just a snapshot. It will not sync by itself.
To get updates, either:
git pullPulling new changes is easiest when your local copy has no uncommitted edits.
Before updating, check:
git statusIf you have local modifications, commit or back them up first so git pull does not create conflicts unexpectedly.
The long module table lives in docs/modules.md so this README stays focused on the product workflow.
Thesis Skills is designed to work alongside mature templates and institution-specific document classes.
| Institution | Template repository |
|---|---|
| Tsinghua University | tuna/thuthesis |
| Shanghai Jiao Tong University | sjtug/SJTUThesis |
| University of Science and Technology of China | ustctug/ustcthesis |
| Peking University | CasperVector/pkuthss |
| Stanford University | dcroote/stanford-thesis-example |
| University of Cambridge | cambridge/thesis |
Special thanks to tuna/thuthesis and other open-source thesis template projects. These projects make high-quality LaTeX thesis writing more accessible and inspired the workflow design of Thesis Skills.
MIT License
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.