Agent skill

Paper Micro-Unit Generator

by yushui2022 in yushui2022/MathModel-Skill

Repairs one failing section of a mathematical modeling paper from the repair queue, or builds a legacy or quickstart scaffold when you ask for one by name.

MITAuto-check passedResearch & Science

Install Paper Micro-Unit Generator

skills CLI
$ npx skills add yushui2022/MathModel-Skill --skill paper-micro-unit-generator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install yushui2022/MathModel-Skill paper-micro-unit-generator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/yushui2022/MathModel-Skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/trae/.trae/skills/paper-micro-unit-generator .claude/skills/paper-micro-unit-generator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
paper-micro-unit-generator
GitHub stars
454
Token cost
~1.1k tokens
SKILL.md length
430 words
Files
4 (incl. scripts, references)
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

Repairs one failing section of a mathematical modeling paper from the repair queue, or builds a legacy or quickstart scaffold when you ask for one by name.

  • Works in 7 steps: Read… → Select only queued micro-repair items.… → Read the affected section draft and only… → …
  • A paper section keeps failing its audit after repeated changed attempts
  • SKILL.md covers Entry Check, Formal Repair Mode, Repair Rules and Legacy Mode, plus 2 more sections
  • Runs Python scripts from its folder; calls python

What it does

This skill is a narrow repair step inside a larger paper-writing workflow. After a section has failed its audit twice, it reads the writing plan, the authoring state, the draft audit and the repair queue, picks only the items marked for micro-repair, and writes concrete replacement text for that one claim or paragraph into a file under paper_output/drafts/repairs.

It then applies the replacement while keeping valid headings, equations, figure and table numbers, citations and evidence markers, re-runs the section validator and hands control back to paper-formal-writer or paper-workflow-orchestrator. It never assembles the final manuscript or the Word file, never invents data or citations, and stops and reports if the same failure survives a third changed attempt. The folder also ships generate_all_offline.py, merge.py and a micro-unit library reference.

When your agent uses it

  • A paper section keeps failing its audit after repeated changed attempts
  • An entry in repair_queue.json is marked for micro-repair
  • You explicitly want the legacy or quickstart paper scaffold

Example prompts

  • “The results section failed its audit twice; repair the queued micro-repair item without touching other sections.”
  • “Read paper_output/qa/repair_queue.json and fix only the entries marked micro-repair.”
  • “Generate the old quickstart scaffold for this paper, I want the legacy layout.”

Requirements

  • The paper-formal-writer and paper-workflow-orchestrator skills with their paper_output files
  • Python to run the workflow guard and validation scripts

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Read paper_output/plan/writing_plan.json, paper_output/context/authoring_state.json, paper_output/qa/draft_audit.json, and…
  2. Select only queued micro-repair items. Keep the issue ID, section, failure category, expected evidence, and attempt count intact.
  3. Read the affected section draft and only the evidence needed by that issue. Do not rewrite unrelated sections.
  4. Write repair material to paper_output/drafts/repairs/.md. The material must contain concrete replacement text, its target location, and…
  5. Apply the replacement to the queued section draft. Preserve valid headings, equations, figure/table identifiers, citations, and evidence…
  6. Re-run the section audit
  7. Return to $paper-formal-writer or $paper-workflow-orchestrator. This skill must not assemble the formal manuscript or generate Word.

What it can do on your machine

Read from SKILL.md and the folder at commit 7712876. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Paper Micro-Unit Generator loads about 1.1k tokens when it runs, and up to ~7.8k if it reads all its reference files. Until then it costs about 52 tokens; SKILL.md has 430 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~52
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from yushui2022/MathModel-Skill at commit 7712876, republished under its MIT licence (© yushui2022). 430 words, ~1,141 tokens.

Download SKILL.mdSave it as .claude/skills/paper-micro-unit-generator/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
paper-micro-unit-generator
description
Repair a repeatedly failing Standard paper section from repair_queue.json, or generate an explicitly requested legacy/quickstart scaffold. Do not use it as the formal paper writer.

