law-to-markdown SKILL.md skillA
law-to-markdown from anbeime/skill is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add anbeime/skill/law-to-markdown@git:20260826.48e063ePins git:20260826.48e063e in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- anbeime/skill
- Path
skills/legal-assistant-skills-main/law-to-markdown/SKILL.md- Versions recorded
- 2
- Latest version
- git:20260826.48e063e, committed Aug 26, 2026
- First version recorded
- Feb 14, 2026
- Size
- 4,344 bytes
- Repository stars
- 9,288
- License
- none declared
律师助理与法律助手在处理繁杂法条时,当需要将 PDF/Word/TXT 格式的法律规范文件转为结构化 Markdown 时适用。自动完成 OCR 解析、法律层级识别与三阶段保真校验,一键生成排版完美的法条 Markdown 文档及审核报告,让法律文本数字化工作事半功倍。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Law To Markdown
## 处理规则
1. 输入为 `.txt`:直接转存为 `.md`。
2. 输入为 `.pdf` / `.docx`:
- 先检查是否已安装 `mineru-ocr` skill。
- 未安装:提示先安装 `mineru-ocr`,安装地址:
`https://github.com/cat-xierluo/legal-skills/tree/main/skills/mineru-ocr`
- 已安装:优先调用 `mineru-ocr` 处理。
- 调用失败:先提示检查 `mineru-ocr` 配置/Token。
- 仅当用户明确同意时,才使用本地回退(`python-docx` / `pdfplumber`)。
3. 第一阶段完成后默认执行第二阶段格式调整(仅格式,不改原文字符):
- 由调用该 skill 的大模型先判断“法律/非法律”,并把结果传给脚本。
- 若调用方未传结果,则脚本使用硬规则自动识别(`--law-decision auto`)。
- 法律名称 `#`
- 编/分编 `##`
- 章 `###`
- 节 `####`
- 条 `#####`(仅“第X条”为标题;`第X条【条标】`整行为标题不拆)
- 款/项/目无标题
- 项、目按标记换行
- 清理多余空格:去行尾空格、去行首 ASCII 空格、去正文行首全角缩进、规范标题后的空格
4. 若识别为明显非法律文本(如 GB/标准类文档),第二阶段明确拒绝:`Stage2: rejected (non-law-document)`。
5. 若第二阶段未识别法律结构或保真校验失败,则自动 no-op,不改文本。
6. 默认执行第三阶段检查(双子阶段,硬门槛):
- Stage3-A:校验 `stage2` 相对 `stage1` 的文字内容准确性(去标题符号与空白后字符流必须一致)
- Stage3-B:校验结构效果(结构层级、条标题规则、非法律策略、空格规范、项/目换行)
- 任一失败触发自动重走,最多 2 次;仍失败默认报错退出
## 二阶段识别参数
- `--law-decision law`:调用方已判定为法律文本,直接按法律结构优化。
- `--law-decision non-law`:调用方已判定为非法律文本,阶段二直接拒绝。
- `--law-decision auto`:不传判定时的默认模式,使用脚本内硬规则。
## 三阶段参数
- `--skip-stage3-check`:跳过第三阶段检查(默认不跳过)。
- `--stage3-max-retries`:失败后自动重走次数,默认 `2`。
…Read the whole file at its exact version.
How to install
mdr add anbeime/skill/law-to-markdown@sha256:d857ce89bf345d26The line at the top of this page pins the label git:20260826.48e063e, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_xmpmevnfv2d7c2fv)
6 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 2 versions of this file, between Feb 14, 2026 and Aug 26, 2026, about one every 193 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260826.48e063e latest | 2026-08-26 | 48e063e | 4,344 B | A | view · diff |
| git:20260214.e693818 | 2026-02-14 | e693818 | 4,331 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (4344 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
anbeime/skill · 9,288 stars · license none declared · pushed 2026-11-07 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_xmpmevnfv2d7c2fv GET https://markdownregistry.com/api/v1/resolve?ref=anbeime/skill/law-to-markdown GET https://markdownregistry.com/api/v1/blob/d857ce89bf345d26036a64019d04c4b578ddc339e674c3221693b9f4e47e424d
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.