SuperAPI AI Directory

make-latex-model

Writing & research

View repository

Updated 10-15 22:14

About this skill

ChineseResearchLaTeX Template Implementation and High-Fidelity Aligner
  • Make the target project in ChineseResearchLaTeX into a high-quality template according to the current real architecture.
  • First determine whether to change projects/* or packages/bensz-*。
  • If the shared package must be changed, first make a regression plan, then run the official verification of the affected templates.
  • Acceptance is always based on each product line's official build entry point.

Applicable Tasks

  • Align a project to an official PDF, a Word-exported PDF, or an existing baseline
  • Determine whether a problem is a project-level difference or shared style/shared script
  • Perform pixel-level PDF comparison, title alignment, parameter extraction
  • Add or refactor NSFC / paper / thesis / cv templates

Process

Input

Provide the necessary input according to the user request and configuration files; missing information should be clearly listed and steps depending on that input should be stopped.

Execution Steps

  • When a bug caused by a design flaw in this skill appears in the user's environment, prioritize using bensz-collect-bugs to record it according to the specification in ~/.bensz-skills/bugs/, and strictly do not directly modify the source code of skills already installed in the user's local Claude Code / Codex.

  • If the AI can still complete the user's task through a workaround, it should first record the bug, then continue completing the current task.

  • When the user explicitly requests public reporting actions such as "report bensz skills bugs", call the local gh and bensz-collect-bugs, and only upload newly added bugs to huangwb8/bensz-bugs; do not pull / clone the entire bug repository.

  • Product line standards:docs/for-developers/*-template-standard.md

  • This skill workflow:docs/WORKFLOW.md

  • Product line identification:references/PRODUCT_LINE_RULES.md

  • Script responsibilities:references/SCRIPT_SCOPE.md

  • Tool description:scripts/README.md

  • Baseline preparation:docs/BASELINE_GUIDE.md

Determine the acceptance criteria

  • The user wants "to be like a certain PDF/Word"
  • Or "to make a good template according to the current repository standards"
  • Or "to add a new set of template capabilities"

Determine the modification layer

  • projects/*: example content, thin wrapper, project resources, local differences
  • packages/bensz-*: shared styles, shared fonts, profile, unified build logic

Minimal-scope implementation

  • Only modify files directly related to the current task
  • Unless the user explicitly requests it, do not modify the semantic content of the body text by default

Package-layer safety gate

When packages/ must be changed, additionally execute:

  1. First prove that a project-level solution is insufficient
  2. Run python3 skills/make-latex-model/scripts/plan_package_regression.py <packages/bensz-*>
  3. Prioritize narrowing changes to the most specific template-exclusive profile/style/template
  4. After changes, first verify the target project, then regress all existing projects directly covered by that shared package

Official entry point verification

  • NSFC:nsfc_project_tool.py

  • Paper:paper_project_tool.py

  • Thesis:thesis_project_tool.py

  • CV:cv_project_tool.py

  • analyze_pdf.py

  • compare_headings.py

  • compare_pdf_pixels.py

  • optimize_heading_linebreaks.py

  • plan_package_regression.py

These scripts are auxiliary toolboxes, not the only workflow; NSFC-specific tools cannot replace the official entry points of paper / thesis / cv by default.

Output

Output the deliverables promised by the Skill description, and clearly specify the format, path, and failure return form.

Output Management

Intermediate files for new tasks of this Skill are uniformly written to ./.bensz-api/task-{yyyymmdd-hhmm}-{简短描述}/{skill名}/input|output|log/. Reuse one task root directory for the same task; create only for multi-Skill collaboration shared/. Official deliverables are not written to this directory; historical hidden directories only allow explicit compatibility reading, migration, or cleanup.

Validation

  1. Changes land at the correct layer
  2. Go through the corresponding product line's official entry point
  3. Warnings need to state whether they are existing or newly added
  4. If a shared package is changed, must state which templates were regressed
  5. If the user provides a baseline, complete the necessary compare
  6. paper By default consider both PDF and DOCX;cv By default consider both Chinese and English;thesis By default consider consistency between profile/style and project entry points

Failure and recovery

Preserve error evidence and completed artifacts; retry from the most recent failed step only after input, environment, or external dependencies recover.

Constraints

Allowed:

  • Adjust project-level layout parameters, heading system, entry assembly
  • Consolidate shared implementations into packages/bensz-*
  • Modify profile, style, wrapper, official compare acceptance chain

Avoid:

  • Copying shared implementations back into a single project
  • Bypassing the official build entry point and only running bare xelatex
  • Breaking the repository's real layering for pixel alignment
  • Rewriting the user's body semantics by default

Common hard constraints

  • When a task needs to be persisted to disk, use the unique ./.bensz-api/task-{yyyymmdd-hhmm}-{简短描述}/ root directory; place shared materials in shared/, and place Skill-specific materials in that Skill's input/、output/、log/。
  • Official deliverables, source code, and official plans are saved according to project conventions and are not written to the task workspace; without authorization, do not overwrite, delete, migrate, or write remotely.
  • For project maintenance changes, check BAC availability and record requirements, AI outputs, tool results, file changes, and verification summaries; BAC only performs process auditing and does not replace attribution, responsibility, or compliance judgment.
  • Do not record API Keys, access tokens, passwords, Cookies, environment/credential files, private Prompts, identity information, local usernames, hostnames, or unnecessary large raw data.
  • File paths must be normalized and restricted to the authorized project scope; external URLs, subprocesses, and network access follow least privilege to prevent path traversal, SSRF, and command injection.
  • Skill versions are uniquely recorded in their own config.yaml:skill_info.version; public API, protocol, directory, or configuration changes must be synchronized with documentation and CHANGELOG.md。
  • Only hand design defects in the Skill or Bensz infrastructure itself to bensz-collect-bugs; first write sanitized content to ~/.bensz-skills/bugs/, the current task is not interrupted, public reporting only occurs when the user explicitly requests it, and directly modifying the user's installed Skill source code is prohibited.

Skill-specific constraints

Must not exceed the scope declared by this Skill description and the process above; do not disguise unverified information as definitive conclusions.