Agent skill

Legal Reasoning

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

用 IRAC(争点-规则-适用-结论)框架把事实和法律结合起来构建论证,并显式标注哪些 规则已核实、哪些是未核实的框架性认知。Use when 用户要求"帮我分析一下这个案子" "这属于什么法律关系""这个诉求站不站得住""帮我理一下论证逻辑""写一份法律分析 备忘录"等需要结构化论证而非简单问答的场景。产出是论证脚手架,不是最终法律意见。

Apache-2.0Auto-check passed

Install Legal Reasoning

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

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

GitHub CLI
$ gh skill install open-octo/octo-agent legal-reasoning --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-reasoning .claude/skills/legal-reasoning && 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-reasoning
GitHub stars
125
Token cost
~759 tokens
SKILL.md length
96 words
Files
3
Skills in repo
40
Repo updated
First seen
Licence
Apache-2.0

At a glance

用 IRAC(争点-规则-适用-结论)框架把事实和法律结合起来构建论证,并显式标注哪些 规则已核实、哪些是未核实的框架性认知。Use when 用户要求"帮我分析一下这个案子" "这属于什么法律关系""这个诉求站不站得住""帮我理一下论证逻辑""写一份法律分析 备忘录"等需要结构化论证而非简单问答的场景。产出是论证脚手架,不是最终法律意见。

  • 用户要求帮我分析一下这个案子 这属于什么法律关系这个诉求站不站得住帮我理一下论证逻辑写一份法律分析 备忘录等需要结构化论证而非简单问答的场景。产出是论证脚手架,不是最终法律意见
  • SKILL.md covers 核心原则, 引用来源标注体系, 工作流程 and 输出格式, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Legal Reasoning is an agent skill from open-octo/octo-agent. 用 IRAC(争点-规则-适用-结论)框架把事实和法律结合起来构建论证,并显式标注哪些 规则已核实、哪些是未核实的框架性认知。Use when 用户要求"帮我分析一下这个案子" "这属于什么法律关系""这个诉求站不站得住""帮我理一下论证逻辑""写一份法律分析 备忘录"等需要结构化论证而非简单问答的场景。产出是论证脚手架,不是最终法律意见。

Its SKILL.md is about 760 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 Apache-2.0.

When your agent uses it

  • 用户要求帮我分析一下这个案子 这属于什么法律关系这个诉求站不站得住帮我理一下论证逻辑写一份法律分析 备忘录等需要结构化论证而非简单问答的场景。产出是论证脚手架,不是最终法律意见

Example prompts

  • “帮我分析一下这个案子”
  • “这属于什么法律关系”
  • “这个诉求站不站得住”
  • “/legal-reasoning”

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 (its code samples are markdown).

    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 Reasoning loads about 759 tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 96 words of instructions outside code blocks.

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

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 Apache-2.0 licence (© open-octo). 96 words, ~759 tokens.

Download SKILL.mdSave it as .claude/skills/legal-reasoning/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
legal-reasoning
description
用 IRAC(争点-规则-适用-结论)框架把事实和法律结合起来构建论证,并显式标注哪些 规则已核实、哪些是未核实的框架性认知。Use when 用户要求"帮我分析一下这个案子" "这属于什么法律关系""这个诉求站不站得住""帮我理一下论证逻辑""写一份法律分析 备忘录"等需要结构化论证而非简单问答的场景。产出是论证脚手架,不是最终法律意见。
license
Apache-2.0 (adapted from anthropics/claude-for-legal, legal-clinic/skills/memo; complete terms in LICENSE.txt)
metadata.origin
IRAC 脚手架结构、"规则=未核实的研究缺口而非结论"原则、引用来源标注体系、 "检索不足不能悄悄补"原则,改编自 anthropics/claude-for-legal 的 legal-clinic/skills/memo/SKILL.md(Apache-2.0);已移除该项目诊所式教学场景…

法律推理的价值不在于说出一个听起来对的结论,而在于让"事实 → 规则 → 适用 → 结论" 这条链路每一环都经得起检验。这个技能提供 IRAC 脚手架,并且强制区分"已核实的规 则"和"未核实的知识",避免看起来自信、实际没有依据的分析。

核心原则

规则是研究缺口,不是默认结论。 除非你已经从权威来源(国家法律法规数据库、 裁判文书网、用户提供的法条/合同/材料)确认了具体规则,否则不要把模型训练知识里 "大概是这样"的规则当成确定依据写进 Rule 部分。可以给出框架性认知,但必须显式标 注为"未核实"。

