Legal Document Formatting logo

Legal Document Formatting

Community
vivy-yi
legal-document-formatting

法律文书格式适用——起草格式规范的民事/刑事判决书,或识别文书类型并套用对应格式。 适用情形:起草判决书/生成裁判文书/写民事判决书/写刑事判决书。 核心:识别民事vs刑事→按七段式顺序起草→在需要处调用对应原子技能。 这是GCL各场景的文书输出层,与judgment-document-generation互补(后者专注刑事+8步流程,前者覆盖民刑+分段落格式规范)。

Overview

Publishervivy-yi
RepositoryGreater-China-Legal
Skill namelegal-document-formatting
Stars
49
Forks
9
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 vivy-yi on GitHub. Read the source before you install it.

Installation

Install the Legal Document Formatting 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/vivy-yi/Greater-China-Legal/tree/main/plugins/legal-documents/legal-document-formatting
  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/vivy-yi/Greater-China-Legal.git /tmp/Greater-China-Legal
mkdir -p .claude/skills
cp -r /tmp/Greater-China-Legal/plugins/legal-documents/legal-document-formatting .claude/skills/legal-document-formatting
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Legal Document Formatting 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 Legal Document Formatting 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 Legal Document Formatting 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.

/legal-document-formatting — 法律文书格式适用

第一步:判断文书类型

判断规则:
- 起诉主体是人民检察院 → 刑事
- 核心争议是是否构成犯罪 → 刑事
- 起诉主体是自然人/法人 → 民事
- 核心争议是民事权利义务 → 民事

若材料不足 → 暂停,要求补充

民事判决书七段式

A-1. 标题

XX省XX市中级人民法院
民事判决书
(2024)X民初字第XXX号

A-2. 首部——当事人与审理经过

原告:XXX,男/女,XXXX年XX月XX日出生,...
被告:XXX,...
委托诉讼代理人:XXX,XX律师事务所律师

案件由来:...
审理经过:立案日期、适用程序、开庭方式、出庭人员

A-3. 事实部分

(1)诉辩意见

原告诉称:...
被告辩称:...
第三人述称:...

(2)举证质证概述

本案当事人围绕诉讼请求依法提交了证据,本院组织当事人进行了证据交换和质证。

(3)证据认定与事实认定

- 无争议证据:直接确认
- 争议证据:调用 evidence-evaluation,逐项评估三性与证明力
- 事实认定:按时间顺序叙述

A-4. 理由部分("本院认为")

本院认为,[核心法律问题]:

1. 关于[争点一]
   调用 dispute-issue-identification → 确定纠纷性质
   调用 legal-article-retrieval → 援引法律条文

2. 关于[争点二]
   调用 deductive-reasoning → 演绎推理

A-5. 判决主文

判决如下:
一、...
二、...
三、...

A-6. 尾部

审判长:XXX
审判员:XXX
人民陪审员:XXX
XXXX年XX月XX日
书记员:XXX

刑事判决书格式

B-1. 首部

XX人民法院
刑事判决书
(2024)X刑初字第XXX号

B-2. 正文

公诉机关:XX人民检察院
被告人:...

辩护人:...

本院受理后,依法组成合议庭/独任审判,公开/不公开开庭审理了本案。现已审理终结。

B-3. 事实部分

经审理查明:...

B-4. 理由部分

本院认为:...

B-5. 判决主文

判决如下:
一、被告人XXX犯XX罪,判处...

引用说明

本skill方法论来自 THUYRan/Legal-Skills-Chinese/legal-document-formatting, THUYRan原版16700字,GCL精简至约180行。

Frequently asked questions

What does the Legal Document Formatting AI skill do?

法律文书格式适用——起草格式规范的民事/刑事判决书,或识别文书类型并套用对应格式。 适用情形:起草判决书/生成裁判文书/写民事判决书/写刑事判决书。 核心:识别民事vs刑事→按七段式顺序起草→在需要处调用对应原子技能。 这是GCL各场景的文书输出层,与judgment-document-generation互补(后者专注刑事+8步流程,前者覆盖民刑+分段落格式规范)。

Why use Legal Document Formatting on TypingMind?

Because you install it once and use it with any model. Legal Document Formatting 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 Legal Document Formatting in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/vivy-yi/Greater-China-Legal/tree/main/plugins/legal-documents/legal-document-formatting. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Legal Document Formatting?

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 Legal Document Formatting?

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

Is the Legal Document Formatting AI skill free?

It is published on GitHub by vivy-yi. 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 👇