Agent skill

Formal Modeling Paper Writer

by yushui2022 in 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.

MITAuto-check passedResearch & Science

Install Formal Modeling Paper Writer

skills CLI
$ npx skills add yushui2022/MathModel-Skill --skill paper-formal-writer -a claude-code

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

GitHub CLI
$ gh skill install yushui2022/MathModel-Skill paper-formal-writer --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-formal-writer .claude/skills/paper-formal-writer && 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-formal-writer
GitHub stars
454
Token cost
~1.6k tokens
SKILL.md length
578 words
Files
16 (incl. scripts, references)
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

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.

  • Works in 2 steps: Build the evidence-aware outline → Prepare adaptive authoring
  • Writing the full formal paper for a mathematical modeling competition after the evidence checks pass
  • SKILL.md covers Entry, Single Formal Path, Prepare and Draft And Audit, plus 5 more sections
  • Runs Python scripts from its folder; calls python

What it does

This is the final authoring stage of a staged mathematical-modeling workflow. It starts only after a guard script confirms that the earlier stages, S0 through S6, passed, then turns the fresh evidence chain into an audited Markdown manuscript and a Word document with native equations. One script builds an evidence-aware outline and another prepares adaptive authoring, writing contracts such as the writing plan, authoring state, draft audit and repair queue under `paper_output/`.

The default delivery targets competition papers: a plan of at least 14000 effective characters, a main-paper floor of 8000 and at least 18 rendered pages before appendices, all adjustable and to be checked against the real contest's rules. Chapters are written one unit at a time to the path in the authoring state and each is audited with `validate_authoring.py`. Routing is rule-based: a section that fails once is rewritten, and a global pass that hits the same blocking category twice drops back to section-level work. Further scripts assemble sections, check paper format and format the Word output.

When your agent uses it

  • Writing the full formal paper for a mathematical modeling competition after the evidence checks pass
  • Auditing and revising draft chapters against a paper standard
  • Producing a formatted Word manuscript with native equations

Example prompts

  • “Plan and write the formal paper from our S6 evidence results, targeting the competition length.”
  • “Audit the model assumptions chapter and queue repairs for anything that fails.”
  • “Format the final manuscript as a Word document and check the page count.”

Requirements

  • Python
  • The earlier workflow stages S0 to S6 passed, as checked by the workflow guard script

Workflow steps

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

  1. Build the evidence-aware outline
  2. Prepare adaptive authoring

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 9 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

Formal Modeling Paper Writer loads about 1.6k tokens when it runs, and up to ~4.1k if it reads all its reference files. Until then it costs about 59 tokens; SKILL.md has 578 words of instructions outside code blocks.

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

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). 578 words, ~1,623 tokens.

