Pkulaw Mcp Semantic Nlsql logo

Pkulaw Mcp Semantic Nlsql

Community
NEU-ZHA
pkulaw-mcp-semantic-nlsql

使用约 125 积分的 `semantic-nlsql` 做跨库语义检索。Use when:复杂问题无法可靠拆成法规和案例关键词路径,或约 25 积分的定向检索后仍有关键缺口。NOT for:普通综合研究的默认首轮、单一法规/案例或已知法条查询。必须确认工具可用,不得伪造结果。

Overview

PublisherNEU-ZHA
Repositorylegal-ai-skills
Skill namepkulaw-mcp-semantic-nlsql
Stars
70
Forks
7
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by NEU-ZHA on GitHub. Read the source before you install it.

Installation

Install the Pkulaw Mcp Semantic Nlsql AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/NEU-ZHA/legal-ai-skills/tree/main/skills/pkulaw-mcp-semantic-nlsql
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/NEU-ZHA/legal-ai-skills.git /tmp/legal-ai-skills
mkdir -p .claude/skills
cp -r /tmp/legal-ai-skills/skills/pkulaw-mcp-semantic-nlsql .claude/skills/pkulaw-mcp-semantic-nlsql
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pkulaw Mcp Semantic Nlsql in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Pkulaw Mcp Semantic Nlsql on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Pkulaw Mcp Semantic Nlsql is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

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

它适合做经济型检索后的升级路径,不替代法规检索、案例检索、精准法条回源或引用核验。默认先尝试拆分问题,分别调用 law-keyword 和 case-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 做二次检索。

失败与降级

配置缺失

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

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

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

401/403 或无结果

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

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

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

终端复现与排障

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

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

说明:

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

输出结构

按下面结构输出最稳:

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

补充材料

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Pkulaw Mcp Semantic Nlsql AI skill do?

使用约 125 积分的 `semantic-nlsql` 做跨库语义检索。Use when:复杂问题无法可靠拆成法规和案例关键词路径,或约 25 积分的定向检索后仍有关键缺口。NOT for:普通综合研究的默认首轮、单一法规/案例或已知法条查询。必须确认工具可用,不得伪造结果。

Why use Pkulaw Mcp Semantic Nlsql on TypingMind?

Because you install it once and use it with any model. Pkulaw Mcp Semantic Nlsql is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Pkulaw Mcp Semantic Nlsql in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/NEU-ZHA/legal-ai-skills/tree/main/skills/pkulaw-mcp-semantic-nlsql. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Pkulaw Mcp Semantic Nlsql?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Pkulaw Mcp Semantic Nlsql?

As many as you like. As long as a model supports skills, you can use Pkulaw Mcp Semantic Nlsql with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Pkulaw Mcp Semantic Nlsql AI skill free?

Yes. It is published on GitHub by NEU-ZHA under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