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 pa1nrui1/legal-skills --skill law-to-markdowngit clone --depth 1 https://github.com/pa1nrui1/legal-skillsWrote 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/pa1nrui1/legal-skills/law-to-markdown)<a href="https://agentmods.dev/skills/pa1nrui1/legal-skills/law-to-markdown"><img src="https://agentmods.dev/badge/skills/pa1nrui1/legal-skills/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/pa1nrui1/legal-skills/law-to-markdown"><img src="https://agentmods.dev/badge/skills/pa1nrui1/legal-skills/law-to-markdown.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.01578 |
| Opus 5 | $0.00045 | $0.00789 |
| Sonnet 5 | $0.00018 | $0.00316 |
| Haiku 4.5 | $0.00009 | $0.00158 |
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 — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.
法律工作总控规则(强制)
执行本 Skill 前,必须先遵循:
- skills/legal/法律工作总控/references/practice-profile.md
- skills/legal/法律工作总控/references/matter-workspace-protocol.md
- skills/legal/法律工作总控/references/document-reading-protocol.md
- skills/legal/法律工作总控/references/source-boundary-protocol.md
- skills/legal/法律工作总控/references/ocr-correction-protocol.md
- skills/legal/法律工作总控/references/pkulaw-mcp-legal-verification-protocol.md
本 Skill 只处理本专业任务;案件隔离、来源披露、材料缺口、法规/Wiki 校验、OCR 校正和读取复查按总控规则执行。
旧规则废止(强制)
- 旧文中直接写死的客户目录、阶段目录、旧式台账写入、旧本地读取协议均不作为执行规则。
- 事项路径、当前事项、系统记录、业务文件区和复盘台账统一以法律工作总控
matter-workspace-protocol.md为准。 - 不得静默写入复盘台账;确需更新时,先确认属于复盘台账更新并向用户说明。
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:保留全部过程产物(包含调试信息)
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 · 117 lines · 90 tokens per session scan A ab4b27ef5c16
law-to-markdown is a skill published in the GitHub repository pa1nrui1/legal-skills (85 stars, last pushed 2mo ago), licensed MIT. It adds 90 tokens to every session and 1,578 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
eu-ai-act-report-oliver-schmidt-prietz
Generates a formal, structured AI Act compliance assessment report suitable for legal files, audit trails, and regulatory inquiries. This skill should be used when the user asks to "generate an AI Act report", "create a compliance assessment report", "document the AI Act analysis", "create a Prüfbericht", "export as…
gdpr-privacy-notice-eu-oliver-schmidt-prietz
Draft GDPR/DSGVO-compliant privacy notices as .docx for any EU/EEA jurisdiction and audience. Use when user asks to create a privacy policy/notice, mentions "Datenschutzerklärung", "politique de confidentialité", "privacy notice", needs Art. 13/14 disclosures, AI Act transparency, cookie policy, or notices for…
litigation-deadline-calendar
Calendar litigation and arbitration deadlines from a scheduling order. Parses a PDF scheduling order, identifies key dates, computes backward deadlines using the applicable rules (Colorado CRCP, Federal FRCP, or arbitration forum rules for AAA/JAMS), and generates an .ics calendar file for Outlook or Google Calendar…
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.