Loading...
Loading...
Yuandian Law Article and Case Retrieval. This skill shall be used when you need to query provisions of Chinese laws and regulations, retrieve relevant cases, and provide data support for legal analysis.
npx skill4agent add cat-xierluo/legal-skills yuandian-law-search.envscripts/.envYD_API_KEYyour-api-key-here⚠️ 元典 API Key 未配置。请按以下步骤获取并配置:
1. 注册/登录:访问 https://passport.legalmind.cn/ ,使用手机号注册
2. 创建 API Key:登录后访问 https://passport.legalmind.cn/apiKey/manage ,点击「创建 Key」
3. 配置密钥:将 Key 填入以下文件
scripts/.env
─────────────
YD_API_KEY=sk-你的密钥
─────────────
API 覆盖范围:法条检索(语义/关键词/详情)+ 案例检索(关键词/向量语义),共 5 个端点,共用同一个 Key。
配置完成后重新发起检索即可。# 检测 .env 文件和 API Key
if [ -f "scripts/.env" ]; then
KEY=$(grep '^YD_API_KEY=' scripts/.env | cut -d'=' -f2)
if [ -n "$KEY" ] && [ "$KEY" != "your-api-key-here" ]; then
echo "API Key 已就绪"
else
echo "API Key 未配置"
fi
else
echo ".env 文件不存在"
fipython3 scripts/yd_search.py search "正当防卫的限度" --sxx 现行有效python3 scripts/yd_search.py keyword "人工智能 监管" \
--effect1 法律 --sxx 现行有效 \
--fbrq-start 2022-01-01 --fbrq-end 2026-03-01python3 scripts/yd_search.py detail "民法典" --ft-name "第十五条"python3 scripts/yd_search.py case "买卖合同纠纷" --province 广西 --authority-onlypython3 scripts/yd_search.py case-semantic "正当防卫的限度" --jarq-start 2020-01-01| Parameter | Description | Optional Values |
|---|---|---|
| Effectiveness level (can be specified multiple times) | Constitution, Law, Judicial Interpretation, Administrative Regulation, Departmental Rule, Local Regulation, etc. |
| Timeliness (can be specified multiple times) | Currently Valid, Invalid, Amended, Partially Invalid, Not Yet Effective |
| Parameter | Description |
|---|---|
| Only retrieve authoritative/typical cases |
| Province filter |
| Case closing date range |
rawpython3 scripts/yd_search.py raw /search "正当防卫" --extra '{"sxx":["现行有效"]}'