★Chinese Official Document Writing DNA: A Skill That Turns Gongwen Style into Measurable Parameters from 1.02 Million Words★

This is a writing skill distilled from a 1.02-million-word corpus of Chinese official documents. It works with Codex, ClaudeCode, Moxt, and any other agent that supports agents.md. The skill turns official document writing style into measurable, verifiable quantitative data, so an agent can reproduce seven typical genres: research reports, leadership speeches, work opinions, experience materials, work plans, experience summaries, and Party-building materials.
Genres Covered
This skill uses corpus statistics to distill and replicate the style of high-quality official documents. It only covers genres that do not have fixed templates. There are two genre families and seven categories.
Official document family (six genres): research reports, leadership speeches, work opinions, experience materials, work plans, and experience summaries. Median length is 2,500–3,700 Chinese characters, with 2–5 first-level headings.
Party-building family (one genre): around 1,000-character Party-building or grassroots experience materials. Length is about 1,120 characters, with zero first-level headings. The structure relies on topic sentences at the start of paragraphs and direct quotes from ordinary people.
This skill does not cover statutory documents with fixed templates (notices, requests for instructions, replies, letters). These genres have a fixed body structure. There is no need to distill style through quantitative analysis because the style is already fixed.
Examples
Three sample essays show different approaches to three genres.
Case 1 · Work Plan (Normative Deployment)
Title: Draft a Work Plan for Backfilling Electric Bicycle Charging and Parking Facilities and Tackling Safety Hazards. (Full text: Examples/Work Plan_Electric Bicycle Charging and Parking Facilities Backfill and Hazard Remediation Plan.md)
“
To thoroughly implement the requirements of the General Office of the State Council’s Action Plan for Full-Chain Rectification of Electric Bicycle Safety Hazards and the “15th Five-Year” Plan for Modern Emergency Management System Construction on deepening full-chain special rectification of “one thing” items such as electric bicycles and new energy vehicle charging infrastructure, and in response to prominent supply-demand contradictions in residential community charging facilities and repeated violations in illegal parking, charging, and illegal modification, we will concentrate resources for one phase to fill facility gaps and eliminate existing hazards. In light of the city’s actual conditions, this plan is formulated.
I. Work Objectives
By the end of this year, the gap in electric bicycle charging and parking facilities in residential communities across the city will be basically filled. New centralized charging and parking points: [To be filled: xx]. New charging ports: [To be filled: xx]. Elevator blocking systems installed: [To be filled: xx]. All identified fire safety hazards will be rectified and removed from the list…
II. Key Tasks
(1) Establish a clear baseline and build a ledger.
Conduct a full-area grid inspection. Focus on residential communities and urban villages, include old courtyards, unit employee dormitories, and street-side rental housing. For each community and each building, verify the number of electric bicycles, existing charging ports, and the area and fire facility configuration of centralized parking areas. The housing and urban-rural development department leads the inspection, with participation from public security, fire rescue, market regulation, and power supply units…
All 12 parameters in this sample fall within the corpus range. It is the only sample in this batch with no out-of-range items. Sentence length: 45.0. Dunhao density: 21.9‰. Third-level headings: 11. These are the ID parameters of a work plan. It is the only genre that heavily uses 1. numbering. The [To be filled: xx] placeholders in the body are intentional, not unfinished. Those spots are where local numbers should go. Corpus statistics found that 60%–72% of real official documents use no percentages at all. When you do not have verified data, it is feasible to support the article through logical depth. So this skill always leaves placeholders for unverifiable numbers and never fabricates them.
Case 2 · Research Report (Analytical Upward Document)
Title: Write a research report on the application of “AI+” in the city’s manufacturing sector. (Full text: Examples/Research Report_AI Application in Manufacturing Research Report.md)
“
I. Transformation Has Begun, but Heat Is Concentrated in Leading Firms
(1) A few leading firms have produced replicable models. … This company’s approach has two notable points. First, it started with processes that are single, have clear judgment criteria, and are easy to accumulate samples. It did not start with final assembly, which has the longest process route and the most anomalies. Second, it kept the equipment supplier’s engineers in the factory for three months, until the factory’s own technicians could adjust judgment thresholds, add samples, and handle false alarms themselves. Only then did the engineers leave.
(3) Few county-level firms have started, and some reported projects are mislabeled. … During a discussion, a county industry and information technology bureau official put it bluntly: “The higher-ups want us to report the number of smart factories and smart workshops. Reporting earns points. Of the firms we reported, two actually just installed a few cameras in the workshop and connected a dashboard.”
Both are official documents, but research reports and work plans feel completely different. First-level headings change from 4–8 character business labels in work plans to 17–21 character “judgment + turn” two-part sentences that carry viewpoints. The “first is… second is…” pattern appears 12 times, making it the densest paragraph-level layering method. Direct quotes from business owners and county officials also appear. These differences are not stylistic preferences. They are genre fingerprints from corpus statistics. Writing a research report with the short headings of a work plan is a genre mismatch at the parameter level.
Case 3 · Party-Building Experience Material (Another Genre Family)
Title: Write a state-owned enterprise Party-building experience material on how Party building generates business results. (Full text: Examples/Party-Building Experience Material_Turning Organizational Strengths into Development Advantages.md)
“
Turning Organizational Strengths into Development Advantages: “Four-Chain Linkage” Activates the Red Engine of State-Owned Enterprises
The biggest fear in state-owned enterprise Party building is the “two skins” problem with production and operations. Party-building activities are lively, but business indicators do not improve. Party members are pioneers in the meeting room but disappear on the production line. In recent years, the Party Committee of [To be filled: company name] … has explored a “four-chain linkage” integration path of thought chain, responsibility chain, breakthrough chain, and safety chain.
Tighten the responsibility chain and hard-link Party-building assessment to business indicators. … “In the past, I always felt Party building was a soft indicator that could be postponed. Now, with multiplication, no one dares to put it off.” These words from Tian Zhiyuan, a front-line production workshop Party branch secretary, capture the real change in front-line Party members’ morale after the assessment baton turned.
This belongs to another genre family. Its differences from the first two are dramatic. The length is just over 1,000 characters. There are zero first-level headings. It layers through topic sentences with verb-object phrases like “Tighten the responsibility chain.” Direct quotes from employees run throughout. Long quotes are a positive fingerprint of this family. Family identification depends only on length and first-level headings. Once a 1,000-character material adds multiple first-level headings, it becomes a compressed official document, and all parameters fall apart.
The self-check script only flags one thing as an error: hard conflicts, meaning genre identification errors. For example, giving a work plan the hierarchical structure of a research report. Other parameter deviations are only warnings. The reason is that real excellent works vary enormously. The “first is… second is…” pattern in research reports ranges from 0 to 20 occurrences, and one quarter of works do not use it at all. Among the best scene-writing pieces in the corpus, every single one fails the self-check on some common range. Good writing is not neat. Neat writing is often mediocre. So the script does not use averages as a pass line.
Research Process
The parameters come from full-corpus statistics of 1.02 million characters of real official documents, not from experience-based summary.
First, test popular beliefs. Most do not hold. Writing tools on the market follow the same path: give templates, give cliché lists, start with “According to… for the purpose of…” and end with “Please comply and implement.” When tested item by item against real excellent official documents, most of these assumptions fail:
The reversal is that templated “official document routines” are actually features of low-scoring documents. The truly stable commonalities are at the language construction level: average sentence length 53–56 characters (2–3 times that of self-media), long sentences near half, and dunhao density of 14–31 per thousand characters (4–5 times that of self-media). Official documents support long sentences through “A, B, C, D” parallel enumeration. This is their strongest language fingerprint. Differences between genres are also large enough to serve as criteria: the “first is… second is…” pattern differs 6-fold between work opinions and research reports. The only genre that heavily uses third-level headings is work plans.
Mistakes in statistics were not erased. They remain in the documentation. Using regex to extract features matches literal text without parsing semantics. This is the weakest link in the entire method chain. Five statistics were independently reviewed and overturned due to vocabulary defects. For example, “number naming method” was corrected from 84% to 60% due to quantifier contamination. “Mass attribution” was corrected from 30% to 9%. Their common structure is that operator coverage is wider than rule definition, and frequency numbers themselves do not indicate this gap. The rule established from this: any keyword statistic with coverage over 80% should first be treated as contaminated. Check each hit item before accepting it.
Sample essays also went through rework. The first batch of ten sample essays, after repeated review, was found to contain none that were truly written after reading the full corpus. All were written after retrieving the original text, cutting the first 700–1,200 characters, and extracting headings with regex. They only had the skeleton. Scenes and endings never entered the field of view. After auditing, six were rewritten, and four were judged to have no defects after comparison and retained. Full records are in Examples/README.md.
Known limitations. The corpus was removed entirely due to copyright and is not distributed with the skill. Frequency values cannot be directly verified by third parties. This is a substantive defect. Work plans (10 samples) and experience summaries (8 samples) have thin samples. Parameters are for reference only. Parameters solve “does it look like” but cannot manage “is it correct.” Whether the content holds up and whether political expression is appropriate cannot be verified by parameters. Classified and external messaging must be finalized by the unit’s own reviewer.
How to Use
Recommended: use it directly in Moxt. Repeated reading and sentence-by-sentence rewriting of long documents require the context capabilities of a workspace. It can also be installed locally:
git clone <this-repo> ~/.claude/skills/lieflat-gongwen
Or place the entire directory into your agent’s skills directory. Core capabilities have zero dependencies. The self-check script uses only the Python standard library.
SKILL.md defines a six-step workflow. Step 3 is the key:
1 Identify genre family → identify genre → set parameter row
2 Read the skeleton formula for the corresponding genre
3 Read the DNA document for the same genre + sample essays ← cannot skip
4 Produce skeleton, stop and wait for confirmation
5 Write body according to parameters
6 Run self-check, revise according to report
Step 3 is the dividing line between this skill and template-based tools. Abstract parameters cannot explain “how to stack parallel components” or “where to place transition sentences.” Seeing one real example is more effective than reading ten rules. Original sample texts are not distributed with the package (copyright). The substitutes are the DNA documents in 公文语料/ and 党建语料/ and the 22 synthetic sample essays in 示例/. Synthetic sample essays can only borrow structure and rhythm, not content.
Directory structure:
SKILL.md Entry: routing + six-step process + output contract
参数卡.md Required reading every time. One-page table of seven genres' parameters.
标题技法库.md Nine techniques × concentration gradients for four text types.
句子对照库.md Sentence-level comparison for eight genres.
scripts/check_params.py Numerical self-checker.
scripts/strip_meta.py Corpus quantification script (strips verbatim source text fields).
公文语料/ Four DNA documents + _meta numerical statistics (no verbatim source text).
党建语料/ Three DNA documents (including contemporary Party-building discourse vocabulary) + _meta numerical statistics.
示例/ 22 synthetic sample essays + rework audit.
Parameters 参数卡.md · Rule set SKILL.md · Self-checker scripts/check_params.py · Sample essays and audit 示例/
License PolyForm Noncommercial 1.0.0 (non-commercial use)
This project permits non-commercial use, modification, and redistribution only. Personal research, study, experimentation, educational institutions, public research institutions, and government agencies fall under permitted non-commercial use. Without separate written permission, you may not sell this project, use it for paid writing or consulting services, or integrate it into commercial products or commercial services. When redistributing or adapting, provide this license or a link to it.
This is a “source-available, non-commercial use” project, not open-source software in the OSI sense. For commercial use, contact the author for separate authorization first.

