Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add LawMotion-AI/Vibe-Lawyering --skill law-to-markdowngit clone --depth 1 https://github.com/LawMotion-AI/Vibe-LawyeringWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/lawmotion-ai/vibe-lawyering/law-to-markdown)<a href="https://agentmods.dev/skills/lawmotion-ai/vibe-lawyering/law-to-markdown"><img src="https://agentmods.dev/badge/skills/lawmotion-ai/vibe-lawyering/law-to-markdown/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/lawmotion-ai/vibe-lawyering/law-to-markdown"><img src="https://agentmods.dev/badge/skills/lawmotion-ai/vibe-lawyering/law-to-markdown.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00090 | $0.01300 |
| Opus 5 | $0.00045 | $0.00650 |
| Sonnet 5 | $0.00018 | $0.00260 |
| Haiku 4.5 | $0.00009 | $0.00130 |
Grade A, and why
law-to-markdown scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Law To Markdown
处理规则
- 输入为
.txt:直接转存为.md。 - 输入为
.pdf/.docx:- 先检查是否已安装
mineru-ocrskill。 - 未安装:提示先安装
mineru-ocr,安装地址:https://github.com/cat-xierluo/legal-skills/tree/main/skills/mineru-ocr - 已安装:优先调用
mineru-ocr处理。 - 调用失败:先提示检查
mineru-ocr配置/Token。 - 仅当用户明确同意时,才使用本地回退(
python-docx/pdfplumber)。
- 先检查是否已安装
- 第一阶段完成后默认执行第二阶段格式调整(仅格式,不改原文字符):
- 由调用该 skill 的大模型先判断“法律/非法律”,并把结果传给脚本。
- 若调用方未传结果,则脚本使用硬规则自动识别(
--law-decision auto)。 - 法律名称
# - 编/分编
## - 章
### - 节
#### - 条
#####(仅“第X条”为标题;第X条【条标】整行为标题不拆) - 款/项/目无标题
- 项、目按标记换行
- 清理多余空格:去行尾空格、去行首 ASCII 空格、去正文行首全角缩进、规范标题后的空格
- 若识别为明显非法律文本(如 GB/标准类文档),第二阶段明确拒绝:
Stage2: rejected (non-law-document)。 - 若第二阶段未识别法律结构或保真校验失败,则自动 no-op,不改文本。
- 默认执行第三阶段检查(双子阶段,硬门槛):
- Stage3-A:校验
stage2相对stage1的文字内容准确性(去标题符号与空白后字符流必须一致) - Stage3-B:校验结构效果(结构层级、条标题规则、非法律策略、空格规范、项/目换行)
- 任一失败触发自动重走,最多 2 次;仍失败默认报错退出
- Stage3-A:校验
二阶段识别参数
--law-decision law:调用方已判定为法律文本,直接按法律结构优化。--law-decision non-law:调用方已判定为非法律文本,阶段二直接拒绝。--law-decision auto:不传判定时的默认模式,使用脚本内硬规则。
三阶段参数
--skip-stage3-check:跳过第三阶段检查(默认不跳过)。--stage3-max-retries:失败后自动重走次数,默认2。--stage3-strict/--no-stage3-strict:- 默认严格模式(失败即报错退出)
- 非严格模式仅输出报告,不阻断流程
--artifact-level minimal|standard|debug:minimal(默认):面向交付,输出最少standard:保留过程文件(stage1/stage2/stage3-check)便于排查debug:保留全部过程产物(包含调试信息)
输出规则
- 默认输出到输入文件同目录的
markdown/子目录,并按输入文件名创建独立目录:markdown/<文件名>/
- 默认(
--artifact-level minimal)输出:<原文件名>+审核报告.md(详细过程和结论)<原文件名>+最终成果.md(仅法律文本且审核通过时生成)
- 非法律文档(如 GB/标准类):
- 结论为“拒绝处理”
- 仅输出
<原文件名>+审核报告.md - 不输出
<原文件名>+最终成果.md
- 审核未通过时会自动保留过程文件用于排查:
<文件名>.stage1.md<文件名>.stage2.md<文件名>.stage3-check.md
- 若需更多产物可切换:
--artifact-level standard:保留stage1/stage2/stage3-check--artifact-level debug:保留全部调试产物
- 可通过命令参数指定
--out或--out-dir。
常用命令
python3 law-to-markdown/scripts/law_to_markdown.py "input.txt"
python3 law-to-markdown/scripts/law_to_markdown.py "input.docx"
python3 law-to-markdown/scripts/law_to_markdown.py "input.pdf"
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 96 lines · 90 tokens per session scan A 498265ae8cbe
law-to-markdown is a skill published in the GitHub repository LawMotion-AI/Vibe-Lawyering (20 stars, last pushed 4mo ago), licensed MIT. It adds 90 tokens to every session and 1,300 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
patent-reader
A plain-language reader for Chinese patents that turns a publication number or PDF into notes, diagrams, and an Obsidian entry. Obsidian is a note-taking app that stores linked Markdown files.
meta-pdf-reformat-pipeline
Modernize a legacy PDF: structural extraction → natural-language rewrite of problem pages → audit summary → re-merge into the final PDF.
software-copyright-materials
A workflow for creating Chinese application materials for software copyright registration from a real software project.
ectd-xml-compiler
Automatically convert uploaded drug application documents (Word/PDF) into XML skeleton structure compliant with eCTD 4.0/3.2.2 specifications.
audit-export
Export the full CocoAudit trail as a stakeholder-ready compliance document.
software-certificate-skill
An automated workflow for preparing Chinese software-copyright registration materials from a real software project. It produces application information, an operation manual, and source-code documents with evidence from the project.