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 ThomasMoreAI/legal-skills-open --skill yd-law-searchgit clone --depth 1 https://github.com/ThomasMoreAI/legal-skills-openWrote 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/thomasmoreai/legal-skills-open/yd-law-search)<a href="https://agentmods.dev/skills/thomasmoreai/legal-skills-open/yd-law-search"><img src="https://agentmods.dev/badge/skills/thomasmoreai/legal-skills-open/yd-law-search/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/thomasmoreai/legal-skills-open/yd-law-search"><img src="https://agentmods.dev/badge/skills/thomasmoreai/legal-skills-open/yd-law-search.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.00132 | $0.01420 |
| Opus 5 | $0.00066 | $0.00710 |
| Sonnet 5 | $0.00026 | $0.00284 |
| Haiku 4.5 | $0.00013 | $0.00142 |
Grade A, and why
yd-law-search 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 9d 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 — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
元典法条/法规检索技能(yd-law-search)
定位
检索型 skill,把规范依据稳定、结构化地检索出来。
- 它负责:查法条、查法规、查司法解释、查具体条文全文
- 它不负责:直接替代法律分析、出完整法律意见
- 与现有 skill 的关系:
yd-law-search:检索规范依据(本 skill)yd-case-search:检索案例与类案cs-china-lawyer-analyst:基于检索结果做法律分析legal-research:上层编排技能,按"查法规→查案例→出备忘录"调度上述三者
API Key 配置
脚本按以下顺序读取 API Key:
- 环境变量
YD_OPEN_API_KEY ~/.yd_open_api_key- 环境变量
YD_API_KEY ~/.yd_api_key- 脚本目录下
.api_key
申请入口:https://open.chineselaw.com/
工作流(重要)
- 默认搜索只返回元数据 + 高亮/要旨片段,不返回全文。
- 当需要某条法条或法规的全文时,使用
ft_detail/fg_detail配合 id 拉取。 - 不要在搜索后立即对全部命中条目调用详情接口;先由模型/用户筛选 1-3 条最相关的,再单独拉详情。
--full开关用于调试或用户明确要求全文展示时使用。
子命令决策树(严格遵守,不要自由发挥)
默认路由(用于 99% 的"查法律/查规定"提问):
- 自然语言问题、想要规范依据原文 →
search(语义法条) - 多关键词、术语精确、要做条件过滤 →
search_keyword(关键词法条) - 已知法规名 + 条号 →
ft_detail(法条详情)
仅在出现以下显式信号时才走「法规级别」接口:
- 用户问"有哪些法规/规章/规定"、"列出相关法规"
- 用户问"某机关发过什么文件"、"做法规盘点"
- 用户已明确给出法规名要拉法规全文 →
fg_detail
明确禁止:
- 不要用
search_fg来回答"某规则是什么"——那是search/search_keyword的活。 search_fg只回法规清单(标题、发布部门、发布日期),不返回具体条文。
调用方式
# 1. 语义检索(自然语言)
echo '{"query":"民间借贷利率上限"}' | \
python3 ~/.claude/skills/yd-law-search/scripts/yd_law_search.py search --stdin
# 2. 关键词检索(精确)
echo '{"keyword":"个人信息 处罚","search_mode":"AND","sxx":"现行有效"}' | \
python3 ~/.claude/skills/yd-law-search/scripts/yd_law_search.py search_keyword --stdin
# 3. 法条详情(需法规名 + 中文条号)
echo '{"fgmc":"中华人民共和国刑法","ftnum":"第一百条"}' | \
python3 ~/.claude/skills/yd-law-search/scripts/yd_law_search.py ft_detail --stdin
# 4. 法规级别检索(仅在用户要"列法规清单"时)
echo '{"keyword":"行政处罚","sxx":"现行有效","top_k":8}' | \
python3 ~/.claude/skills/yd-law-search/scripts/yd_law_search.py search_fg --stdin
# 5. 法规详情(按 id 或 fgmc)
echo '{"fgmc":"中华人民共和国民法典"}' | \
python3 ~/.claude/skills/yd-law-search/scripts/yd_law_search.py fg_detail --stdin
# 旧子命令 search_ft_info 仍兼容(自动映射 query→fgmc, ft_name→ftnum)
echo '{"query":"民法典","ft_name":"第六百八十条"}' | \
python3 ~/.claude/skills/yd-law-search/scripts/yd_law_search.py search_ft_info --stdin
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.
- 9d ago First seen · 118 lines · 132 tokens per session scan A 44ad8c41fa0f
yd-law-search is a skill published in the GitHub repository ThomasMoreAI/legal-skills-open (72 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 132 tokens to every session and 1,420 once invoked, about $0.0007 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-09-03.
Other skills, from other repositories
pia-generator
Generate structured privacy impact assessments so Claude can organize project privacy risks, controls, and decision points into a review-ready report.
audit-scope-checklist
Generate a scoped IT audit program with controls mapped to roles and compliance frameworks. Use this skill for audit planning, control checklist generation, and auditprogram.json creation.
compliance-checker
Compare system configuration evidence against common control frameworks and produce a concise compliance assessment with gaps and remediation priorities.
compliance-controls-playbook
Guide Claude through a structured compliance audit workflow covering framework selection, evidence planning, control testing, exception handling, and reporting.
evidence-tracker
Manage audit evidence requests, collection progress, and status reporting so Claude can keep audits organized and identify overdue or blocked evidence items.
consent-checker
Review privacy policy or notice text against common privacy frameworks so Claude can explain coverage gaps, strengths, and compliance priorities.