不悄悄补检索缺口。 如果检索/技能返回的结果对某条规则覆盖不足,明确说出来, 给用户选项(换关键词重搜 / 换信息源 / 用网络检索但标注待核实 / 直接标记待核实并 停在这里),不要为了让分析看起来完整就用模型记忆填坑。一个诚实的"这里还没查清 楚"比一个自信的错误规则更有价值。

引用来源标注体系

论证里出现的每一条法条/判例引用都标注来源,方便使用者判断可信度:

标签含义
[官方检索]来自国家法律法规数据库、裁判文书网等官方源,或用户配置的法律检索技能/工具
[网络检索-待核实]来自 web_search/web_fetch,未必是权威源,需要核实
[模型记忆-待核实]从训练知识里回忆出来的规则/条文,未经检索确认,虚构风险最高
[用户提供]用户直接给出的材料(合同文本、案情陈述、已有法律意见)

待核实标签不能省略或合并——它是使用者判断"这条该先去核实"的最快信号。

遇到用户或材料引用的具体法条,如果你不确定是否准确: 不要凭印象描述该条款 "大概是什么意思"。要么去检索确认原文并引用,要么直接说"这条我没有把握准确复述 内容,建议核对原文"。凭印象编出一个听起来合理但错误的条文内容,比说"不确定"更 糟糕——前者会被当真,后者不会。

工作流程

第一步:把争点表述成问题

从事实材料里提炼出真正需要回答的法律问题,用问句表述,而不是一个名词短语。 不写"违约责任",写"合同约定的交付延迟是否构成根本违约,能否据此解除合同并 主张违约金"。多个争点各自独立成一个 IRAC 块。

第二步:搭建每个争点的 IRAC

争点(Issue): 第一步得到的问句。

规则(Rule): 这是研究缺口,不是结论。按上面的核心原则,明确写出:

[待核实:需要确认xx地区/xx法律关系下的具体规则——从xx法律的xx章节入手, 再看是否有对应司法解释或指导性案例。]

如果你对通用法律框架有较高把握(例如"违约方需承担继续履行、采取补救措施或 赔偿损失等违约责任"是常见的一般性认知),可以先给出框架作为起点,但必须显式 标注未核实:

框架性认知(未核实,需按具体适用法律确认): [一般性规则] [待核实: 具体构成要件和法律后果]

适用(Application): 把关键事实逐条对应到规则的构成要件上,列出哪些事实 支持、哪些事实不利、哪些事实还不清楚。这一步不能跳过论证直接给结论——如果某个 要件的事实不足以判断,明确写"事实不足,需要补充:xxx"。

结论(Conclusion): 基于前面的规则和适用得出,而不是先有结论再倒推论证。 如果规则部分还有未核实的关键项,结论要相应降低确定性并说明前提。

第三步:梳理优势、劣势、未决问题

在所有 IRAC 块之后,单独列出:

  • 有利事实: 对论证有利的事实点及原因
  • 不利事实: 对论证不利的事实点及原因(不确定是否真的不利时标 [待判断])
  • 未决问题:
    • 事实类:还需要向用户/当事人确认什么
    • 法律类:还需要检索什么(这部分直接对应"待核实"标签,可以逐条去检索核实)
    • 策略类:需要用户自己权衡取舍的判断题,不代替用户做决定

输出格式

markdown
# 法律分析备忘录:[事项名称]

## 结论先行
[基于现有信息的初步判断,以及这个判断依赖哪些还未核实的前提]

## 争点
1. [争点1,问句形式]
2. [争点2,问句形式]

## 争点 1:[争点]

### 规则
[已核实规则 + 来源标签,或待核实框架]

### 适用
[事实逐条对应]

### 结论
[基于以上的判断,附带确定性说明]

---

## 优势
[列表,附标注]

## 劣势
[列表,附标注]

## 未决问题
**事实:** [列表]
**法律:** [列表——这些是下一步该去检索核实的]
**策略:** [列表——需要用户自己判断]

---

**引用核验提醒:** 以上标注 `[网络检索-待核实]` `[模型记忆-待核实]` 的规则/条文,
在用于任何正式场合(合同修改、函件、诉讼材料)之前,请通过国家法律法规数据库、
裁判文书网或专业法律数据库核实准确性和现行有效性。

**本备忘录是论证脚手架,不是最终法律意见。** 结论部分给出的是基于现有信息的
推演,重大决策(是否起诉、是否签署、赔偿金额谈判底线)请交由持证律师复核。

