WeChat Policy Pack
Script Path
__SKILL_ROOT__ is the directory containing this SKILL.md file.
Before executing any shell command in this document, you MUST replace __SKILL_ROOT__/scripts/ with the absolute path to the scripts/ directory under this SKILL.md's parent.
Core Rules
Only extract information explicitly present in the provided source material.
Do not invent, infer from common sense, fill gaps, or add background knowledge. If a field is absent, write 未明确 or leave it blank if the user requires blank fields.
Treat these fields as high risk:申报截止时间,奖补金额,联系方式,主管部门,申报对象,申报条件,申报入口. Do not infer, merge, simplify, or omit limiting language for these fields.
Preserve limiting words from the source, including 最高, 不超过, 可, 拟, 择优, 原则上, 视情况, 按规定, 按程序, 符合条件. Do not convert conditional, upper-limit, selective, or procedural support into a guaranteed benefit.
Use a formal, clear, restrained style suitable for an enterprise policy information public account. Avoid marketing copy, clickbait, exaggeration, and unsupported claims about policy value.
Make one-page infographic copy short, modular, and easy to lay out in a long image.
Generate a real long-image PNG when the user asks for an一图流,长图,公众号图片,参考图 style output, or a complete publication package. Do not stop at copywriting.
Always audit the generated content for fabrication, exaggeration, omissions, and items requiring human confirmation.
Always include this final reminder exactly: 具体申报要求以官方通知为准.
Source Priority
Prefer official and primary sources in this order:
- Official notice, government website,主管部门 website, and formal attachments.
- Official public account of a government or主管部门.
- Third-party public-account article, repost, summary, or media article.
If the input is not an official source, state in the audit report: 来源非官方,需核验官方通知.
Treat attachments as equally important as the main notice. Many政策 fields may appear only in appendices, forms, implementation rules, or申报指南. Check attachments before marking a field as 未明确.
When sources conflict, prefer the higher-priority source. If sources have the same priority or the conflict cannot be resolved, mark the field as 需人工确认 and describe the conflict.
Evidence Rules
Create an internal fact table before drafting. For every key field, bind the fact to evidence from the source.
Evidence should include as much location detail as available:
- Source title or file name
- Attachment name
- Page number, paragraph, section title, table row, URL position, or screenshot/OCR location
- Short source phrase that supports the extracted fact
If no evidence can be located, do not use the fact as a confirmed statement. Mark it as 未明确.
For high-risk fields, use the exact source wording where possible, especially dates, amounts, organization names, phone numbers, email addresses,申报入口, and eligibility limitations.
Data Acquisition — Agent's Responsibility
This skill handles document → content transformation only. Policy discovery and data crawling is the agent's own responsibility.
The agent should use whatever tools it has available to find and acquire policy documents before invoking this skill:
- WebSearch — search for recent policy notices by keyword + region
- User-provided URLs — the user directly shares an official policy link
- User-provided text — the user pastes or uploads policy content
- Connector skills — the agent's own data-fetching skills (e.g., custom crawlers, API connectors)
- This skill's helper scripts — discover_policies.py and fetch_policy_document.py (optional, see below)
The minimum input this skill requires is a policy document URL or text content. As long as the agent can provide that, the skill can produce the full output package.
Optional Helper Scripts (fallback only)
If the agent has no other way to discover or fetch policies, these scripts can assist — but they are not the primary or recommended approach. The agent should prefer its own skills and WebSearch first.
discover_policies.py (optional) — searches the 国务院政策文件库 and registered provincial sites for policy candidates. Accepts --scope with any province name (e.g. 四川, 广东) or 全国 / auto. Registered local sources (currently: 四川科技厅 + 四川经信厅) activate automatically when scope matches.
python3 __SKILL_ROOT__/scripts/discover_policies.py \
--keyword "专精特新" \
--scope 全国 \
--limit 8 \
--output-root output \
--insecure
fetch_policy_document.py (optional) — fetches a single policy URL and saves HTML + text + DOCX to the run's 00-source/ directory. Use only after the user selects a candidate.
python3 __SKILL_ROOT__/scripts/fetch_policy_document.py \
--url "官方政策链接" \
--out-dir output/<主题>-<日期>/00-source \
--basename <主题>-<日期> \
--insecure
Add --insecure only when the target government site has SSL issues.
The DOCX output is an official-document reading copy: A4 page, centered title, source metadata, Chinese公文-style body paragraphs, first-line indentation, and attachments appended after正文. Do not rewrite, summarize, interpret, or add unsupported material inside this DOCX.
The discovery and fetch scripts are helpers, not fact sources. The final article and image must be based on the official document text, attachments, and evidence table — regardless of how the document was obtained.
Workflow
- Ask for direction and region — If the user has not specified a policy topic/direction and geographic scope, ask them first. Do not begin data acquisition without knowing what to look for and where.
- Acquire policy document with agent's own tools — The agent uses its own tools (WebSearch, WebFetch, connectors, user-provided link/text) to find and fetch the policy document. The skill's helper scripts (
discover_policies.py,fetch_policy_document.py) are fallback only — use them only when the agent has no other data acquisition capability. - Select and confirm — If multiple candidates exist, present them to the user for selection. Read previous
output/runs and deduplicate against existing content. - If the task includes a long image or public-account image, run the style preflight before visual design. If no reference image, style description, or explicit
你自行决定authorization is present, ask for style first and do not generate HTML or PNG yet. - Create a unique run folder under
output/using the naming rule below. - Read all provided or fetched source materials, including正文,附件, tables, footnotes, forms, and OCR text if available.
6a. For fetched web policies, ensure00-source/<主题>-<日期>-policy-document.docxexists. If the source was provided as text, HTML, PDF, or OCR instead of fetched byfetch_policy_document.py, create the same DOCX manually from the exact source正文 and keep it source-faithful. - Identify the source type and officialness. Note whether any material is non-official or secondary.
- Build
facts.jsonbefore drafting. Treat it as the single source of truth. - Extract policy key information, leaving absent fields as
未明确. - Draft the public-account top summary with restrained wording.
- Draft long-image modules from facts only.
- Generate
long-image.htmlwith deterministic HTML/CSS only after style is confirmed. - Render
long-image.pngfromlong-image.htmlwith browser automation. Prefer Playwright full-page screenshots when available; otherwise use__SKILL_ROOT__/scripts/render_long_image.mjs. - Draft the factual audit report, including score, risks, missing fields, and manual-confirmation items.
- Draft the Markdown publishing article with the generated image embedded.
- Run visual and factual checks. If the PNG is missing, blank, cropped, unreadable, or inconsistent with
facts.json, fix it before claiming completion. - Self-check every generated claim against the evidence table. Remove unsupported content before final output.
Output Management
Write generated files only under the current workspace output/ folder. Do not place generated deliverables directly in the workspace root.
Create one unique run folder per task:
output/<主题>-<日期>/
Use the policy or project short name for <主题>. Use the policy release date when the source clearly states it; otherwise use the generation date. Format dates as YYYYMMDD. If the folder already exists, append -v2, -v3, or a timestamp. Never overwrite an existing run folder.
Use this fixed structure:
output/<主题>-<日期>/
├── 00-source/
│ ├── <主题>-<日期>-source-extract.txt
│ ├── <主题>-<日期>-policy-document.docx
│ └── <主题>-<日期>-source-index.json
├── 01-facts/
│ └── <主题>-<日期>-facts.json
├── 02-article/
│ └── <主题>-<日期>-公众号发布稿.md
├── 03-long-image/
│ ├── <主题>-<日期>-long-image.html
│ └── <主题>-<日期>-long-image.png
├── 04-audit/
│ ├── <主题>-<日期>-fact-audit.md
│ └── <主题>-<日期>-visual-check.md
├── tmp/
└── manifest.json
Use scripts/init_run.py to create the folder structure and initial manifest:
python3 __SKILL_ROOT__/scripts/init_run.py \
--output-root output \
--theme "政策短名" \
--date YYYYMMDD
init_run.py automatically keeps only the newest 12 run folders under output/. This supports about four weeks of publishing at three public-account articles per week. Older run folders with a manifest.json are deleted and recorded in output/.cleanup-log.jsonl. Use --keep-runs N to change the limit, or --no-cleanup only when the user explicitly asks to preserve all runs.
You can also run cleanup manually:
python3 __SKILL_ROOT__/scripts/cleanup_outputs.py \
--output-root output \
--keep 12
The cleanup script must only delete direct child run folders under output/ that contain manifest.json. It must not touch skills/, archive/, user source files, or arbitrary folders.
All filenames inside the run folder must follow 主题+日期+类型. Examples:
专精特新中小企业认定-20260310-facts.json专精特新中小企业认定-20260310-policy-document.docx专精特新中小企业认定-20260310-公众号发布稿.md专精特新中小企业认定-20260310-long-image.png
Temporary files may only be written under output/<run>/tmp/. At task completion, delete temporary files or list leftovers in manifest.json.
When organizing old outputs, copy only. Do not move, delete, or overwrite historical files. Record original and copied paths in manifest.json.
Automatic cleanup is for generated output/ runs only. It is not a source-file retention system.
Style Preflight
When the user requests a long image, one-page infographic, public-account image, or reference-image style output, confirm visual style before creating long-image.html or long-image.png.
Style is confirmed only when one of these is true:
- The user provides an accessible reference image.
- The user clearly describes reusable visual traits, such as
政务蓝白,极简商务,科技感,红色党建, or another concrete style. - The user explicitly says
你自行决定风格or equivalent.
If style is not confirmed, ask exactly one concise question before visual work:
> 请提供参考图片,或口述长图风格(如政务蓝白、极简商务、科技感、红色党建等)。如果没有偏好,也可以回复“你自行决定”。
Before style confirmation, you may inspect source documents and prepare facts only if doing so helps the task, but do not create visual design, long-image.html, screenshots, or PNGs.
Record style in manifest.json:
{
"style": {
"style_source": "reference_image | user_description | agent_default_confirmed",
"style_description": "",
"style_confirmed_by_user": true,
"reference_image_count": 0,
"reference_image_ids": []
}
}
For reference images, borrow only general layout traits, hierarchy, color tendency, module rhythm, information density, card style, and numbering style. Do not copy identifiable brands, watermarks, account identity, avatars, proprietary decoration systems, commercial packaging, or text unrelated to the current policy.
Required Deliverables
For a complete one-page-flow package, create these files in the run folder:
00-source/<主题>-<日期>-policy-document.docx: source-faithful policy original正文 in Chinese official-document Word format.01-facts/<主题>-<日期>-facts.json: evidence-backed structured facts.02-article/<主题>-<日期>-公众号发布稿.md: public-account title, top summary, long-image embed, source/attachment notes, and final reminder.03-long-image/<主题>-<日期>-long-image.html: editable HTML/CSS source for the long image.03-long-image/<主题>-<日期>-long-image.png: rendered long-image infographic.04-audit/<主题>-<日期>-fact-audit.md: factual audit report.04-audit/<主题>-<日期>-visual-check.md: image generation and visual QA result.manifest.json: run metadata, source files, outputs, style confirmation, temporary files, and status.
If the user only asks for copy and explicitly says not to generate images, omit long-image.png; otherwise image generation is required.
manifest.json Schema
Use this minimum schema:
{
"run_id": "",
"policy_short_name": "",
"date": "YYYYMMDD",
"created_at": "",
"status": "draft | complete | failed",
"source_files": [],
"outputs": {
"source_extract": "",
"source_index": "",
"policy_document_docx": "",
"facts": "",
"article": "",
"long_image_html": "",
"long_image_png": "",
"fact_audit": "",
"visual_check": ""
},
"style": {
"style_source": "reference_image | user_description | agent_default_confirmed",
"style_description": "",
"style_confirmed_by_user": true,
"reference_image_count": 0,
"reference_image_ids": []
},
"copied_from": [],
"tmp_files": [],
"notes": []
}
facts.json Schema
Create a JSON object with:
{
"meta": {
"source_type": "official_notice | official_public_account | third_party_article | other",
"source_file": "",
"source_title": "",
"officialness_note": ""
},
"facts": [
{
"field": "政策/项目名称",
"value": "",
"evidence": "",
"source_location": "",
"risk_level": "low | medium | high",
"use_in_long_image": true,
"use_in_article": true,
"manual_review": false
}
],
"modules": [
{
"title": "",
"items": ["短句"],
"evidence_fields": ["政策/项目名称"],
"risk_note": ""
}
]
}
Include these fact fields when applicable:
- 政策/项目名称
- 地区
- 发文机关/主管部门
- 文号
- 发布日期
- 施行日期/有效期
- 申报截止时间
- 申报对象/适用对象
- 申报条件
- 支持政策
- 金额/比例/门槛
- 申报材料
- 申报流程/操作流程
- 联系方式
- 申报入口
- 附件/原文链接
Every fact used in the article or image must appear in facts.json. Do not put content in long-image.html or 公众号发布稿.md if it is absent from facts.json.
Required Output Structure
Use this fixed order unless the user asks for another format.
1. 政策关键信息提取
Output a table with these columns: 字段, 内容, 来源依据, 风险提示.
Include every field below:
- 政策/项目名称
- 地区
- 发布部门/主管部门
- 申报截止时间
- 申报对象
- 申报条件
- 支持政策
- 奖补金额
- 申报材料
- 申报流程
- 联系方式
- 附件信息
2. 原文摘要
Summarize only the source content. Do not add policy背景, industry interpretation, or expected benefits unless explicitly stated in the source.
3. 公众号顶部简述
Write 1-3 short paragraphs. Keep it factual and restrained. Mention important application time, object, support, and caution items only when source evidence exists.
4. 一图流标题
Use a clear informational title. Do not use clickbait or exaggerated wording.
5. 一图流模块内容
Use short, layout-friendly modules. These are candidate modules, not mandatory sections. Select only modules supported by facts.json:
- 政策名称
- 适用地区
- 申报对象
- 时间节点
- 支持方式
- 奖补标准
- 申报条件
- 申报材料
- 申报流程
- 联系方式
- 附件清单
- 重点提醒
Each module should use short phrases or bullet points. If a module lacks source support, hide it, write 原文未明确, or move it into risk reminders. Do not fill it creatively for visual completeness.
5b. 长图图片
Generate long-image.html and long-image.png.
Use deterministic HTML/CSS for all text-heavy long images. Do not use AI image generation for policy long-image text because dates, amounts, department names, and phone numbers must remain exact.
Recommended visual pattern:
- Width: 900-1080 px; use 960 px by default.
- Background and color scheme: match the user's confirmed style (e.g., light政务蓝白 with white cards, dark科技感 with deep blue/cyan accents, or red党建 theme).
- Top block: policy tag, concise title, source/date line if supported by facts.
- Modules: numbered section labels styled to the chosen theme, card-based content, short bullets, key-number cards, time reminder cards, risk reminder cards.
- Typography: readable on mobile; body font no smaller than 24 px at 960 px width, line-height at least 1.55.
- Spacing: generous card padding and vertical gaps; avoid nested cards inside cards.
- Height: content-driven. Increase height rather than shrinking text.
- Footer: include
具体申报要求以官方通知为准.
Render with browser automation:
node __SKILL_ROOT__/scripts/render_long_image.mjs \
--input output/<主题>-<日期>/03-long-image/<主题>-<日期>-long-image.html \
--output output/<主题>-<日期>/03-long-image/<主题>-<日期>-long-image.png \
--width 960
Validate with:
python3 __SKILL_ROOT__/scripts/validate_long_image.py \
--image output/<主题>-<日期>/03-long-image/<主题>-<日期>-long-image.png \
--min-width 900 \
--max-width 1080 \
--min-height 1600 \
--min-size-kb 80
Also visually inspect the PNG. Confirm that the image is nonblank, not cropped, not overlapped, and readable on a phone-width view.
6. 事实审核报告
Include:
- 审核评分
- 风险问题
- 修改建议
- 编造风险
- 夸大风险
- 遗漏风险
- 需人工确认的信息
- 来源官方性判断
Score using 100 points:
- 事实忠实度: 45 points
- 高危字段准确性: 25 points
- 完整性与遗漏控制: 15 points
- 表述克制程度: 10 points
- 风险标注充分性: 5 points
If the score is below 90, first try to correct unsupported or exaggerated content. If low score is caused by missing or unclear source material, keep the lower score and clearly list items needing human confirmation. Never raise the score by inventing missing information.
7. Markdown 发布稿
Provide a complete Markdown draft with this structure:
# 公众号标题
## 公众号开头简述
1-3段可直接放在公众号正文开头的简述。必须放在长图前,概括发布机关、申报对象、关键时间/入口、重要限制或风险提示;只使用 `facts.json` 中已有事实,不写行业背景、政策价值解读或无依据提醒。

