Overview
law-to-markdown is an open-source docs skill for Claude Code and compatible agents, published by anbeime. Its author describes it as: “将法条/规范文件(.txt/.docx/.pdf)转为 Markdown。适用于用户要求“法条转 markdown”“pdf/docx 转 markdown”。处理 .pdf/.docx 时先检查是否已安装 mineru-ocr skill;未安装先引导安装,安装后优先用 mineru-ocr;仅在用户明确同意时再用本地回退方案。”. The project has 5.5k stars on GitHub and does not declare a license, so check with the author before reuse. Add it to your setup with `git clone https://github.com/anbeime/skill ~/.claude/skills/law-to-markdown`.
What law-to-markdown does
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/标…
What’s inside
The SKILL.md for law-to-markdown is organised into these sections:
- 处理规则
- 二阶段识别参数
- 三阶段参数
- 输出规则
- 常用命令
Installation
Add law-to-markdown to your agent with:
git clone https://github.com/anbeime/skill ~/.claude/skills/law-to-markdown Review a skill’s source before installing it — skills can instruct your agent to run commands. This command comes from the skill’s public repository, which is the source of truth for setup steps. New to skills? Read how to install Claude Code skills.
Supported agents
- Gemini CLI — declared in the repository topics
License
anbeime has not declared a standard open-source license for this repository (No license). Confirm the terms with the author before reusing it.
Strengths
- Ships in anbeime/skill, an established project with 5,476 GitHub stars
- Works with Gemini CLI
- Actively maintained — repository updated in the last 90 days
Things to check
- No license declared — confirm terms with the author before reuse
Author
Topics
Frequently asked questions
- What does law-to-markdown do?
- 将法条/规范文件(.txt/.docx/.pdf)转为 Markdown。适用于用户要求“法条转 markdown”“pdf/docx 转 markdown”。处理 .pdf/.docx 时先检查是否已安装 mineru-ocr skill;未安装先引导安装,安装后优先用 mineru-ocr;仅在用户明确同意时再用本地回退方案。
- How do I install law-to-markdown?
- Run git clone https://github.com/anbeime/skill ~/.claude/skills/law-to-markdown in your agent, then reload your skills. Review the source at https://github.com/anbeime/skill before installing.
- Is law-to-markdown free to use?
- law-to-markdown is publicly available on GitHub, but anbeime has not declared a standard open-source license (No license). Confirm the terms with the author before reusing it.
- Which agents does law-to-markdown work with?
- law-to-markdown lists Gemini CLI — named in its SKILL.md, its plugin marketplace or its repository topics. Skills use the portable SKILL.md format, so other agents that read that format may load it too.
- Where does law-to-markdown come from?
- law-to-markdown ships inside anbeime/skill, a repository that contains 37 catalogued skills in total. The repository's 5,476 GitHub stars apply to that whole collection, not to this skill on its own.