将 PDF/PPT/Excel/Word 等多格式文档解析为结构化 Markdown,并输出元数据与解析置信度,作为 RAG 与四色卡片的数据底座。
law-to-markdown
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/标…
Installation
Add law-to-markdown to your agent with:
git clone https://github.com/anbeime/skill ~/.claude/skills/law-to-markdown Always review a skill's source before installing it. This command comes from the skill's public repository; the linked repo is the source of truth for exact setup steps.
What's inside
The SKILL.md for law-to-markdown is organised into these sections:
- 处理规则
- 二阶段识别参数
- 三阶段参数
- 输出规则
- 常用命令
When to use it
Reach for law-to-markdown when you want docs help from your agent without writing the same instructions every session. Load the skill and the agent picks it up automatically for relevant tasks.
Strengths
- Ships in anbeime/skill, an established project with 5,476 GitHub stars
- Actively maintained (recent commits)
Things to check
- No license declared — confirm terms with the author before reuse
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.
- 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.
Related skills
More Docs →内容创作与发布全流程技能,整合网页采集、Markdown格式化、智能配图、多平台发布(微信公众号、X/Twitter)功能,实现从内容获取到发布的一站式解决方案
Formats plain text or markdown files with frontmatter, titles, summaries, headings, bold, lists, and code blocks. Use when user asks to "format markdown", "beautify article", "add formatting", or improve article layout. Outputs to {filename}-formatted.md.
Fetch any URL and convert to markdown using Chrome CDP. Supports two modes - auto-capture on page load, or wait for user signal (for pages requiring login). Use when user wants to save a webpage as markdown.
🤖 Just a skill to let AI generate documents based on your source code 🔅