Quick-Start Checklist
- 🍄
Identify the genre family. Around 1,000 characters with zero first-level headings goes to the Party-building family. Everything else goes to the official document family. - 🍄
Identify the genre. Check the parameter card for sentence length, dunhao density, third-level heading count, and other parameters. - 🍄
Read the DNA document for the same genre and at least one sample essay. Do not skip this. - 🍄
Produce a skeleton and stop for confirmation. - 🍄
Write the body according to parameters. Use [To be filled: xx]for unverifiable numbers. - 🍄
Run scripts/check_params.py. Hard conflicts must be fixed. Parameter deviations are adjusted as needed. - 🍄
Classified content and external messaging must be finalized by your unit’s reviewer. - 🍄
Commercial use requires separate authorization from the author. Non-commercial use falls under PolyForm Noncommercial 1.0.0.
FAQ
Can this skill write notices, requests for instructions, replies, or letters?
No. Statutory documents with fixed templates are not covered. Their body structure is fixed, so there is no need to distill style through quantitative analysis.
Are the [To be filled: xx] placeholders unfinished?
No. They are intentional spots for local numbers. Corpus statistics found that 60%–72% of real official documents use no percentages at all. When you do not have verified data, it is feasible to support the article through logical depth. So this skill always leaves placeholders for unverifiable numbers and never fabricates them.
Will the self-check script flag parameter deviations as errors?
No. The script only flags hard conflicts such as genre identification errors. Other parameter deviations are warnings. Real excellent works vary enormously. Good writing is not neat. Neat writing is often mediocre.
How many times should the “first is… second is…” pattern be used?
There is no universal standard. In research reports, it ranges from 0 to 20 occurrences, and one quarter of works do not use it at all. It differs 6-fold between work opinions and research reports. It is one genre fingerprint, but the exact amount depends on content needs.
What is the difference between Party-building experience materials and the official document family?
Family identification depends only on length and first-level headings. The Party-building family is about 1,120 characters with zero first-level headings. It relies on verb-object topic sentences and direct quotes. The official document family has a median length of 2,500–3,700 characters with 2–5 first-level headings. Once a 1,000-character material adds multiple first-level headings, it becomes a compressed official document, and all parameters fall apart.
Why is the corpus not distributed with the skill?
Copyright. The corpus was removed entirely and is not distributed. Frequency values cannot be directly verified by third parties. This is a known substantive defect. The substitutes are DNA documents and synthetic sample essays.
Can synthetic sample essays be used directly?
Only their structure and rhythm can be borrowed, not their content. Synthetic sample essays are substitutes for verbatim corpus text. They show genre structure and language rhythm. Content must be replaced with actual material.
Does this skill guarantee that official document content is correct?
No. Parameters solve “does it look like” but cannot manage “is it correct.” Whether content holds up and whether political expression is appropriate cannot be verified by parameters. Classified and external messaging must be finalized by your unit’s own reviewer.
Can it be used in commercial projects?
Separate written permission is required. Without permission, you may not sell this project, use it for paid writing or consulting services, or integrate it into commercial products or commercial services. Personal research, study, experimentation, educational institutions, public research institutions, and government agencies fall under permitted non-commercial use.

