Agent skill

Legal Search

by open-octo in open-octo/octo-agent

系统性检索中国大陆现行有效的法律、行政法规、司法解释、指导性案例,并按引用规范 输出。Use when 用户问"根据什么法律""法律怎么规定""这样做违法吗""能不能告" "查一下相关法条/司法解释/指导性案例"等需要查找并引用具体法律依据的问题。

MITAuto-check passed

Install Legal Search

skills CLI
$ npx skills add open-octo/octo-agent --skill legal-search -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install open-octo/octo-agent legal-search --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/open-octo/octo-agent.git skills-src && mkdir -p .claude/skills && cp -r skills-src/internal/skills/experts/legal-search .claude/skills/legal-search && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
legal-search
GitHub stars
125
Token cost
~996 tokens
SKILL.md length
202 words
Files
3
Skills in repo
40
Repo updated
First seen
Licence
MIT

At a glance

系统性检索中国大陆现行有效的法律、行政法规、司法解释、指导性案例,并按引用规范 输出。Use when 用户问"根据什么法律""法律怎么规定""这样做违法吗""能不能告" "查一下相关法条/司法解释/指导性案例"等需要查找并引用具体法律依据的问题。

  • Works in 3 steps: 说明适用规则——特别规定优于一般规定、新的规定优于旧的规定(这是《立法法》 → 结合最高人民法院相关司法解释或答复,说明司法实践中的实际倾向。 → 涉及地域差异时,标注地方性规定的适用范围,不要把地方性规定当全国通行规则。
  • 用户问根据什么法律法律怎么规定这样做违法吗能不能告 查一下相关法条/司法解释/指导性案例等需要查找并引用具体法律依据的问题
  • SKILL.md covers 检索范围与位阶, 官方免费检索渠道, 法条引用六要素 and 案例引用规范与真实性铁律, plus 6 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Legal Search is an agent skill from open-octo/octo-agent. 系统性检索中国大陆现行有效的法律、行政法规、司法解释、指导性案例,并按引用规范 输出。Use when 用户问"根据什么法律""法律怎么规定""这样做违法吗""能不能告" "查一下相关法条/司法解释/指导性案例"等需要查找并引用具体法律依据的问题。 不用于单纯的法律概念科普(那种问题直接回答即可,不需要加载本技能)。

Its SKILL.md is about 1000 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `PROVENANCE.md`).

The repository describes itself as: Open-source, single-binary, self-hosted AI agent — your models and data stay on your machine. A coding agent on par with Claude Code and a personal assistant lighter than… The licence is MIT.

When your agent uses it

  • 用户问根据什么法律法律怎么规定这样做违法吗能不能告 查一下相关法条/司法解释/指导性案例等需要查找并引用具体法律依据的问题

