larashero3-dotcom/lieflat-gongwen
通过102万字语料提炼的公文写作 skill,把公文写作风格变成可测量、可验收的量化数据
What it is
lieflat‑gongwen is a skill (plug‑in) for AI agents such as Claude, Codex or Moxt that lets the agent write Chinese official documents (公文) in a style that matches real‑world government‑level writing. The authors distilled 1.02 million characters of authentic public‑sector texts, measured dozens of quantitative style parameters (sentence length, punctuation density, heading patterns, etc.) and encoded those “DNA” statistics into a set of rules the agent can follow.
What it does
- Detects the document family and sub‑type (e.g., a work plan, a research report, a party‑building experience piece).
- Looks up the statistical “DNA” for that sub‑type – a small table of numeric ranges that describe the typical style.
- Builds a skeleton (heading hierarchy, paragraph‑opening “lead‑in” sentences) based on the DNA.
- Fills the body by prompting the LLM to respect the numeric constraints (average sentence length ~55 chars, “、” punctuation density 14‑31 per k‑chars, specific counts of “一是…二是…” enumerations, etc.).
- Runs a self‑check script that re‑computes the same statistics on the generated text and flags any out‑of‑range values, so the user can edit before finalising.
Who it’s for
- Government or state‑owned‑enterprise writers who need to produce formal reports, work plans, research briefs or party‑building material that looks like genuine official prose.
- Developers building AI‑assistant bots for Chinese bureaucratic contexts who want a non‑template, data‑driven writing style rather than the usual canned “根据… 为… ” boilerplate.
How to use it
- Clone the repo into the
skillsfolder of a Moxt‑compatible agent (or any Claude/Claude‑code compatible environment). Example:git clone https://github.com/larashero3-dotcom/lieflat-gongwen ~/.claude/skills/lieflat-gongwen - The entry point is SKILL.md, which describes a six‑step workflow. The crucial step is reading the DNA document for the detected sub‑type (step 3).
- Run the provided Python self‑check (
scripts/check_params.py) after the LLM finishes a draft; the script uses only the standard library. - Adjust any flagged parameters, then accept the final output.
What’s inside
SKILL.md– the overall routing logic and contract for the skill.参数卡.md– a one‑page table of the seven document styles with their numeric ranges.标题技法库.md&句子对照库.md– collections of heading techniques and sentence‑level examples for each style.scripts/– a tiny Python self‑checker and a script that strips metadata from the raw corpus.公文语料/&党建语料/– the distilled DNA statistics (no raw text, to respect copyright).示例/– 22 synthetic example documents and an audit log showing how they were refined.
License & distribution
The repository is released under PolyForm Non‑Commercial 1.0.0. It permits free use, modification and redistribution only for non‑commercial purposes (research, education, personal learning, government use, etc.). Commercial exploitation (selling the skill, integrating it into a paid product, or using it for paid writing services) requires a separate written agreement with the authors.
This description is based solely on the information provided in the repository’s README.
Related
- Project
- Project
- Project
- Project