Download SKILL.mdSave it as .claude/skills/paper-formal-writer/SKILL.md (or your agent's skills folder). This skill also uses 15 other files; get the full folder from GitHub.
name
paper-formal-writer
description
Plan, draft, audit, globally revise, format, and verify a formal mathematical-modeling paper after the Standard evidence gate passes. Use for the sole S7/S8 formal manuscript path, not for legacy micro-unit scaffolds.

Paper Formal Writer

This skill is the sole formal author and final manuscript producer in Standard. It turns a fresh S6 evidence chain into an audited Markdown source and native-equation Word document.

Entry

Run before formal work:

bash
python .trae/skills/paper-workflow-orchestrator/scripts/workflow_guard.py --skill paper-formal-writer

S0-S6 must pass. If workflow state is uncertain, run workflow_guard.py --status and follow its current artifact report rather than memory.

Single Formal Path

text
S6 evidence PASS
-> writing plan
-> chapter drafts
-> chapter audits
-> queued local repair when required
-> deterministic assembly
-> Agent global revision
-> final Markdown audit
-> formal DOCX
-> S8 format/render gate

Do not promote quickstart, legacy, or mechanically merged micro-unit output into a formal filename.

Prepare

  1. Build the evidence-aware outline:
bash
python .trae/skills/paper-formal-writer/scripts/build_paper_outline.py
  1. Prepare adaptive authoring:
bash
python .trae/skills/paper-formal-writer/scripts/prepare_authoring.py --mode auto

Default delivery is competition: plan at least 14000 effective characters, with a main-paper floor of 8000 and at least 18 rendered pages before appendices. These are adjustable project defaults, not contest rules. Verify the actual contest's page cap and counting rules before writing. auto therefore selects section; a short report needs --delivery short-report --scope-reason "user-requested scope". Custom floors use --min-pages / --min-body-chars with a reason; never lower them merely to turn a failed check green.

Read references/competition-scope.md when preparing scope or repairing a short manuscript. Several authoring turns may produce one coherent chapter; preserve evidence and notation between turns instead of compressing the paper into one response.

The authoritative S7 contracts are:

  • paper_output/plan/writing_plan.json
  • paper_output/context/authoring_state.json
  • paper_output/qa/draft_audit.json
  • paper_output/qa/repair_queue.json

Draft And Audit

Write only to the path recorded for the current unit in authoring_state.json. Each chapter must be a complete, coherent section and must include its required removable marker:

html
<!-- mathmodel-evidence: evidence-id-1, evidence-id-2 -->

Audit every changed draft:

bash
python .trae/skills/paper-formal-writer/scripts/validate_authoring.py --section <section-id>

Routing is deterministic:

  • global repeats the same blocking category twice: switch to section.
  • A section fails once: rewrite that section.
  • A section repeats the same category twice: $paper-micro-unit-generator may repair only queued locations.
  • The third changed attempt with the same category: S7 becomes BLOCKED; report the cause and suggest Lite as a user choice without switching automatically.

Audits block short drafts, missing chapters/evidence/numbers, broken formulas, placeholders, duplicate prose, broken figure/table references, and internal workflow language.

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

Assemble And Revise

After all active units pass:

bash
python .trae/skills/paper-formal-writer/scripts/assemble_sections.py
python .trae/skills/paper-formal-writer/scripts/validate_authoring.py --assembled

The assembler follows outline order, strips evidence comments, and preserves existing numbering. It writes paper_output/drafts/assembled_draft.md.

Then read the entire assembled draft and evidence chain, and rewrite the paper globally into:

text
paper_output/final_paper_source.md

This pass must unify terminology, notation, transitions, argument order, citations, captions, and conclusions. Copying the assembled draft unchanged is rejected.

Run the final source audit:

bash
python .trae/skills/paper-formal-writer/scripts/validate_authoring.py --final

Any change to evidence, writing plan, approved section draft, assembly, or final source invalidates downstream PASS state.

Word And S8

Only after authoring_state.status = PASS:

bash
python .trae/skills/paper-formal-writer/scripts/format_formal_docx.py
python .trae/skills/paper-formal-writer/scripts/check_paper_format.py --render required

Formal mode requires fresh S6 and S7 hashes. --allow-draft may create final_paper_draft.docx for layout diagnosis, but never satisfies S7/S8 or overwrites the formal DOCX.

format_formal_docx.py converts LaTeX to editable Word OMML and blocks failed conversion. check_paper_format.py checks dynamic length, required hierarchy, citations, evidence-linked figures/tables, formulas, duplicate prose, DOCX structure, LibreOffice PDF rendering, page count, and extractable text.

Writing Standard

  • Use 1 / 1.1 / 1.1.1 headings and complete CUMCM sections.
  • For each question, connect assumptions, variables, derivation, algorithm, computed values, validation, uncertainty, and conclusion.
  • Define symbols before formulas and explain every displayed result.
  • Cite and interpret every included figure/table.
  • Use only current evidence; never invent runs, values, sources, or validation.
  • Avoid copied or number-swapped paragraphs used only to meet length.
  • Keep implementation language out of body prose; reproducibility paths belong in the appendix.

References

Read only the reference needed for the current writing or repair decision.

Handoff

After each meaningful transition, run workflow status and update paper_output/context/workflow_memory.json:

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

S8 is complete only when the machine-readable format report is PASS and fresh.

© 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 15 other files (scripts, references) in packages/trae/.trae/skills/paper-formal-writer of yushui2022/MathModel-Skill.

  • SKILL.md
  • agents/openai.yaml
  • references/competition-scope.md
  • references/cumcm-paper-standard.md
  • references/figure-table-writing-rules.md
  • references/formal-paper-template.md
  • references/section-expansion-rules.md
  • scripts/assemble_sections.py
  • scripts/authoring_contracts.py
  • scripts/build_paper_outline.py
  • scripts/check_paper_format.py
  • scripts/format_formal_docx.py
  • scripts/formula_omml.py
  • scripts/paper_scope.py
  • scripts/prepare_authoring.py
  • scripts/validate_authoring.py

Open the folder on GitHubat commit 7712876

Compare with similar skills

Formal Modeling Paper Writer 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.

Formal Modeling Paper Writer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Formal Modeling Paper Writer this skillyushui2022/MathModel-Skill454—~1.6kAutomated safety check: PassMIT
Academic Integrity Rewritelin1111-1/academic-integrity-rewrite102—~1.1kAutomated safety check: PassMIT
Math Modeling Competition WorkflowXiaoMaColtAI/math-modeling-skill1.9k—~1.2kAutomated safety check: PassNone
PRISMA Systematic Review Writerkeemanxp/slr-prisma1021 repos~7.1kAutomated safety check: PassMIT
Word Document Reader and WriterHKUDS/DeepTutor41k—~2.5kAutomated safety check: PassApache-2.0
Markdown to Word Convertercat-xierluo/SuitAgent205—~559Automated safety check: PassMIT

Similar skills

  • Academic Integrity Rewrite

    lin1111-1/academic-integrity-rewrite

    Revise Chinese or English academic writing for lower unnecessary textual overlap while preserving meaning, evidence, numbers, equations, terminology, and citations.

    102 GitHub stars~1.1k tokensUpdated 1 mo 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
  • Guides you through writing a systematic literature review to the PRISMA 2020 checklist, producing a journal-format Word manuscript, a flow diagram and APA 7th references.

    102 GitHub starsUsed in 1 repo~7.1k tokens
    Research & ScienceAuto-check passed
  • Reads, creates and edits Word .docx files with python-docx, and drops to raw OOXML for tracked changes, comments and byte-exact edits.

    41k GitHub stars~2.5k tokensUpdated 3 days ago
    Documents & OfficeAuto-check passed
  • Markdown to Word Converter

    cat-xierluo/SuitAgent

    Converts Markdown files into Word documents formatted to Chinese typesetting conventions, with presets for academic, legal, report and book layouts.

    205 GitHub stars~559 tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Biomedical Paper

    LeoYeAI/openclaw-master-skills

    AI-powered biomedical manuscript generation with docx output.

    2.2k GitHub stars~3.3k tokensUpdated 2 mo ago
    Documents & OfficeAuto-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 4 days ago
    Auto-check passed
  • Paper Micro-Unit Generator

    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.

    454 GitHub stars~1.1k tokensUpdated 4 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

Questions about Formal Modeling Paper Writer

What does Formal Modeling Paper Writer do?

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. This is the final authoring stage of a staged mathematical-modeling workflow. It starts only after a guard script confirms that the earlier stages, S0 through S6, passed, then turns the fresh evidence chain into an audited Markdown manuscript and a Word document with native equations.

When should I use Formal Modeling Paper Writer?

Formal Modeling Paper Writer fits situations like: writing the full formal paper for a mathematical modeling competition after the evidence checks pass; auditing and revising draft chapters against a paper standard; producing a formatted Word manuscript with native equations.

How do I install Formal Modeling Paper Writer in Claude Code?

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

How do I install Formal Modeling Paper Writer in Codex?

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

Can I use Formal Modeling Paper Writer 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-formal-writer -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-formal-writer, .gemini/skills/paper-formal-writer, .github/skills/paper-formal-writer and .opencode/skills/paper-formal-writer in your project.

What does Formal Modeling Paper Writer need to run?

Going by SKILL.md and its folder, Formal Modeling Paper Writer needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python; The earlier workflow stages S0 to S6 passed, as checked by the workflow guard script.

Does Formal Modeling Paper Writer 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 Formal Modeling Paper Writer 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 Formal Modeling Paper Writer use?

Formal Modeling Paper Writer 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 Formal Modeling Paper Writer use?

About 1.6k tokens (SKILL.md is roughly 6.5k 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 2.4k tokens, read only when the agent opens those files.

What are the alternatives to Formal Modeling Paper Writer?

Skills that share tags, products or a category with Formal Modeling Paper Writer: Academic Integrity Rewrite (lin1111-1/academic-integrity-rewrite, 102 stars), Math Modeling Competition Workflow (XiaoMaColtAI/math-modeling-skill, 1.9k stars), PRISMA Systematic Review Writer (keemanxp/slr-prisma, 102 stars) and Word Document Reader and Writer (HKUDS/DeepTutor, 41k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Formal Modeling Paper Writer?

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.