## 附件与原文
- 原文/附件:
## 事实审核摘要
具体申报要求以官方通知为准
Keep detailed fact tables and long audit sections in fact-audit.md unless the user asks to include them in the public-account body.
Visual QA
Do not claim the package is complete until:
long-image.pngexists.- PNG width is 900-1080 px unless the user requested another width.
- PNG file size is not abnormally small.
- The long image includes the exact final reminder.
- Critical facts in the image match
facts.json. - Missing high-risk facts remain
未明确or are hidden; they are not invented. - No marketing or promise language has been introduced.
- Long content is split into modules rather than compressed into unreadable text.
Final Response
After completing the full workflow, reply with a concise delivery checklist, verification evidence, and risk reminders. Include links to these files when they exist:
- 政策原文 Word:
00-source/<主题>-<日期>-policy-document.docx - 事实表 JSON:
01-facts/<主题>-<日期>-facts.json - 公众号发布稿:
02-article/<主题>-<日期>-公众号发布稿.md - 长图 PNG:
03-long-image/<主题>-<日期>-long-image.png - 事实审核报告:
04-audit/<主题>-<日期>-fact-audit.md - 视觉检查报告:
04-audit/<主题>-<日期>-visual-check.md
State that policy-document.docx is the source-faithful Word copy of the policy original text. State that 公众号发布稿.md includes ## 公众号开头简述 for direct public-account opening copy.
Include the long-image validation evidence: PNG dimensions, approximate file size, and validation status. If the environment supports local image display, embed the generated PNG preview with an absolute filesystem path.
Always include unresolved risks, such as non-official sources, scanned attachments without OCR, missing high-risk fields, or items requiring manual confirmation.
End the final response with this exact reminder: 具体申报要求以官方通知为准.
Writing Boundaries
The publishing draft may be polished for readability, but the audit report must keep evidence, risks, missing items, and manual-confirmation items. Do not collapse the audit into a vague conclusion.
Do not write titles such as 重磅, 速看, 必看, 重大利好, 官方定了, 最高可领, 最高补贴轻松拿, 企业必看, 错过等一年 unless those words appear in the source and are necessary to quote. Prefer neutral titles such as 关于XX政策申报要点的整理.
Do not say an enterprise 可获得, 将获得, 直接奖励, or 确保通过 unless the source explicitly guarantees that outcome. Prefer source-faithful language such as 符合条件的企业可按通知要求申报, 最高不超过..., 择优支持, or 按规定给予支持.