paper-length-gate

Validates LaTeX manuscript structure, citations, and body scale before PDF compilation.

6.8k|540|Updated May 6, 2026
One-click install
npx skills add https://github.com/opensquilla/opensquilla --skill paper-length-gate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: paper-length-gate
Source: https://github.com/opensquilla/opensquilla/tree/main/src/opensquilla/skills/bundled/paper-length-gate
Command: npx skills add https://github.com/opensquilla/opensquilla --skill paper-length-gate

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Academic manuscripts often reach the compilation stage with missing sections, absent citations, or bodies far too short for the requested page count, wasting compile cycles and producing failed deliverables. This Skill runs a deterministic pre-compile audit of the workspace LaTeX artifact so structural problems are caught and repaired before compilation.

Core Features & Use Cases

  • Artifact-backed manuscript validation: Resolves MANUSCRIPT_PATH inside the active workspace, rejects path escapes, empty files, non-.tex targets, and files over the 5 MB safety limit.
  • Structural and citation checks: Verifies \documentclass, document environment, abstract, six required sections (English and Chinese aliases), and the presence of LaTeX citation keys.
  • Target-aware length floor: Computes language-aware content units (English words or CJK characters) scaled by TARGET_PAGES, detects repeated prose and TeX constructs that could hide counted text, and reports pass/warn/block verdicts.
  • Use Case: Before compiling a four-page research paper, run the gate on the manuscript manifest; if the introduction section is missing or the body is below the readiness floor, the gate blocks compilation and reports exactly what to fix.

Quick Start

Run the paper length gate on the current manuscript manifest to verify the LaTeX artifact is structurally complete and long enough before compiling the PDF.

Frequently Asked Questions about paper-length-gate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate a LaTeX manuscript before compiling it to PDF?

Run a pre-compile audit that checks for \documentclass, the document environment, required sections, and citation keys in the .tex source. This gate reads the manuscript from MANUSCRIPT_PATH in the workspace and reports blockers before compilation begins.

How to check if a paper meets a target page count before compiling?

Estimate body scale by counting language-aware content units: English word tokens or CJK characters, scaled per target page. The gate compares the count against a floor derived from TARGET_PAGES, while the compiled PDF page count remains the final authority.

Does the LaTeX validation support Chinese manuscripts?

Yes, section matching includes Chinese aliases such as 引言, 相关工作, and 结论, and the length floor uses a higher per-page unit count when CJK characters dominate the body. Both English and Chinese manuscripts follow the same structural checks.

Why does manuscript validation fail even when the .tex file exists?

Common blockers include a path escaping the workspace, missing abstract or required sections, no citation keys, TeX conditionals that hide counted prose, or excessive repeated segments. Each blocker is listed explicitly in the gate report.

What are the limitations of pre-compile length estimation?

Content-unit counts are delivery-oriented floors, not page-count predictions, since title matter, floats, and bibliography shift the compiled result. The gate never claims the requested page count was produced; compile_pdf with pypdf remains authoritative.