Document Qa logo

Document Qa

Community
zhaohui-yang
document-qa

对已成稿的中文公文做结构与质量校验。Use when the user wants to check/review/lint a 公文 draft——校验章节是否齐全、标题层级是否跳级或混编、篇幅与标题深度是否匹配、一是/二是 是否被误用为正式标题、文种是否用对、结尾用语是否匹配、有无未经提供的事实。是「检查」而非「起草」。

Overview

Publisherzhaohui-yang
Repositoryofficial-document-drafting
Skill namedocument-qa
Stars
148
Forks
19
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by zhaohui-yang on GitHub. Read the source before you install it.

Installation

Install the Document Qa AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/zhaohui-yang/official-document-drafting/tree/main/skills/document-qa
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/zhaohui-yang/official-document-drafting.git /tmp/official-document-drafting
mkdir -p .claude/skills
cp -r /tmp/official-document-drafting/skills/document-qa .claude/skills/document-qa
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Document Qa in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Document Qa on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Document Qa is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

公文质检

对已成稿的中文公文做结构与质量校验。和「起草」相反方向:不生成内容,只检查稿子哪里不齐、哪里不规范。

文件索引

src/scripts/check_sections.py        # 章节齐全度 + 层级结构 + 篇幅自动校验(CLI)
docs/references/style-rules.md         # 「质量检查清单」与行文规范(人工核对项)
prompts/core/doc-type-guardrails.md  # 防编造强制约束(事实性核对的依据)
prompts/doc-types/<id>-<文种>/spec.md  # 各文种应有板块与职责(结构核对依据)

自动校验(脚本)

src/scripts/check_sections.py 覆盖全部 22 个文种(与 assets/templates/ 下 22 份文种模板一一对应),自动检查:

  • 章节齐全度:缺少约定板块直接报错。
  • 层级结构:标题跳级、一是/二是/三是 被当正式标题、10 页以内却下钻到三级标题等给出提醒。
  • 内容机检:占位符残留、结尾用语是否与文种匹配。
  • 格式红线(GB/T 9704):发文字号是否用六角括号〔〕且不加「第」不补零、成文日期月日是否补零、标题是否误加句号、是否残留「主题词」。
  • 0 幻觉审计(--strict-facts):列出成稿里非占位的具体值(文号/日期/百分比/金额/数量),供逐项核对来源——把「不编造」从口号变成可核对清单;提示性、不影响退出码。
  • --strict-structure 把结构提醒按错误处理。
bash
python3 src/scripts/check_sections.py notice 成稿.md
python3 src/scripts/check_sections.py report 成稿.md --strict-structure
python3 src/scripts/check_sections.py report 成稿.md --strict-facts   # 0 幻觉核对:列出具体值供查来源

人工核对(清单)

脚本覆盖不到的语义项,按 docs/references/style-rules.md 的「质量检查清单」逐条核对:

  • 文种是否正确、行文方向是否合理
  • 标题是否单一聚焦、有无不必要标点或回行不当
  • 段落层级是否清楚、结尾用语是否匹配文种
  • 落款和日期是否齐全、日期书写是否规范
  • 是否出现未经用户提供的事实、数据、依据(对照 prompts/core/doc-type-guardrails.md)

默认流程

  1. 判断稿子文种 → 先跑 check_sections.py <文种> 成稿.md 拿结构结论(22 个文种均覆盖)。
  2. 再加 --strict-facts 跑一遍 0 幻觉审计,拿到「非占位具体值」清单,逐项核对是否有可核实来源(无来源的应改占位或标「待核实」)。
  3. 再按「质量检查清单」做语义核对。
  4. 输出「缺什么板块 / 哪里结构不规范 / 哪些具体值疑似无依据」,并指明对应主源规则。
  5. 只报问题与依据,不擅自改写;需要修订时交回「公文写作」skill。

边界

  • 脚本覆盖全部 22 个文种的必备章节,但只校验结构、不判断语义;内容是否成立仍需人工核对清单。
  • REQUIRED_SECTIONS 只收必备板块,(可选) 板块(附件、附注等)不计;章节名以模板主源 spec.md 为准,若脚本与模板脱节,以 spec.md 为准并视为脚本待补项(tests/test_template_sections.py 守护两者同步)。

Frequently asked questions

What does the Document Qa AI skill do?

对已成稿的中文公文做结构与质量校验。Use when the user wants to check/review/lint a 公文 draft——校验章节是否齐全、标题层级是否跳级或混编、篇幅与标题深度是否匹配、一是/二是 是否被误用为正式标题、文种是否用对、结尾用语是否匹配、有无未经提供的事实。是「检查」而非「起草」。

Why use Document Qa on TypingMind?

Because you install it once and use it with any model. Document Qa is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Document Qa in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/zhaohui-yang/official-document-drafting/tree/main/skills/document-qa. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Document Qa?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Document Qa?

As many as you like. As long as a model supports skills, you can use Document Qa with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Document Qa AI skill free?

It is published on GitHub by zhaohui-yang. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