Agent skill · AI & Agents

法律文书模板与导出

统一处理法律工作中最终需要输出本地 Word(.docx)的文书、报告、清单、笔录、意见书、函件、合同和正式交付文件。由法律工作总控强制路由调用;业务 Skill 负责正文和法律判断,本 Skill 负责选择格式 profile、接收语义 HTML 或要素式填充数据、导出 DOCX、结构体检和兜底模板。

pa1nrui1github.com/pa1nrui1GitHub ↗
claude-codeships scriptsMIT
Install
npx skills add pa1nrui1/legal-skills --skill 法律文书模板与导出 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 36
SKILL.md size: 6 KB
Bundled scripts: yes
Path: skills/legal/法律文书模板与导出/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 58
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 法律文书模板与导出 本 Skill 只处理最终 Word 的格式与导出,不替代业务 Skill 的事实梳理、法律分析、文书正文生成、材料读取复查、法规核验和出稿前审查。 ## 法律工作总控规则(强制) 执行本 Skill 前,必须先遵循: - skills/legal/法律工作总控/references/practice-profile.md - skills/legal/法律工作总控/references/source-boundary-protocol.md 本 Skill 继承 `practice-profile.md` 的子 Skill 执行质量门;审查报告、来源边界或验证结果缺失时,不得标记为正式交付。 ## 强制路由 - 凡最终产物是本地 `.docx` 的法律文书、报告、清单、笔录、意见书、函件、合同或正式交付文件,必须调用本 Skill。 - `法律工作总控` 负责判断是否进入本 Skill;用户直接点名业务 Skill 生成 Word 时,业务 Skill 也必须先通过 `法律文书出稿前审查`,再调用本 Skill。 - 普通线性文书正式交付接收 `法律文书出稿前审查` 生成的 `draft_checked.html`,并必须附带审查报告。 - 要素式表单文书正式交付接收经质控通过的 `complaint-data.json`、`fill-plan.json` 和模板克隆质控报告,使用 DOCX 母版克隆填充链路。 - 审查报告不是 `PASS` 或 `FIXED_PASS` 时,禁止生成正式 `.docx`。 - 未命中专用 profile 时,使用 `fallback_desktop_word`。 - 原 Skill 中保留的 `python-docx`、`Node.js docx`、Word 导出示例或旧技术方案只作为迁移评估来源/历史参考;不得作为最终 Word 导出路径执行。 - 普通线性文书走本 Skill 的语义 HTML -> `html_to_docx.py` -> DOCX 链路。 - 要素式表单文书走 DOCX 母版 -> `fill_docx_template.py` -> 清洁 DOCX 链路;不得用全局字符串替换驱动正式填充。 ## 输入约定 普通线性文书:业务 Skill 应先生成语义 HTML,并经 `法律文书出稿前审查` 生成 `draft_checked.html`。使用 XHTML 兼容写法: - `h1`:文书标题。 - `h2` / `h3`:层级标题。 - `p.meta`:申请人、当事人、案号、法院、基础信息。 - `p.body` 或普通 `p`:正文段落。 - `p.signature`:落款。 - `table`:真实表格。 - `section`:附件、事实、理由、请求、证据目录等区

What's inside
Steps it walks through
  1. 法律工作总控规则(强制)
  2. 强制路由
  3. 输入约定
  4. Profile
  5. 模板匹配与版本门禁
  6. 导出命令
  7. 失败与兜底
  8. 验证命令
  9. 迁移边界
  10. 禁止事项
Ships with 24 files
  • assets/legal-template-registry.json
  • assets/profiles/contract_standard.json
  • assets/profiles/entrustment_authorization.json
  • assets/profiles/entrustment_contract.json
  • assets/profiles/entrustment_risk_notice.json
  • assets/profiles/entrustment_statement_record.json
  • assets/profiles/entrustment_supervision_card.json
  • assets/profiles/fallback_desktop_word.json
  • assets/profiles/judgment_style.json
  • assets/profiles/legal_report.json
  • assets/profiles/legal_representative_certificate.json
  • assets/profiles/litigation_standard.json
  • assets/profiles/litigation_visualization.json
  • assets/template-clone-manifest.json
  • assets/template-manifest.json
  • scripts/audit_formal_delivery.py
  • scripts/backup_format_sources.py
  • scripts/fill_docx_template.py
  • scripts/health_check.py
  • scripts/html_to_docx.py
  • scripts/run_dual_docx_qc.py
  • scripts/run_template_clone_qc.py
  • scripts/select_legal_template.py
  • scripts/tests/helpers.py
first 24 of 36
Commands it runs
python scripts/select_legal_template.py \
python scripts/html_to_docx.py \
python scripts/fill_docx_template.py \
python scripts/run_template_clone_qc.py \
python scripts/run_dual_docx_qc.py --out /tmp/legal_dual_docx_qc
python scripts/health_check.py
python scripts/health_check.py --docx output.docx --expect-title "文书标题"
python scripts/health_check.py --docx output.docx --expect-title "解除委托协议" --format-standard contract_standard
python scripts/health_check.py --docx output.docx --expect-clean-clone --template-clone-report qc-report.json
python scripts/audit_formal_delivery.py \
More from legal-skills
All skills →
法律工作总控legal 文件夹通用入口 Skill。用于法律咨询、案件办理、合同、产品法务、监管合规、诉讼、刑辩、劳动争议、破产、合规、文书、检索等任务的语义路由、案件隔离、来源披露、文件读取复查、法规/Wiki…AI & Agents法律文书出稿前审查在法律业务 Skill 生成正文或要素式字段后、法律文书模板与导出生成本地 Word 前触发。用于审查 draft.html/preflight-meta.json 或…Data & Analytics合同审查基于张海燕四步审查法+何力/常金光三观分析法,对合同进行深度审查。支持企业核验、多语言自动检测、Mermaid业务流程图、二段式审核意见、合同概览、客户可读合同编号、业务摘要、22类合同专项审查、续约…Testing & QA广告合规审核广告合规审核技能,用于审核广告素材是否符合中国广告法及相关法规。适用场景:(1) 用户提交广告文案、广告素材要求合规审核时;(2) 用户提到"广告审核""广告合规""广告法审查"等关键词时;(3)…Otherlaw-to-markdown将法条/规范文件(.txt/.docx/.pdf)转为 Markdown。适用于用户要求“法条转 markdown”“pdf/docx 转 markdown”。处理 .pdf/.docx…AI & Agents监管合规监测中国境内重点监管动态监测与客户合规影响评估 Skill。用于监管动态、新规更新、政策变化、行业监管、法规政策分级、客户合规缺口核查、政策制度修改建议、整改清单、监管合规简报等任务。适用于用户要求监测某…AI & Agents
About this skill
What does the 法律文书模板与导出 skill do?

统一处理法律工作中最终需要输出本地 Word(.docx)的文书、报告、清单、笔录、意见书、函件、合同和正式交付文件。由法律工作总控强制路由调用;业务 Skill 负责正文和法律判断,本 Skill 负责选择格式 profile、接收语义 HTML 或要素式填充数据、导出 DOCX、结构体检和兜底模板。

How do I install it?

Run `npx skills add pa1nrui1/legal-skills --skill 法律文书模板与导出 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From pa1nrui1/legal-skills, a repository with 58 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going