边界

  • 不代替用户做策略性判断(打不打这场官司、接不接受和解条件)——"策略"类未决 问题就是把这类判断题清楚地摆出来,决定权在用户。
  • 不在"规则"部分伪造确定性——宁可多标一个"待核实",也不要漏标一个。
  • 批量处理多份文档、多个类似案例找规律:这是 legal-due-diligence 的场景, 本技能聚焦单一争议/单一事项的论证构建。

© open-octo, Apache-2.0. 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-reasoning of open-octo/octo-agent.

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

Open the folder on GitHubat commit bbae80e

Compare with similar skills

Legal Reasoning 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 Reasoning compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Legal Reasoning this skillopen-octo/octo-agent125—~759Automated safety check: PassApache-2.0
Deepseek Reasonruvnet/ruflo74k—~626Automated safety check: NotesMIT
Ejentum Reasoning Harnesssickn33/agentic-awesome-skills47k1 repos~1.9kAutomated safety check: PassMIT
Nowait Reasoning Optimizerdavila7/claude-code-templates33k2 repos~1.2kAutomated safety check: PassMIT
Irac Practiceanthropics/claude-for-legal9.6k3 repos~2.6kAutomated safety check: PassApache-2.0
Recall Reasoningparcadei/Continuous-Claude-v33.9k1 repos~758Automated safety check: PassMIT

Similar skills

  • Deepseek Reason

    ruvnet/ruflo

    Reasoning-mode completion against DeepSeek's deepseek-reasoner model (R1) via /v1/chat/completions.

    74k GitHub stars~626 tokensUpdated yesterday
    AI & LLM EngineeringAuto-check: notes
  • Ejentum Reasoning Harness

    sickn33/agentic-awesome-skills

    MCP server exposing four cognitive harness modes (reasoning, code, anti-deception, memory).

    47k GitHub starsUsed in 1 repo~1.9k tokens
    DevelopmentAuto-check passed
  • Nowait Reasoning Optimizer

    davila7/claude-code-templates

    Implements the NOWAIT technique for efficient reasoning in R1-style LLMs.

    33k GitHub starsUsed in 2 repos~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Irac Practice

    anthropics/claude-for-legal

    Official

    Grade an IRAC essay for structure, issue-spotting, rule accuracy, analysis depth, and organization.

    9.6k GitHub starsUsed in 3 repos~2.6k tokens
    Auto-check passed
  • Recall Reasoning

    parcadei/Continuous-Claude-v3

    Search past reasoning for relevant decisions and approaches. An agent skill from parcadei/Continuous-Claude-v3.

    3.9k GitHub starsUsed in 1 repo~758 tokens
    DevelopmentAuto-check passed
  • Nv Reason Cxr

    NVIDIA/skills

    Official

    Used for command-shape or live NV-Reason-CXR chest X-ray reasoning smoke tests.

    3.6k GitHub stars~3.9k tokensUpdated yesterday
    Testing & QAAuto-check: notes

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 Reasoning

What does Legal Reasoning do?

用 IRAC(争点-规则-适用-结论)框架把事实和法律结合起来构建论证,并显式标注哪些 规则已核实、哪些是未核实的框架性认知。Use when 用户要求"帮我分析一下这个案子" "这属于什么法律关系""这个诉求站不站得住""帮我理一下论证逻辑""写一份法律分析 备忘录"等需要结构化论证而非简单问答的场景。产出是论证脚手架,不是最终法律意见。. Legal Reasoning is an agent skill from open-octo/octo-agent.

When should I use Legal Reasoning?

Legal Reasoning fits situations like: 用户要求帮我分析一下这个案子 这属于什么法律关系这个诉求站不站得住帮我理一下论证逻辑写一份法律分析 备忘录等需要结构化论证而非简单问答的场景。产出是论证脚手架,不是最终法律意见.

How do I install Legal Reasoning in Claude Code?

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

How do I install Legal Reasoning in Codex?

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

Can I use Legal Reasoning 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-reasoning -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-reasoning, .gemini/skills/legal-reasoning, .github/skills/legal-reasoning and .opencode/skills/legal-reasoning in your project.

What does Legal Reasoning need to run?

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

Does Legal Reasoning 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 Reasoning 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 Reasoning use?

Legal Reasoning is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Legal Reasoning use?

About 759 tokens (SKILL.md is roughly 3k 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 Reasoning?

Skills that share tags, products or a category with Legal Reasoning: Deepseek Reason (ruvnet/ruflo, 74k stars), Ejentum Reasoning Harness (sickn33/agentic-awesome-skills, 47k stars), Nowait Reasoning Optimizer (davila7/claude-code-templates, 33k stars) and Irac Practice (anthropics/claude-for-legal, 9.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Legal Reasoning?

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.