CSlawyer1985/legal-skillhub / skills/appeal-docs-generator
appeal-docs-generator
Verified民事二审上诉文本成套生成技能。上传一审判决书后,以民诉法为尺子逐条审查原审判决是否错误(期限/主体程序/诉请判项比对/三段论/说理/新要素六诊),结合元典连接器检索现行有效法条与类案,并做一次「当事人是否已逐条确认事实认定错误、有无新证据」的事实核对互动,最终一次生成民事上诉状、二审证据清单、支持上诉请求的法条与类案检索报告、二审授权委托书、所函、二审接待笔录、待确认事实清单等全套文本。上诉状严格套用德恒格式母版(黑体18pt居中标题/仿宋14pt正文/1.5倍行距),格式100%保留。另提供 scan 轻出口,只做上诉可行性评估与上诉费测算,不出全套文书。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 25.4 KB |
| _meta.json | config | 114 B |
| references/templates-b64.json | config | 148.9 KB |
| references/yuandian_tools_guide.md | markdown | 2.2 KB |
| references/上诉状填充字段表.md | markdown | 4.6 KB |
| references/二审风险告知要点.md | markdown | 2.2 KB |
| references/元典检索姿势.md | markdown | 4.1 KB |
| references/判决书解剖清单.md | markdown | 8.4 KB |
| references/当事人事实核对清单.md | markdown | 4.0 KB |
| references/所函模板.md | markdown | 1.2 KB |
| references/授权委托书模板.md | markdown | 1.7 KB |
| references/接待笔录模板.md | markdown | 4.1 KB |
| references/文件清单及盖章指引模板.md | markdown | 3.3 KB |
| references/检索报告模板.md | markdown | 3.1 KB |
| references/模板与排版规范.md | markdown | 5.5 KB |
| references/民诉法审查尺子表.md | markdown | 9.1 KB |
| scripts/appeal_fee_calc.py | script | 6.3 KB |
| scripts/build_pending_facts_docx.py | script | 6.9 KB |
| scripts/deadline_check.py | script | 5.0 KB |
| scripts/fill_appeal_docx.py | script | 9.8 KB |
| scripts/generate_file_list.py | script | 7.8 KB |
| scripts/render_docx.py | script | 8.6 KB |
| scripts/restore_templates.py | script | 5.7 KB |
references/模板与排版规范.md
View on GitHub<!-- Maintained by Lu Lingyan, Deheng (Wuxi) Law Firm. -->
# 模板系统与排版规范(本技能附属参考)
> 从 SKILL.md 正文移出的**知识性**内容:AI 只在「改模板 / 排疑格式细节 / 排查变量错配」时才需要读。
> 执行生成流程时**不必**读本文件——各模板的 YAML frontmatter 已自带格式声明。
## 一、模板结构
每个 `references/*.md` 模板由两部分组成:
1. **YAML frontmatter**(`---` 之间的部分)— 定义所有格式规则
2. **Markdown 正文**(`---` 之后的部分)— 定义内容结构和变量占位符
## 二、格式约定(YAML 头中的 style 标签)
| 标签 | 说明 | 典型用途 |
|------|------|---------|
| `#` | 文书标题 | 18pt 宋体 bold 居中 |
| `##` | 段落标题 | 16pt 宋体 bold,无缩进,前间距 8pt。用于:原告、被告、诉讼请求、事实与理由、申请人、被申请人、请求事项、事实及理由、委托人、受托人 |
| `body` | 正文 | 14pt 仿宋,首行缩进 28pt(空两格),1.5 倍行距 |
| `cizhi` | "此致"行 | 继承 body 格式,额外 `gap_before: 6pt` |
| `court` | 法院名称 | 14pt 仿宋,**不缩进(顶格)** |
| `sign` | 签名/盖章行 | 14pt 仿宋,右对齐 |
| `date` | 日期行 | 14pt 仿宋,右对齐,模板 `{year}年 月 日` |
| `note` | AI 声明 | 14pt 仿宋,首行缩进 |
## 三、缩进约定
| 值 | 含义 |
|----|------|
| `indent: false` | 顶格(不缩进),用于:`##` 标题、法院名称 |
| `indent: true` | 使用默认缩进 28pt(空两格),用于:body、cizhi |
| `indent: 28pt` | 显式指定缩进量 |
## 四、内联标签
Markdown 正文中可用以下标签覆盖默认样式:
| 标签 | 功能 |
|------|------|
| `[sign]文字` | 右对齐签名 |
| `[date]` | 日期(取 `{year}` 变量) |
| `[court]法院名` | 顶格法院行 |
| `[note]文字` | AI 声明注释 |
| `[meta]文字` | 无缩进元数据行(笔录头部) |
| `[qa_gap]` | Q&A 段落间小间隔 |
## 五、变量替换
模板中所有 `[变量名]` 会被替换为实际值。变量名在 `[` `]` 之间**不包含标签文本**。
- ✅ 正确:`文书送达地址:[原告文书送达地址]`,变量名 = `原告文书送达地址`
- ❌ 错误:`[文书送达地址:送达地址]`,变量名 = `文书送达地址:送达地址`(包含了标签)
**案由变量**:模板中写 `[案由]一案`,变量值应为 `民间借贷纠纷`(不含"纠纷"后缀),避免出现 `民间借贷纠纷纠纷一案`。
## 六、段落标题统一性
起诉状中 `## 原告:`、`## 被告:`、`## 诉讼请求:`、`## 事实与理由:` 属于同一级别,全部使用 16pt 宋体 bold。保全申请书中 `## 申请人:`、`## 被申请人:`、`## 请求事项:`、`## 事实及理由:` 同理。
当事人的详细信息(如法定代表人、地址等)应放在 `##` 标题行**之后**的 body 行中,而非嵌入标题行内。
示例:
```markdown
## 原告:[原告姓名/名称],[原告基础信息]
法定代表人:[原告法定代表人]
文书送达地址:[原告文书送达地址]
```
## 七、排版格式标准(所有 .docx 文书统一遵循)
以下为默认格式,实际以各模板的 YAML frontmatter 为准:
| 项目 | 标准 |
|------|------|
| 纸张 | A4 (210mm × 297mm) |
| 页边距 | 上 3cm,下 2.5cm,左 3cm,右 2.5cm |
| 正文字体 | 仿宋 (FangSong) |
| 标题字体 | 宋体 (SimSun) |
| 文书标题字号 | 18pt bold 居中 |
| 段落标题字号 | 16pt bold(原告/被告/诉讼请求/事实与理由 等) |
| 正文字号 | 14pt |
| 行距 | 1.5 倍行距 |
| 正文缩进 | 首行缩进 28pt(空两格) |
| "此致" | 同正文缩进,上方 6pt 间隔 |
| 法院名称 | **顶格(不缩进)** |
| 签名/日期 | 右对齐 |
| 段间间距 | **不空行**(段落标题由 `space_before: 8pt` 提供视觉分隔) |
## 八、变量命名注意事项
- 模板中 `[案由]一案` → 变量值应为 `民间借贷纠纷`(不含"纠纷"后缀)
- 避免在变量名中嵌入标签文本(如 `[文书送达地址:送达地址]`)
- 变量 JSON 中的 key 必须与模板 `[key]` 精确匹配
## 九、法定代表人字段映射
三个变量表示同一人物的不同粒度:
| 模板 | 变量 | 示例值 |
|------|------|--------|
| complaint | `原告法定代表人` | `张三,执行董事` (姓名+职务合写) |
| legal_rep_certificate | `法定代表人姓名` | `张三` (纯姓名) |
| legal_rep_certificate | `法定代表人职务` | `执行董事` (纯职务) |
填充时:已知 `原告法定代表人` 的合写值后,从中拆分出姓名和职务分别填入身份证明的两个变量。反之,如果先收集到姓名和职务,则合并填入 `原告法定代表人`。
---
## 附:本技能补充约定(上诉文本生成)
1. **模板正文不得使用行内加粗(`**文本**`)**。`render_docx.py` 不做行内 Markdown 解析,`**` 会原样印在文书上。需要加粗效果时,用 `##` 前缀段落(映射到宋体 14pt 加粗样式)。
2. **上诉状不走本渲染引擎**。上诉状以 `assets/民事上诉状-脱敏模板.docx` 为格式母版,由 `scripts/fill_appeal_docx.py` 原位填充,以保证与母版排版 100% 一致(黑体 18pt 居中标题、仿宋 14pt 正文、1.5 倍行距、首行缩进 2 字符)。
3. 本文书字号:正文 14pt(仿宋),标题 18pt(宋体)——与德恒所内标准一致,不另行调整。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-changelog-updatemorluto/reaPrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| academy-guideanthropics/skillsStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| claude-apianthropics/skillsReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file). | Stars: 198k | Updated | Claude CodeCodex | Unverified | Install |
| doc-coauthoringanthropics/skillsGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |