law-to-markdown

将法条/规范文件(.txt/.docx/.pdf)转为 Markdown。适用于用户要求“法条转 markdown”“pdf/docx 转 markdown”。处理 .pdf/.docx 时先检查是否已安装 mineru-ocr skill;未安装先引导安装,安装后优先用 mineru-ocr;仅在用户明确同意时再用本地回退方案。

by anbeime 5.5k GitHub stars No license Updated Aug 18, 2026
Docs Gemini CLI ⚠ No license
law-to-markdown skill by anbeime
law-to-markdown — Docs skill by anbeime

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

anbeime 37 skills in the catalog · GitHub profile ↗
View skills

Topics

Need a skill like this, tailored to your team?Build a custom skill →

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.

Related skills

More Docs skills →

将 PDF/PPT/Excel/Word 等多格式文档解析为结构化 Markdown,并输出元数据与解析置信度,作为 RAG 与四色卡片的数据底座。

Gemini CLI
5.5k GitHub stars No license Updated Aug 18, 2026 Free

内容创作与发布全流程技能,整合网页采集、Markdown格式化、智能配图、多平台发布(微信公众号、X/Twitter)功能,实现从内容获取到发布的一站式解决方案

Gemini CLI
5.5k GitHub stars No license Updated Aug 18, 2026 Free

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.

Gemini CLI
5.5k GitHub stars No license Updated Aug 18, 2026 Free

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.

Gemini CLI
5.5k GitHub stars No license Updated Aug 18, 2026 Free

🤖 Just a skill to let AI generate documents based on your source code 🔅

CodexGemini CLIOpenCode
0 GitHub stars MIT Updated Jul 30, 2026 Free