Example prompts

  • “根据什么法律”
  • “法律怎么规定”
  • “这样做违法吗”
  • “/legal-search”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. 说明适用规则——特别规定优于一般规定、新的规定优于旧的规定(这是《立法法》
  2. 结合最高人民法院相关司法解释或答复,说明司法实践中的实际倾向。
  3. 涉及地域差异时,标注地方性规定的适用范围,不要把地方性规定当全国通行规则。

What it can do on your machine

Read from SKILL.md and the folder at commit bbae80e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Legal Search loads about 996 tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 202 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~43
When it runs · the whole SKILL.md, loaded when a task matches
~996

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from open-octo/octo-agent at commit bbae80e, republished under its MIT licence (© open-octo). 202 words, ~996 tokens.

Download SKILL.mdSave it as .claude/skills/legal-search/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
legal-search
description
系统性检索中国大陆现行有效的法律、行政法规、司法解释、指导性案例,并按引用规范 输出。Use when 用户问"根据什么法律""法律怎么规定""这样做违法吗""能不能告" "查一下相关法条/司法解释/指导性案例"等需要查找并引用具体法律依据的问题。 不用于单纯的法律概念科普(那种问题直接回答即可,不需要加载本技能)。
license
MIT (adapted from Golden2002/legal-research-skill and lawyerwangbo/legal-assistant-pro; complete terms in LICENSE.txt)
metadata.origin
法源位阶与检索范围、法条/案例引用六要素规范、案例真实性铁律、条文互引格式、 常见检索错误清单,改编自 Golden2002/legal-research-skill(MIT);官方检索渠道清单、 "严禁编造法条案例"原则,同时印证自 lawyerwangbo/legal-assistant-pro(MIT);…

系统性地找到、核实、引用现行有效的中国大陆法律依据,而不是凭印象说"法律规定 大概是这样"。核心纪律:只引用你真正检索到、能看到原文的规范,检索不到就 如实说检索不到,不用训练知识里的印象填空。

检索范围与位阶

按效力层级从高到低系统检索,遇到冲突时高位阶优先:

层级制定机关效力
法律全国人大及其常委会最高(低于宪法)
行政法规国务院低于法律
司法解释最高人民法院、最高人民检察院具有法律效力,各级法院必须适用
部门规章国务院各部委低于行政法规
地方性法规/地方政府规章省级/设区市人大、政府仅在其行政区域内有效
指导性案例最高人民法院/最高人民检察院发布具有参照效力(应参照,非强制适用)
典型案例最高人民法院等发布仅供参考,不具法律约束力

不要混淆"司法解释"(有法律效力)和"指导性案例"(有参照效力)——这是最常见 的检索错误之一。

官方免费检索渠道

优先用这些,不臆测某条规定的具体内容:

渠道网址用途
国家法律法规数据库flk.npc.gov.cn法律、行政法规官方原文
全国人大官网www.npc.gov.cn法律文本
国务院官网www.gov.cn行政法规原文
中国裁判文书网wenshu.court.gov.cn公开裁判文书
人民法院案例库rmfyalk.court.gov.cn最高法权威案例
最高人民法院官网www.court.gov.cn司法解释、指导性案例、典型案例
北大法宝www.pkulaw.cn综合法规数据库(部分内容需订阅)

检索失败、找不到权威原文时,明确告诉用户"未能检索到官方原文",不要退而用训练 知识里的印象替代——这比"检索不到"更容易造成错误依赖。

法条引用六要素

每一条法律依据都必须包含以下要素,不能只写"根据XX法规定":

要素说明示例
文件名称完整名称《中华人民共和国劳动合同法》
文号制定机关和文件编号主席令第65号
生效时间何时生效/最近一次修订2008年1月1日起施行
条款编号具体到条(能到款、项更好)第四十七条
原文引用逐字引用条文原文,不要转述"经济补偿按劳动者在本单位工作的年限,每满一年支付一个月工资的标准向劳动者支付……"
效力状态有效/已修改/已废止有效

引用司法解释时额外标注发布机关和文号格式(如"法释〔2020〕17号");引用地方性 规定时标注适用的行政区域范围(如"仅适用于上海市")。

案例引用规范与真实性铁律

这是最重要的纪律:绝不编造案例(案号、案情、裁判结果都不能编)。

每个案例引用必须包含:案例名称、案例类型(指导性案例/典型案例/公报案例/公开 判决书)、来源(发布机关或收录平台)、发布/判决日期、裁判要点(逐字或准确概括 原文)、相关法条、效力说明。

来源优先级(从高到低):

优先级来源效力
最高最高人民法院指导性案例具有参照效力,各级法院审理类似案件应参照
高最高人民法院公报案例具有参考价值
高最高人民检察院指导性案例具有参照效力
中中国裁判文书网公开判决需核实真实性(有真实案号和判决日期)
低律师事务所专业文章中援引的案例仅作参考,需核实
禁止匿名来源、社交媒体、未经核实的案例、学术论文中未标注案号的案例不可使用

禁止行为:

  • 编造案例(包括案号、案情、裁判结果)
  • 用"某案例""某公司"等模糊表述而不注明真实来源
  • 把推测或假设当作真实案例呈现
  • 把"典型案例"标注成"具有参照效力"(只有指导性案例才有)

检索不到真实案例支撑某个论点时,如实说"未检索到可靠的支撑案例",不要为了让 分析看起来完整就编一个。

条文互引梳理

标注法条之间的引用关系,帮助使用者理解规范体系:

  • 纵向引用(下位法引用上位法):如"《劳动合同法实施条例》第二十五条依据 《劳动合同法》第四十七条"
  • 横向引用(同位法内部):如"《劳动合同法》第八十七条的赔偿金计算引用了 第四十七条的经济补偿计算方式"
  • 司法解释引用法律:如"最高人民法院《关于审理劳动争议案件适用法律问题 的解释(一)》第一条依据《劳动争议调解仲裁法》"

格式:→ 引用关系:《劳动合同法》第87条 → 《劳动合同法》第47条(经济补偿计算标准)

规范冲突处理

遇到规范之间不一致:

  1. 说明适用规则——特别规定优于一般规定、新的规定优于旧的规定(这是《立法法》 确立的原则;具体条文序号在不同修订版本间可能变化,引用前先检索确认现行 有效版本的准确条号,不要凭记忆写死条号)。
  2. 结合最高人民法院相关司法解释或答复,说明司法实践中的实际倾向。
  3. 涉及地域差异时,标注地方性规定的适用范围,不要把地方性规定当全国通行规则。

时效速查(一般性参考,具体以现行有效法条为准)

事项期限依据
普通民事诉讼时效3年民法典第188条
最长权利保护期20年(自权利受损之日起)民法典第188条
劳动仲裁时效1年(拖欠劳动报酬在劳动关系存续期间不受此限)劳动争议调解仲裁法第27条
民事判决上诉期限15日(裁定10日)民事诉讼法相关规定
再审申请期限6个月(判决生效后)民事诉讼法相关规定
执行申请期限2年(判决生效后)民事诉讼法相关规定

这张表是快速参考起点,不是最终依据——引用到正式文书/意见前,务必按上面的 检索渠道核对现行有效条文,法律修订会改变期限和条号。

常见检索错误自查

错误说明正确做法
混淆司法解释和指导性案例前者有法律效力,后者有参照效力,不是一回事引用前确认文件性质
引用已失效/被修改的条文法律会修订,旧版本条号和内容可能已变核查效力状态,标注生效/修订时间
把地方性规定当全国通行规则地方性法规只在本行政区域有效标注适用范围
把部门规章误认成行政法规制定机关不同,效力层级不同按制定主体正确区分
遗漏新旧法替代关系未说明法律变更的时间节点标注变更时间和过渡适用规则
把典型案例当指导性案例引用效力完全不同引用前核实案例类型

输出建议

结论表达要标注确定性强度("高概率成立""存在争议""证据/依据不足无法判断"), 不用"必然""一定"这类绝对化表达。检索到的内容作为背景/依据呈现,具体到某个 争议的论证构建交给 legal-reasoning 技能;本技能负责把"依据是什么"这一步 做扎实。

边界

  • 不做检索之外的事——法律推理和论证构建用 legal-reasoning;批量文档审查用 legal-due-diligence。
  • 不接入付费商业法律数据库(如威科先行、北大法宝付费版)的 API——那需要用户 自己的订阅凭证和专门的集成,超出一个通用检索方法论技能的范围。只用免费的 官方公开渠道。

© open-octo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in internal/skills/experts/legal-search of open-octo/octo-agent.

  • SKILL.md
  • LICENSE.txt
  • PROVENANCE.md

Open the folder on GitHubat commit bbae80e

Compare with similar skills

Legal Search next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Legal Search compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Legal Search this skillopen-octo/octo-agent125—~996Automated safety check: PassMIT
Ljg Islijigang/ljg-skills7.5k—~671Automated safety check: PassMIT
Conflict ResolutionTHUYRan/Legal-Skills-Chinese874—~5.5kAutomated safety check: PassNone
Other Legal RetrievalTHUYRan/Legal-Skills-Chinese874—~5.2kAutomated safety check: PassNone
Case RetrievalTHUYRan/Legal-Skills-Chinese874—~6.7kAutomated safety check: PassNone
Light Idea CritiqueLight0305/Light-skills640—~4.7kAutomated safety check: PassMIT

Similar skills

  • Ljg Is

    lijigang/ljg-skills

    把一个名词或概念写成可使用的理解:先用普通话讲清它是什么、与相邻概念差在哪里,再说明它怎样运作、会改写什么判断,最后给出面对它时的行动抓手。USE WHEN 用户问 X 是什么、怎么理解、意味着什么、为什么重要、以后怎样判断或使用;尤其适合技术概念、制度、产品、角色、方法、规范与实践。NOT FOR 单纯查事实、公式证明、逐步操作教程、纵向因果深挖(用 ljg-think)或母题结构(用…

    7.5k GitHub stars~671 tokensUpdated 2 days ago
    Auto-check passed
  • Conflict Resolution

    THUYRan/Legal-Skills-Chinese

    当AI智能体在法律推理过程中遇到以下情形时触发本技能:(1)多个法律条文均可适用于同一事实(法条竞合);(2)不同证据之间存在矛盾或不一致(证据矛盾);(3)案件存在多个争议焦点需要确定审理或分析顺序(争点优先级排序);(4)不同法律渊源(法律、法规、司法解释、地方性法规等)对同一问题作出不同规定(法源冲突);(5)当事人主张与法律适用之间存在张力需要协调。本技能是法律推理的核心枢纽能力,几乎所…

    874 GitHub stars~5.5k tokensUpdated 1 mo ago
    Legal & ComplianceAuto-check passed
  • Other Legal Retrieval

    THUYRan/Legal-Skills-Chinese

    当智能体需要检索法律条文、司法解释、典型案例之外的辅助性法律信息时触发此技能。具体包括但不限于:立法背景资料(草案说明、审议报告、立法机关答记者问)、监管案例与行政处罚决定、地方指导意见与会议纪要、部门规章的起草说明与政策解读、行业标准与技术规范、法律实施情况报告、人大常委会执法检查报告、白皮书与政策文件、学术通说与权威教材观点、域外法律比较资料等。当用户问题涉及'为什么这样规定''立法目的是什…

    874 GitHub stars~5.2k tokensUpdated 1 mo ago
    Legal & ComplianceAuto-check passed
  • Case Retrieval

    THUYRan/Legal-Skills-Chinese

    当用户需要查找与当前法律问题相关的类似案例、相关判决、裁判规则时触发此技能。典型触发场景包括:用户明确要求查找类似案例或判例;需要通过既往裁判支撑法律论点;进行案件预判需要参考同类判决;撰写法律文书需要引用权威案例;分析某一法律问题的司法实践趋势;对比不同法院、不同时期对同一问题的裁判立场。关键词包括但不限于:类似案例、相关判决、判例检索、裁判规则、同类案件、指导性案例、典型案例、司法观点、裁判…

    874 GitHub stars~6.7k tokensUpdated 1 mo ago
    Legal & ComplianceAuto-check passed
  • Light Idea Critique

    Light0305/Light-skills

    Light 科研主线第 4 步·审 idea:以顶会审稿人标准严审 idea,撞车/无创新 fatal flaw 一票否决(critical 门), 逼出真能发表的 idea。何时用:用户问"这 idea 行不行/够不够新/能不能发""帮我严审/挑刺/找致命问题" / idea 定稿前把关 / 收到 idea-generation 的候选要审 / 怀疑撞车(被人做过)。触发词:审 idea /…

    640 GitHub stars~4.7k tokensUpdated 3 mo ago
    Agent WorkflowsAuto-check passed
  • Os Channel

    CronusL-1141/AI-company

    CC 与 Codex(或两个各自独立运行的 CC 会话)之间用 OS 信道留言、查未读、被新消息唤醒。触发:要跨 harness 把结论交给对端、给对端留言或清未读、用户问"能不能让 Claude 和 Codex 互相沟通"。不适用于派子 agent 或 workflow 内部协作——那是 Agent 与 SendMessage,信道对同会话的子 agent 没有意义。

    371 GitHub stars~969 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from open-octo/octo-agent

All 40 skills in this repo
  • Image Gen

    open-octo/octo-agent

    Acquire images as files — generate them with an AI image model (14 providers: OpenAI/gpt-image, Gemini, Qwen, Zhipu, Volcengine, Stability, FLUX, Ideogram, MiniMax, and more), search openly-licensed…

    125 GitHub stars~3.1k tokensUpdated yesterday
    Auto-check: notes
  • Office XLSX

    open-octo/octo-agent

    Create, read, and edit Excel (.xlsx) spreadsheets programmatically with openpyxl — cell values, formulas, styling (fonts/fills/borders/alignment/number formats), merged cells, multiple sheets…

    125 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check: notes
  • Artifact Design

    open-octo/octo-agent

    Design guidance for any HTML/Markdown file shown in octo's Artifacts panel — reports, dashboards, architecture/system diagrams, generated UIs, slide-style pages, 3D scenes.

    125 GitHub stars~2.7k tokensUpdated yesterday
    Auto-check passed
  • Code Review

    open-octo/octo-agent

    Review local code changes. An agent skill from open-octo/octo-agent.

    125 GitHub stars~942 tokensUpdated yesterday
    Auto-check passed
  • Ppt Master

    open-octo/octo-agent

    AI-driven multi-format SVG content generation system. An agent skill from open-octo/octo-agent.

    125 GitHub stars~23k tokensUpdated yesterday
    Auto-check: warnings
  • Config Setup

    open-octo/octo-agent

    Configure octo's global settings through guided conversation — set up AI model endpoints (providers, API keys, models), adjust agent defaults (reasoning effort, permission mode, coauthor, workspace…

    125 GitHub stars~3.3k tokensUpdated yesterday
    Auto-check passed

Questions about Legal Search

What does Legal Search do?

系统性检索中国大陆现行有效的法律、行政法规、司法解释、指导性案例,并按引用规范 输出。Use when 用户问"根据什么法律""法律怎么规定""这样做违法吗""能不能告" "查一下相关法条/司法解释/指导性案例"等需要查找并引用具体法律依据的问题。. Legal Search is an agent skill from open-octo/octo-agent.

When should I use Legal Search?

Legal Search fits situations like: 用户问根据什么法律法律怎么规定这样做违法吗能不能告 查一下相关法条/司法解释/指导性案例等需要查找并引用具体法律依据的问题.

How do I install Legal Search in Claude Code?

Run `npx skills add open-octo/octo-agent --skill legal-search -a claude-code`. Or copy the skill folder (internal/skills/experts/legal-search in open-octo/octo-agent) into .claude/skills/legal-search in your project. Claude Code loads it when a task matches its description.

How do I install Legal Search in Codex?

Run `npx skills add open-octo/octo-agent --skill legal-search -a codex`. Or copy the skill folder (internal/skills/experts/legal-search in open-octo/octo-agent) into .agents/skills/legal-search in your project. Codex loads it when a task matches its description.

Can I use Legal Search in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add open-octo/octo-agent --skill legal-search -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/legal-search, .gemini/skills/legal-search, .github/skills/legal-search and .opencode/skills/legal-search in your project.

What does Legal Search need to run?

SKILL.md names no scripts, command-line tools or credentials: Legal Search is instructions for the agent only.

Does Legal Search access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Legal Search safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Legal Search use?

Legal Search is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Legal Search use?

About 996 tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Legal Search?

Skills that share tags, products or a category with Legal Search: Ljg Is (lijigang/ljg-skills, 7.5k stars), Conflict Resolution (THUYRan/Legal-Skills-Chinese, 874 stars), Other Legal Retrieval (THUYRan/Legal-Skills-Chinese, 874 stars) and Case Retrieval (THUYRan/Legal-Skills-Chinese, 874 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Legal Search?

open-octo (a GitHub organization) maintains it in open-octo/octo-agent, which has 125 GitHub stars. The repository holds 40 skills in this directory. The repository was last updated on October 10, 2026.

Source: open-octo/octo-agent on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.