Doc Type Routing logo

Doc Type Routing

Community
zhaohui-yang
doc-type-routing

在起草前判定「该用哪个文种、什么行文方向」。Use when 不确定该写通知/报告/请示/函/通报/意见/决定…,或需要判断上行/下行/平行/公开、要不要对方回复。按「行文方向+目的+是否需回应」三维收敛到正确文种,再交给「公文写作」起草。是流程第一步的判定脚手架,不生成正文。

Overview

Publisherzhaohui-yang
Repositoryofficial-document-drafting
Skill namedoc-type-routing
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 Doc Type Routing 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/doc-type-routing
  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/doc-type-routing .claude/skills/doc-type-routing
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Doc Type Routing 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 Doc Type Routing 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 Doc Type Routing 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.

文种与行文方向判定

公文写作最易错、又最该先定的第一步:选错文种,后面写得再好也白搭(报告写成请示、函写成通知、决定与决议混用)。本 skill 把这一步结构化,判定后再交给根 SKILL.md(公文写作)起草。

文件索引

prompts/core/workflow.md            # 判断流程与文种路由规则(主源)
prompts/core/drafting-thinking.md   # 易混文种三维辨析、行文方向与谋篇对应(主源)
docs/references/document-types.md        # 各文种适用场景与边界说明(读者文档)

三维判定法

  1. 行文方向:上行(向上级)/下行(向下级)/平行或不相隶属/对外公开。
  2. 目的:请求批准、汇报情况、部署执行、答复、告知、商洽、记载、提请审议、公布。
  3. 是否需对方回应:需批复(请示)、需审议(议案)、本身即回应(批复/复函)、不强制(报告/通知/通报)。

三者一旦确定,文种基本唯一收敛。

快速路由

  • 请求上级批准 → 请示(一文一事、只主送一个上级,结尾「妥否,请批示」)
  • 答复下级请示 → 批复(先引来文标题与文号)
  • 向上级汇报、不要求回复 → 报告(不夹带请批事项)
  • 部署/传达执行、批转转发 → 通知
  • 提原则与办法 → 意见;重大决断/奖惩 → 决定;会议表决通过 → 决议
  • 不相隶属或平行机关商洽/询问/答复/请批准 → 函
  • 对外宣布重要或法定事项 → 公告;一定范围须遵守事项 → 通告
  • 会议议定事项 → 纪要;政府向同级人大提请审议 → 议案
  • 整理新闻动态/专题情况(非法定公文)→ 简报/情况专报/汇报材料

高频易错辨析

  • 报告 vs 请示:报告汇报、不要回复、可综合;请示请批准、必须等批复、一文一事。报告内不得夹带请批事项。
  • 决定 vs 决议:决定可机关直接作出;决议必经会议表决、以会议名义发布。
  • 通报 vs 通告:通报对内(表彰/批评/告知);通告对外(公布须遵守事项、带强制)。
  • 公告 vs 通告:公告对国内外宣布重要/法定事项、机关层级较高;通告面向一定范围。
  • 函 vs 通知/请示:不相隶属或平行机关一律用函,不因事项重要升格。

无 agent 环境(网页/离线)

  • 本 skill 是纯判定、不联网,其判据全部来自 prompts/core/workflow.md 与 prompts/core/drafting-thinking.md,而这两份已整体内联进离线系统提示词。
  • 因此无 agent/skill 环境时无需额外操作:粘贴 dist/offline/default/system_prompt.md即已包含文种与行文方向判定指引,可直接让模型先判文种再起草。

边界

  • 只做文种与方向判定,不生成正文;判定后交「公文写作」按对应 spec.md 起草。
  • 判据一律以 prompts/core/workflow.md、prompts/core/drafting-thinking.md 主源为准,本 skill 不复制规则。
  • 成稿后若要核对文种、结尾用语、章节是否齐全,转 document-qa(src/scripts/check_sections.py)。

Frequently asked questions

What does the Doc Type Routing AI skill do?

在起草前判定「该用哪个文种、什么行文方向」。Use when 不确定该写通知/报告/请示/函/通报/意见/决定…,或需要判断上行/下行/平行/公开、要不要对方回复。按「行文方向+目的+是否需回应」三维收敛到正确文种,再交给「公文写作」起草。是流程第一步的判定脚手架,不生成正文。

Why use Doc Type Routing on TypingMind?

Because you install it once and use it with any model. Doc Type Routing 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 Doc Type Routing in TypingMind?

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

Which AI models can use Doc Type Routing?

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 Doc Type Routing?

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

Is the Doc Type Routing 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 👇