zhihe-legal-research

zhihe-legal-research is a skill for Claude Code, Codex from ThomasMoreAI/legal-skills-open. It costs 55 tokens per session (2,228 once invoked), scanned A, original, Apache-2.0.

An asynchronous service for researching Chinese legal questions through the Zhihe AI legal-research platform. It submits a research task and lets the user check the result later.

In plain words
What is it for?
Use it to research legal issues, find laws and similar cases, and obtain a legal research report after the background task completes.
Why use it?
It separates longer legal research from the current conversation and provides a task ID for retrieving the finished report.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: mentions Claude Code; built for openclaw.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./scripts/auth.sh check.

Good fit Use it to research legal issues, find laws and similar cases, and obtain a legal research report after the background task completes.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/ThomasMoreAI/legal-skills-open
agentmods
npx agentmods add skills/thomasmoreai/legal-skills-open/zhihe-legal-research

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 zhihe-legal-research

README.md
[![agentmods](https://agentmods.dev/badge/skills/thomasmoreai/legal-skills-open/zhihe-legal-research/github.svg)](https://agentmods.dev/skills/thomasmoreai/legal-skills-open/zhihe-legal-research)
Your own site
<a href="https://agentmods.dev/skills/thomasmoreai/legal-skills-open/zhihe-legal-research"><img src="https://agentmods.dev/badge/skills/thomasmoreai/legal-skills-open/zhihe-legal-research/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 zhihe-legal-research

Your own site · 80×15
<a href="https://agentmods.dev/skills/thomasmoreai/legal-skills-open/zhihe-legal-research"><img src="https://agentmods.dev/badge/skills/thomasmoreai/legal-skills-open/zhihe-legal-research.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,228 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.
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.00055 $0.02228
Opus 5 $0.00028 $0.01114
Sonnet 5 $0.00011 $0.00446
Haiku 4.5 $0.00006 $0.00223

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

Security

Grade A, and why

zhihe-legal-research 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.

cn/general/skills/zhihe-legal-research/SKILL.md · 257 lines

How it starts

The opening of the file, as written. The whole thing — 257 lines — stays where its author put it; the contents beside it link to each section on GitHub.

智合法律研究

连接智合AI法律大模型平台,提供专业的法律调研分析服务。

⚠️ 异步任务处理机制

法律研究是异步长任务(3-10分钟)。采用用户主动查询机制,兼容所有 AI Agent 平台(Claude Code、OpenClaw 等):

用户提交 → 获得任务 ID → 用户稍后主动查询 → 获取结果并归档

核心原则:

  • 不在每次消息前自动检查结果——避免旧结果污染当前对话
  • 仅在用户主动询问研究结果时才查询状态和结果
  • 每次查询完毕后立即归档——确保状态干净,不留残留数据

工作流程

步骤 1:检查登录状态

./scripts/auth.sh check
  • is_vip: true → 已登录,继续
  • code: 401 → 需要登录(执行步骤 2)

步骤 2:登录(如需)

# 发送验证码(如果已保存手机号,可省略手机号参数)
./scripts/auth.sh send-code [手机号]

# 验证登录(自动保存 Token 和手机号)
./scripts/auth.sh verify <手机号> <6位验证码>

自动重登流程:如果 config 中已保存 LEGAL_RESEARCH_PHONE,token 失效时可直接执行 ./scripts/auth.sh send-code(无需传入手机号),系统自动使用保存的手机号发送验证码。用户只需提供验证码即可完成重登。

步骤 3:提交法律问题

# 提交问题
./scripts/research.sh submit "<用户的法律问题>"

提交成功后,记录 task_id 并告知用户:

✅ 您的法律问题已提交,后台正在进行调研分析。 ⏱️ 预计需要 3-4 分钟完成。 📋 任务 ID:{task_id}

👉 请在约 4 分钟后回复"查看结果"或"研究结果好了吗"来获取分析报告。

步骤 4:查询结果(仅当用户主动询问时)

触发条件: 用户主动询问研究结果(如"查看结果"、"结果出来了吗"等)。

如果用户提供了 task_id,直接查询;如果未提供,先查历史获取最近任务:

# 如果没有 task_id,先查历史
./scripts/research.sh history 1 3

然后查询状态:

# 查询状态
./scripts/research.sh status <task_id>

根据状态处理:

状态 处理方式
completed 获取结果 → 获取报告 → 归档 → 展示给用户
running 告知用户继续等待 1-2 分钟后再查询
pending 告知用户仍在排队中,稍后再查
failed 告知用户失败原因,建议重新提交
timeout 告知用户超时,建议简化问题重试

当状态为 completed 时,依次执行:

# 1. 获取文字结果
./scripts/research.sh result <task_id>

# 2. 获取报告下载链接
./scripts/research.sh report <task_id>

# 3. 自动归档(下载报告到 archive/ 目录,含 Markdown 转换)
./scripts/research.sh archive <task_id>

归档完成后,展示研究结果和报告链接给用户。


Claude Code 增强模式(可选)

仅在 Claude Code 环境下可用。 提供更好的异步体验,无需用户手动查询。

提交任务后,使用 Bash 工具的 run_in_background: true 启动后台监控:

command: "./scripts/monitor.sh monitor <task_id> 600 30"
run_in_background: true
timeout: 600000

关键注意事项:

  1. timeout 必须设为 600000(10分钟),否则默认 2 分钟会超时
  2. 后台监控完成后会自动收到通知,此时展示结果给用户
  3. 监控脚本会自动归档到 archive/ 目录

Read the full file on GitHub · 257 lines

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. 9d ago First seen · 257 lines · 55 tokens per session scan A 9cf30025ff38

Subscribe to this mod's changes

zhihe-legal-research is a skill published in the GitHub repository ThomasMoreAI/legal-skills-open (72 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 55 tokens to every session and 2,228 once invoked, about $0.0003 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.