Pkulaw Mcp Case Retrieval logo

Pkulaw Mcp Case Retrieval

Community
NEU-ZHA
pkulaw-mcp-case-retrieval

成本感知地检索司法案例与裁判文书资料。Use when:用户要找类案、裁判样本或裁判线索。默认先用约 25 积分的 `case-keyword`;只有两轮合理关键词仍找不到事实相似样本时才升级约 125 积分的 `case-semantic`。NOT for:法规检索或未检索就概括裁判倾向。禁止编造案号、法院、日期或裁判要旨。

Overview

PublisherNEU-ZHA
Repositorylegal-ai-skills
Skill namepkulaw-mcp-case-retrieval
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 Case Retrieval 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-case-retrieval
  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-case-retrieval .claude/skills/pkulaw-mcp-case-retrieval
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pkulaw Mcp Case Retrieval 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 Case Retrieval 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 Case Retrieval 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:司法案例检索

这个 Skill 只负责一件事:把类案样本与裁判线索找出来,并按可复核的方式交给后续分析或备忘环节。

当前覆盖两个原生 MCP 服务:

路径serverId什么时候优先用
关键词检索case-keyword用户已给出案由词、争点词、标题词,想返回案例列表
语义检索case-semantic两轮合理关键词仍找不到事实相似样本,作为升级路径

如果任务已经明确是“只查法规”,请转到 pkulaw-mcp-law-retrieval。如果已有完整案号,先把案号作为关键词用 case-keyword 检索;没有精确匹配或需要从长文本批量识别时,再转 pkulaw-mcp-case-number。

先看边界

  • 本 Skill 的目标是找样本、看裁判线索,不是直接替用户做胜诉承诺或给出确定裁判结论。
  • 检索到的少量样本不能直接概括成“法院一定怎么判”。
  • 若用户要形成正式类案备忘或办案备忘,建议把结果继续交给组合型 Skill。

必须遵守的规则

  1. 具体案号、法院、日期和裁判要旨须有实际取得的可靠原文支持,用户提供的判决书及法院原文也可作为来源。
  2. 按实际取得的来源做摘要,不得用模型记忆补齐案例细节,也不得将网页结果称为 MCP 返回。
  3. 关键词路径下,title 与 fulltext 至少有一项;具体参数名仍以 tools 输出为准。
  4. 认证失败、超时或工具不存在时停止该接口,按需用用户材料、法院原文或其他已授权来源继续;没有依据的部分标待核。正常返回但召回不足时按下列成本路由补检。
  5. 不得把 case-semantic 当默认入口;它约 125 积分,只能在关键词路径不足且能说明缺口时升级一次。

默认路由

按下面顺序判断:

  1. 用户给了明确关键词、案由词、争点词:
    • 先走 case-keyword
  2. 用户给的是一整段争议描述,希望找类似案子:
    • 先提炼案由、争点、核心事实、法律关系等关键词,再走 case-keyword
  3. 关键词结果太少:
    • 换案由词、争点词、合同类型、法院层级或核心事实词后重试
  4. 两轮有理由的关键词仍缺少事实相似案例:
    • 只升级调用一次 case-semantic,并记录为什么升级

不要因用户提供整段案情就直接走语义检索。先由 AI 提炼关键词,通常 25 积分路径已经足够。

推荐工作流

  1. 先把用户问题收敛成“想看哪类案例样本”。
  2. 选择 case-keyword。
  3. 用 tools 确认真实 <toolName> 与参数名。
  4. 完成一次检索。
  5. 只整理当次返回里的案号、法院、裁判日期、摘要、链接等信息。
  6. 若结果不足,先做一次有理由的关键词补检索;仍不足才升级语义,不并发调用。

失败与降级

允许的失败输出

markdown
当前未拿到法宝案例检索结果。

失败原因:
- [未认证 / Token 失效 / 无订阅 / 无结果 / 工具不存在 / 命令报错]

建议动作:
- 检查 `pkulaw-mcp` 配置与 Token
- 检查对应服务是否已订阅
- 将争议点改写得更具体后重试

允许的降级方式

  • case-keyword 结果太宽 -> 增加案由词、争点词、法院层级或核心事实词
  • case-keyword 结果太少 -> 换同义词、案由词、法律关系词后重试
  • 仍无结果 -> 尝试用户提供判决书或可靠网页原文;仍缺样本时明确说明,不凭空概括裁判倾向

终端复现与排障

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

bash
pkulaw-mcp tools case-keyword
pkulaw-mcp case-keyword <toolName> --title "房屋租赁"
pkulaw-mcp tools case-semantic

说明:

  • <toolName> 必须以 pkulaw-mcp tools <serverId> 的输出为准
  • 当前实测工具名为 get_case_list,但正式环境中仍应以 tools/list 返回为准

输出结构

按下面结构输出最稳:

  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 Case Retrieval AI skill do?

成本感知地检索司法案例与裁判文书资料。Use when:用户要找类案、裁判样本或裁判线索。默认先用约 25 积分的 `case-keyword`;只有两轮合理关键词仍找不到事实相似样本时才升级约 125 积分的 `case-semantic`。NOT for:法规检索或未检索就概括裁判倾向。禁止编造案号、法院、日期或裁判要旨。

Why use Pkulaw Mcp Case Retrieval on TypingMind?

Because you install it once and use it with any model. Pkulaw Mcp Case Retrieval 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 Case Retrieval 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-case-retrieval. 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 Case Retrieval?

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 Case Retrieval?

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

Is the Pkulaw Mcp Case Retrieval 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 👇