Paper Micro-Unit Generator

Use this skill only for local repair or an explicitly requested legacy scaffold. paper-formal-writer remains the sole formal author and the only producer of paper_output/final_paper_source.md and paper_output/final_paper.docx.

Entry Check

For formal repair, run:

bash
python .trae/skills/paper-workflow-orchestrator/scripts/workflow_guard.py --skill paper-micro-unit-generator

Continue only when S0-S6 pass and paper_output/qa/repair_queue.json contains at least one item whose strategy is micro-repair. Do not create a repair queue manually to bypass the two-failure threshold.

Legacy and quickstart modes are installation or old-model scaffolds. They do not satisfy S7 and do not require the formal repair queue.

Formal Repair Mode

  1. Read paper_output/plan/writing_plan.json, paper_output/context/authoring_state.json, paper_output/qa/draft_audit.json, and paper_output/qa/repair_queue.json.
  2. Select only queued micro-repair items. Keep the issue ID, section, failure category, expected evidence, and attempt count intact.
  3. Read the affected section draft and only the evidence needed by that issue. Do not rewrite unrelated sections.
  4. Write repair material to paper_output/drafts/repairs/<issue-id>.md. The material must contain concrete replacement text, its target location, and any required evidence marker.
  5. Apply the replacement to the queued section draft. Preserve valid headings, equations, figure/table identifiers, citations, and evidence markers.
  6. Re-run the section audit:
bash
python .trae/skills/paper-formal-writer/scripts/validate_authoring.py --section <section-id>
  1. Return to $paper-formal-writer or $paper-workflow-orchestrator. This skill must not assemble the formal manuscript or generate Word.

If the same blocking category reaches the third changed attempt, respect authoring_state.status = BLOCKED. Report the evidence or requirement causing the failure and suggest Lite as a user decision; never switch editions automatically.

Show full SKILL.md (203 more words)Show less

Repair Rules

  • Repair the failed claim or paragraph, not the whole paper.
  • Use only computed values and paths present in the current evidence chain.
  • Preserve <!-- mathmodel-evidence: ... --> markers until deterministic assembly removes them.
  • Do not invent data, citations, completed experiments, or successful validation.
  • Do not expose workflow language in paper prose.
  • Do not renumber existing figure, table, equation, or bibliography references.
  • A repair is complete only after validate_authoring.py --section returns PASS.

Legacy Mode

The old command names remain available. With no arguments they write only to paper_output/drafts/legacy/:

bash
python .trae/skills/paper-micro-unit-generator/scripts/generate_all_offline.py
python .trae/skills/paper-micro-unit-generator/scripts/merge.py

Expected outputs:

