Borrowing it
Nothing to install: this file belongs to code-lawyer/Legal-Agent-Skills. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/code-lawyer/Legal-Agent-Skills/main/CLAUDE.mdgit clone --depth 1 https://github.com/code-lawyer/Legal-Agent-SkillsWrote 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.
[](https://agentmods.dev/instructions/code-lawyer/legal-agent-skills/claude-md)<a href="https://agentmods.dev/instructions/code-lawyer/legal-agent-skills/claude-md"><img src="https://agentmods.dev/badge/instructions/code-lawyer/legal-agent-skills/claude-md/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.
<a href="https://agentmods.dev/instructions/code-lawyer/legal-agent-skills/claude-md"><img src="https://agentmods.dev/badge/instructions/code-lawyer/legal-agent-skills/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02053 | $0.02053 |
| Opus 5 | $0.01026 | $0.01026 |
| Sonnet 5 | $0.00411 | $0.00411 |
| Haiku 4.5 | $0.00205 | $0.00205 |
Grade A, and why
Legal-Agent-Skills CLAUDE.md 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 12d 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.
How it starts
The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
本仓库是什么
面向文件系统类 AI agent的一组中文法律执业级 Agent Skills。内容规则为主、工具代码为辅。
交付单元是整个 skill 文件夹,不是单个 SKILL.md——只交 SKILL.md 一个文件,agent 会读不到
references/、rules/ 里的正文。当前有三个 skill:contract-review/(中美双法域合同审查)、
legal-research/(法律研究与类案检索)、document-fill/(按本案知识库给文书模板取证填充)。
先读:作者宪章(PRINCIPLES.md)
顶层 PRINCIPLES.md 是做 skill 时的最高原则(作者宪章),约束的是作者/你,不是终端 agent;
它不写进任何 SKILL.md 正文,skill 运行时不读它。动手改任何 skill 或造新 skill 前先通读它,
并按四层原则(元层 M / 工程 E / 法律 L / 产品 P)自检。几条最常踩的:
- E1 自包含:每个 skill 零依赖本库其他 skill,可单独下载使用;不建共享底座,需要相同内容就
各自复制一份。skill 内所有引用路径相对该
SKILL.md目录解析,禁止越出本 skill 目录。 - E3 只补模型做不到/会跳过的:不要把 LLM 本就会的法学方法论(三段论、目的解释、IRAC、类推……) 写进 skill 去"提示"它——纯浪费 token。skill 的价值只在五处:①来源核验/防幻觉 ②不可靠的领域事实 (条号/阈值/最新司法解释状态/强制条款)③易跳步骤的强制函数 ④格式与法域行文惯例 ⑤工具编排。
- L1 防幻觉第一:法条/案例绝不靠模型记忆;每条法律命题挂且仅挂一个来源标签。
宪章若需修订,改 PRINCIPLES.md 并在其《变更日志》追加一行起因。
常用命令
要求 Python 3.8+。
pip install -r requirements-dev.txt # 装 python-docx + pytest(开发/测试栈)
# 结构校验——改动任一 skill 的 references/ 或 rules/ 后必跑,绿了才提交
python contract-review/validate.py # 预期 ✅ 通过(退出码 0;有硬错误退 1)
python legal-research/validate.py # 同上
# 单元测试
python -m pytest contract-review/scripts/test_redline_docx.py legal-research/tests/ -q
python -m pytest contract-review/scripts/test_redline_docx.py -q -k <关键字> # 跑单个测试
CI(.github/workflows/ci.yml)在每次 push / PR 跑上述 validate + pytest 全部,作为合并前门禁;
打 tag 由 release-skill.yml 自动校验 + 打包 + 发 Release,校验不过不发布。
架构大图(跨文件才能看懂的部分)
渐进式披露是核心架构。 每个 skill 的 SKILL.md 只放常驻底线 + 按需读取索引;正文分层进
references/(法域中立骨架、输出模板、验证、终检门)与 rules/<法域>/(可插拔规则包)。agent 运行时
分阶段按需读取,既省 token 又保证深层规则不被跳过。validate.py 用行预算把这套结构钉死:
SKILL.md ≤80 行(contract)/≤130(research),references 数字前缀文件 ≤260,_general.md ≤200,
领域卡 ≤150。改内容时别把该分层的东西塞回 SKILL.md。
三个 skill 边界互斥、彼此路由:合同相关 → contract-review;法律问题论证/类案检索 →
legal-research;按本案知识库给文书模板取证填充 → document-fill(论证说理留空、路由回研究/起草)。
均不做起草论证、续约提醒、流程图。改一个 skill 的边界描述时,注意其余 skill 的路由指向要对得上。
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.
- 12d ago First seen · 92 lines · 2,053 tokens per session scan A d484d54be665
Legal-Agent-Skills CLAUDE.md is an instructions file published in the GitHub repository code-lawyer/Legal-Agent-Skills (2 stars, last pushed 20d ago), licensed MIT. It adds 2,053 tokens to every session, about $0.0103 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-08-31.
Other instructions, from other repositories
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).