- Used to supplement existing LaTeX projects with "example content," not to write real research conclusions.
- AI handles semantic understanding, resource association, and narrative generation; hardcoding handles file scanning, structural protection, format validation, and backup.
- The focus is on "generating something that looks like a complete example" while not breaking the template skeleton or system files.
Input
Required:
project: project name or path.
Common optional parameters:
content_density:minimal/moderate/comprehensiveoutput_mode:preview/apply/reporttarget_files: default auto-detectextraTex/*.texnarrative_hint: guides the example narrative direction, but still falls under "example scenarios"
Default values and details are uniformly read from config.yaml。
Applicability and Non-Applicability
- Applicable: when example chapters, example tables, or example text-image narratives need to be added to NSFC / thesis / paper and similar projects.
- Not applicable: real research writing, template repair, structural refactoring, modifying system configuration files.
Process
Input
Provide the necessary input per the user request and configuration file; missing information should be clearly listed and steps depending on that input should be halted.
Execution Steps
- When a bug caused by a design flaw of this skill occurs in the user's environment, prioritize using
bensz-collect-bugsto record it per spec in~/.bensz-skills/bugs/, and strictly do not directly modify the skill source code already installed in the user's local Claude Code / Codex. - If AI can still complete the user's task via a workaround, it should first record the bug, then continue completing the current task.
- When the user explicitly requests a public reporting action such as "report bensz skills bugs," call the local
ghandbensz-collect-bugs, uploading only newly added bugs tohuangwb8/bensz-bugs; do not pull / clone the entire bug repository.
- Scan resources such as figures, code, and references in the project.
- AI analyzes chapter topics, key concepts, tone, and context.
- AI reasons about the relevance of resources to chapters and decides the combination of content types.
- Generate a coherent example narrative, may reference
narrative_hint。 - Wrap into valid LaTeX using hardcoded templates.
- Self-check and optimize the generated content.
- Execute format and structure validation, and generate a quality report when needed.
- AI: semantic analysis, resource selection, text generation, self-optimization.
- Hardcoding: file scanning, Top-K selection, LaTeX wrapping, format protection, backup, logging, structure validation.
Focus on the following in config.yaml :
parameters.*run_management.*scan.*generation.*generation.section_hierarchy.*generation.templates.*
Output
- All run artifacts are written to
{project_path}/.complete_example/<run_id>/ - Typical structure:
backups/logs/analysis/output/metadata.json
output_mode=applyonly writes back to the project in this mode; other modes only provide previews or reports.
Output Management
Intermediate files for new tasks of this Skill are uniformly written to ./.bensz-api/task-{yyyymmdd-hhmm}-{简短描述}/{skill名}/input|output|log/. The same task reuses one task root directory; shared/is only created for multi-Skill collaboration. Formal deliverables are not written to this directory; historical hidden directories only allow explicit compatible reading, migration, or cleanup.
Validation
After completion, execute the Skill's existing static checks, script validation, or manual review, and record the pass criteria.
Failure and Recovery
Preserve error evidence and completed artifacts; retry from the most recent failed step only after the input, environment, or external dependency has recovered.
Constraints
- Modifying system files is prohibited:
main.tex、extraTex/@config.tex、@config.tex - Blacklisted files must have access control and hash verification; if an illegal modification attempt is detected, it must be rejected.
main.texonly\section/\subsectionis allowed; for input-typeextraTex/*.texonly\subsubsection/\subsubsubsection- Generated content must retain its "example" nature and must not be disguised as real experiments or real data sources.
Common Hard Constraints
- When a task needs to persist to disk, use a unique
./.bensz-api/task-{yyyymmdd-hhmm}-{简短描述}/root directory; shared materials go intoshared/, and Skill-specific materials go into that Skill'sinput/、output/、log/。 - Formal deliverables, source code, and formal plans are stored according to project conventions and are not written into the task workspace; without authorization, do not overwrite, delete, migrate, or write remotely.
- 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-volume 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.
- The Skill version is uniquely recorded in its own
config.yaml:skill_info.version; public API, protocol, directory, or configuration changes synchronize documentation andCHANGELOG.md。 - Only design defects of the Skill or Bensz infrastructure itself are submitted to
bensz-collect-bugs; first write a sanitized version to~/.bensz-skills/bugs/, the current task is not interrupted, public reporting occurs only when the user explicitly requests it, and directly modifying the user's installed Skill source code is prohibited.
Skill-Specific Constraints
Do not exceed the scope declared in this Skill's description and the process above; do not disguise unverified information as definitive conclusions.