text
paper_output/drafts/legacy/micro_units/*.txt
paper_output/drafts/legacy/generate_log.json
paper_output/drafts/legacy/legacy_scaffold.md
paper_output/drafts/legacy/legacy_scaffold.docx
paper_output/drafts/legacy/legacy_ref_check.md

tasks.json is required only for this legacy batch path. The merge is deterministic and preserves existing reference numbers.

For the built-in smoke test, the orchestrator passes --output-root paper_output/quickstart --stem quickstart_scaffold; all smoke-test files stay under paper_output/quickstart/.

Never write final_paper.md, final_paper_source.md, final_paper.docx, or similarly formal names from legacy/quickstart mode.

Template Library

Read references/micro-unit-library.md only when a queued repair needs a fine-grained paragraph/sentence pattern or when the user explicitly requests legacy scaffolding. Do not load the full 200+ template library for ordinary section writing.

Handoff

After a formal repair, run workflow status and update persistent context:

bash
python .trae/skills/paper-workflow-orchestrator/scripts/workflow_guard.py --status
python .trae/skills/context-memory-keeper/scripts/update_workflow_memory.py

The guard report is authoritative if memory and current artifacts disagree. Read the persistent snapshot at paper_output/context/workflow_memory.json before resuming a repair.

© yushui2022, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references) in packages/trae/.trae/skills/paper-micro-unit-generator of yushui2022/MathModel-Skill.

  • SKILL.md
  • references/micro-unit-library.md
  • scripts/generate_all_offline.py
  • scripts/merge.py

Open the folder on GitHubat commit 7712876

Compare with similar skills

Paper Micro-Unit Generator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Paper Micro-Unit Generator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Paper Micro-Unit Generator this skillyushui2022/MathModel-Skill454—~1.1kAutomated safety check: PassMIT
NSFC Abstract Writerhuangwb8/ChineseResearchLaTeX2.9k1 repos~1.3kAutomated safety check: PassMIT
Nature-Style Scientific FiguresYuan1z0825/nature-skills47k—~2.9kAutomated safety check: PassApache-2.0
Citation ManagementK-Dense-AI/claude-scientific-writer2.4k2 repos~3.9kAutomated safety check: NotesMIT
Autonomous Researchfedericodeponte/opendraft507—~8.2kAutomated safety check: PassApache-2.0
Math Modeling Competition WorkflowXiaoMaColtAI/math-modeling-skill1.9k—~1.2kAutomated safety check: PassNone

Similar skills

  • NSFC Abstract Writer

    huangwb8/ChineseResearchLaTeX

    Writes Chinese and English abstracts for NSFC grant applications, with a recommended title and five alternatives, within set character limits.

    2.9k GitHub starsUsed in 1 repo~1.3k tokens
    Research & ScienceAuto-check passed
  • Nature-Style Scientific Figures

    Yuan1z0825/nature-skills

    Creates, revises, audits and exports manuscript-ready scientific figures in Python or R, and routes AI-generated graphical abstracts to a separate workflow.

    47k GitHub stars~2.9k tokensUpdated today
    Research & ScienceAuto-check passed
  • Citation Management

    K-Dense-AI/claude-scientific-writer

    Finds papers in OpenAlex, PubMed and Google Scholar, turns DOIs, PMIDs and arXiv IDs into clean BibTeX, and validates citations for a manuscript or thesis.

    2.4k GitHub starsUsed in 2 repos~3.9k tokens
    Research & ScienceAuto-check: notes
  • Autonomous Research

    federicodeponte/opendraft

    An 18-agent pipeline that turns one topic line into a drafted research paper, literature review, or thesis chapter.

    507 GitHub stars~8.2k tokensUpdated 8 days ago
    Research & ScienceAuto-check passed
  • Math Modeling Competition Workflow

    XiaoMaColtAI/math-modeling-skill

    Three-role workflow for math modeling contests: problem analysis, code and results, then a paper, with independent subagent checks at each stage gate.

    1.9k GitHub stars~1.2k tokensUpdated today
    Research & ScienceAuto-check passed
  • Official

    Indexes research papers on the Hugging Face Hub from arXiv, links them to models and datasets, claims authorship and generates markdown research articles from templates.

    11k GitHub starsUsed in 4 repos~4.2k tokens
    Research & ScienceAuto-check passed

More from yushui2022/MathModel-Skill

All 10 skills in this repo
  • Builds a scoring-aligned outline for a mathematical modeling paper and a model selection plan with baseline, improvement and validation experiments.

    454 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Modeling Code and Result Contracts

    yushui2022/MathModel-Skill

    Generates result-evidence contracts, tables and runnable q1 to q3 modeling code scaffolds for a math modeling paper from a model route, a data plan and cleaned data.

    454 GitHub stars~1.4k tokensUpdated 3 days ago
    Auto-check passed
  • Formal Modeling Paper Writer

    yushui2022/MathModel-Skill

    Plans, drafts, audits, formats and verifies a formal mathematical-modeling paper from an evidence chain, delivering audited Markdown and a Word file with native equations.

    454 GitHub stars~1.6k tokensUpdated 3 days ago
    Auto-check passed
  • Authoritative Data Harvester

    yushui2022/MathModel-Skill

    Finds authoritative public data sources for modeling tasks, prefers official APIs and bulk downloads, and outputs a reproducible fetch and cleaning plan with citations.

    454 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Context Memory Keeper

    yushui2022/MathModel-Skill

    Maintains a two-layer persistent memory for a math-modeling paper workflow: long-term rules plus a short-term workbench, with finished tasks archived.

    454 GitHub starsUsed in 1 repo~893 tokens
    Auto-check passed
  • Math Modeling Data Cleaning and Charts

    yushui2022/MathModel-Skill

    Cleans raw or scraped competition data and produces exploratory charts and a figure plan as one stage of a mathematical modeling paper workflow.

    454 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed

Works with

Questions about Paper Micro-Unit Generator

What does Paper Micro-Unit Generator do?

Repairs one failing section of a mathematical modeling paper from the repair queue, or builds a legacy or quickstart scaffold when you ask for one by name. This skill is a narrow repair step inside a larger paper-writing workflow. After a section has failed its audit twice, it reads the writing plan, the authoring state, the draft audit and the repair queue, picks only the items marked for micro-repair, and writes concrete replacement text for that one claim or paragraph into a file under paper_output/drafts/repairs.

When should I use Paper Micro-Unit Generator?

Paper Micro-Unit Generator fits situations like: A paper section keeps failing its audit after repeated changed attempts; an entry in repair_queue.json is marked for micro-repair; you explicitly want the legacy or quickstart paper scaffold.

How do I install Paper Micro-Unit Generator in Claude Code?

Run `npx skills add yushui2022/MathModel-Skill --skill paper-micro-unit-generator -a claude-code`. Or copy the skill folder (packages/trae/.trae/skills/paper-micro-unit-generator in yushui2022/MathModel-Skill) into .claude/skills/paper-micro-unit-generator in your project. Claude Code loads it when a task matches its description.

How do I install Paper Micro-Unit Generator in Codex?

Run `npx skills add yushui2022/MathModel-Skill --skill paper-micro-unit-generator -a codex`. Or copy the skill folder (packages/trae/.trae/skills/paper-micro-unit-generator in yushui2022/MathModel-Skill) into .agents/skills/paper-micro-unit-generator in your project. Codex loads it when a task matches its description.

Can I use Paper Micro-Unit Generator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add yushui2022/MathModel-Skill --skill paper-micro-unit-generator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/paper-micro-unit-generator, .gemini/skills/paper-micro-unit-generator, .github/skills/paper-micro-unit-generator and .opencode/skills/paper-micro-unit-generator in your project.

What does Paper Micro-Unit Generator need to run?

Going by SKILL.md and its folder, Paper Micro-Unit Generator needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: The paper-formal-writer and paper-workflow-orchestrator skills with their paper_output files; Python to run the workflow guard and validation scripts.

Does Paper Micro-Unit Generator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Paper Micro-Unit Generator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Paper Micro-Unit Generator use?

Paper Micro-Unit Generator is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Paper Micro-Unit Generator use?

About 1.1k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.7k tokens, read only when the agent opens those files.

What are the alternatives to Paper Micro-Unit Generator?

Skills that share tags, products or a category with Paper Micro-Unit Generator: NSFC Abstract Writer (huangwb8/ChineseResearchLaTeX, 2.9k stars), Nature-Style Scientific Figures (Yuan1z0825/nature-skills, 47k stars), Citation Management (K-Dense-AI/claude-scientific-writer, 2.4k stars) and Autonomous Research (federicodeponte/opendraft, 507 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Paper Micro-Unit Generator?

yushui2022 (a GitHub user) maintains it in yushui2022/MathModel-Skill, which has 454 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 7, 2026.

Source: yushui2022/MathModel-Skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.