pkulaw-mcp-semantic-nlsql

pkulaw-mcp-semantic-nlsql is a skill for Claude Code, Codex from NEU-ZHA/legal-ai-skills. It costs 102 tokens per session (1,170 once invoked), scanned A, original, MIT.

A Chinese-language semantic search skill for retrieving candidate legal materials across databases using a natural-language question. It is intended for complex legal research when separate keyword searches for rules and cases leave an important gap.

In plain words
What is it for?
Use it as an escalation step for cross-database research involving several kinds of legal material, then sort, narrow, and verify the returned candidates.
Why use it?
Some legal questions do not divide cleanly into one rule search and one case search. This provides a broader candidate search, while keeping the results separate from a final legal conclusion.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it as an escalation step for cross-database research involving several kinds of legal material, then sort, narrow, and verify the returned candidates.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/neu-zha/legal-ai-skills/pkulaw-mcp-semantic-nlsql
Install

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.

Any agent
npx skills add NEU-ZHA/legal-ai-skills --skill pkulaw-mcp-semantic-nlsql
Clone the repo
git clone --depth 1 https://github.com/NEU-ZHA/legal-ai-skills

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for pkulaw-mcp-semantic-nlsql

README.md
[![agentmods](https://agentmods.dev/badge/skills/neu-zha/legal-ai-skills/pkulaw-mcp-semantic-nlsql/github.svg)](https://agentmods.dev/skills/neu-zha/legal-ai-skills/pkulaw-mcp-semantic-nlsql)
Your own site
<a href="https://agentmods.dev/skills/neu-zha/legal-ai-skills/pkulaw-mcp-semantic-nlsql"><img src="https://agentmods.dev/badge/skills/neu-zha/legal-ai-skills/pkulaw-mcp-semantic-nlsql/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.

agentmods 80×15 button for pkulaw-mcp-semantic-nlsql

Your own site · 80×15
<a href="https://agentmods.dev/skills/neu-zha/legal-ai-skills/pkulaw-mcp-semantic-nlsql"><img src="https://agentmods.dev/badge/skills/neu-zha/legal-ai-skills/pkulaw-mcp-semantic-nlsql.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,170 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00102 $0.01170
Opus 5 $0.00051 $0.00585
Sonnet 5 $0.00020 $0.00234
Haiku 4.5 $0.00010 $0.00117

Measured 12d ago against content hash 1dcc6fc14551, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

pkulaw-mcp-semantic-nlsql 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.

skills/pkulaw-mcp-semantic-nlsql/SKILL.md · 118 lines

What it actually says

北大法宝 MCP:语义检索(semantic-nlsql)

这个 Skill 只负责一件事:用一次自然语言检索,先把跨库候选材料召回出来。

它适合做经济型检索后的升级路径,不替代法规检索、案例检索、精准法条回源或引用核验。默认先尝试拆分问题,分别调用 law-keywordcase-keyword;只有无法可靠拆分或仍有关键缺口时才使用本 Skill。

使用前必须检查

  1. 已配置 serverPaths.semantic-nlsql
  2. pkulaw-mcp tools semantic-nlsql 能正常返回
  3. 控制台已开启对应服务、Token 可用

如果上面任何一点不成立,必须停止继续使用本 Skill,并提示用户先配置或改走其他 Skill。

先看边界

  • 本 Skill 的长处是综合召回,不是最终结论生成器。
  • 召回结果必须继续做分流、核验、收窄,不得直接包装成确定法律意见。
  • 如果问题本来就只是查法规或只是查案例,优先用更窄的 Skill,而不是为了“高级”强行走 NL-SQL。

默认路由

符合下面条件时才用 semantic-nlsql

  • 问题同时跨法规、案例、法条或多类材料,而且无法可靠拆成定向关键词路径
  • 已用 law-keyword / case-keyword 做过有理由的检索,仍有影响结论的关键缺口

不符合时,直接改走:

推荐工作流

  1. 先确认经济型定向检索不足,并写明尚缺什么。
  2. 确认配置与工具可用。
  3. 用自然语言完整表达问题,完成一次综合检索。
  4. 按返回内容分成法规、案例、法条或其他候选。
  5. 明确告诉用户:这是“综合召回结果”,不是最终定论。
  6. 必要时把候选继续转交给更窄的 Skill 做二次检索。

失败与降级

配置缺失

只允许输出类似下面的结构:

当前无法使用 `semantic-nlsql`,因为实例路径尚未完成配置。

建议动作:
- 先配置 `serverPaths.semantic-nlsql`
- 执行 `pkulaw-mcp tools semantic-nlsql` 验证
- 如暂不配置,可改用法规语义检索与案例语义检索分别完成

401/403 或无结果

当前未拿到 semantic-nlsql 的有效检索结果。

失败原因:
- [未认证 / 无订阅 / 无结果 / 命令报错]

建议动作:
- 检查 Token 与订阅状态
- 调整自然语言问题表述
- 改走法规或案例的窄路径检索

终端复现与排障

如需在终端复现,请先安装 @pkulaw/mcp-cli;安装后命令为 pkulaw-mcp

pkulaw-mcp tools semantic-nlsql
pkulaw-mcp semantic-nlsql <toolName> --json

说明:

  • <toolName> 必须以 tools 输出为准
  • 不要在文档中写死 ai_pkulaw_search 等工具名

输出结构

按下面结构输出最稳:

  1. 问题重述
  2. 前置检查结果
  3. 综合召回摘要
  4. 建议的下一步分流
  5. 局限说明

补充材料

Files

What ships with it

3 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.

Changes

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.

  1. 12d ago First seen · 118 lines · 102 tokens per session scan A 1dcc6fc14551

Subscribe to this mod's changes

pkulaw-mcp-semantic-nlsql is a skill published in the GitHub repository NEU-ZHA/legal-ai-skills (64 stars, last pushed 23d ago), licensed MIT. It adds 102 tokens to every session and 1,170 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.

Related

Other skills, from other repositories

specification-writing

A workflow for writing complete patent specifications from patent claims and an invention disclosure. It adapts the document to a chosen jurisdiction, such as the US, Europe, or China.

wanshuiyin/Auto-claude-code-research-in-sleep · 49 tokens

regulatory-research-fallback

Fallback workflow for regulatory research when web extraction tools fail on government PDFs.

HKUDS/OpenSpace · 20 tokens

x-scorecard

OpenSSF Scorecard for assessing open source project security. Check security best practices and compliance. Dependency: This is an x-cmd module. Install x-cmd first (see x-cmd skill for installation options). see x-cmd skill for installation.

x-cmd/x-cmd · 57 tokens

gesellschaftsrechtliche-satzungen-agb

Für Gesellschaftsrechtliche Satzungen AGB Abgrenzung: ordnet Norm, Beweislast und Gegenargument; Ergebnis: Prüfprodukt mit Risiko und nächstem Schritt. Fachgebiet: AGB-Recht-Prüfer. Route: gesellschaftsrechtliche-satzungen-agb.

Klotzkette/claude-fuer-deutsches-recht · 69 tokens

memstack-business-gdpr

Use this skill when the user says 'GDPR', 'data protection', 'privacy compliance', 'DPA', 'DSAR', 'data subject request', 'cookie consent', 'privacy audit', 'CCPA', or asks 'do I need GDPR for this repo'. Scans the repository to detect what personal data is collected, classifies sensitivity, determines whether GDPR…

cwinvestments/memstack · 121 tokens

nda-review

Use when the user uploads or pastes a non-disclosure agreement and asks for review, redline, risk assessment, or a recommendation on whether to sign. Identifies missing standard protections, one-sided or unusual provisions, and operational issues; produces a structured report with severity ratings and citations to…

LegalQuants/lq-ai · 79 tokens