legal-drafting

legal-drafting is a skill for Claude Code, Codex from open-octo/octo-agent. It costs 159 tokens per session (5,410 once invoked), scanned A, original, MIT.

A guide for drafting common legal documents used in mainland China, including court filings, lawyer letters, legal opinions, and contract drafts. It marks facts, amounts, legal grounds, and other details that still need verification.

In plain words
What is it for?
It helps prepare complaints, defenses, appeals, arbitration applications, enforcement requests, preservation applications, lawyer letters, and standard contract structures.
Why use it?
It gives users a usable starting draft without pretending that unknown facts or case-specific legal decisions are settled.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps prepare complaints, defenses, appeals, arbitration applications, enforcement requests, preservation applications, lawyer letters, and standard contract structures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/open-octo/octo-agent/legal-drafting
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add open-octo/octo-agent --skill legal-drafting
Clone the repo
git clone --depth 1 https://github.com/open-octo/octo-agent

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 legal-drafting

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/open-octo/octo-agent/legal-drafting"><img src="https://agentmods.dev/badge/skills/open-octo/octo-agent/legal-drafting.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 159 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,410 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00159 $0.05410
Opus 5 $0.00079 $0.02705
Sonnet 5 $0.00032 $0.01082
Haiku 4.5 $0.00016 $0.00541

Measured 8d ago against content hash 5853040400b1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

legal-drafting 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 8d 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.

internal/skills/experts/legal-drafting/SKILL.md · 548 lines

How it starts

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

撰写一份能直接使用(或稍加核实即可使用)的中国大陆法律文书。产出是草稿,不是 最终定稿——涉及具体金额、管辖法院、法律依据的地方,标注清楚"待核实/待补充", 不要替用户编造具体数字或杜撰不确定的事实。

第一步:确定文书类型

案由匹配(民商事案件)

先确定案由,案由决定了法律关系的定性,进而影响文书怎么写:

  1. 识别法律关系:双方是否签了合同?→合同关系;有人身/财产损害?→侵权 关系;涉及婚姻家庭?→婚姻家庭关系。
  2. 匹配大类:常见大类包括人格权纠纷、婚姻家庭纠纷、合同纠纷(买卖/借款/ 租赁/承揽/建设工程/运输/保管/委托/技术服务等)、侵权责任纠纷(交通事故/ 医疗损害/产品责任/网络侵权等)、物权纠纷、劳动争议、知识产权纠纷、公司相关 纠纷、票据纠纷、保险纠纷等,参照《民事案件案由规定》确认具体归类。
  3. 确定具体案由:优先选最具体的案由,不用笼统案由(例如"借贷纠纷"应写 "民间借贷纠纷"而不是"欠款纠纷"——欠款可能是多种法律关系导致的,不等于 借贷)。
  4. 交叉验证:该案由的适用条件是否满足?对方主体是否符合要求?是否有 专属管辖规定?

合同纠纷/侵权责任竞合时,向用户说明可以择一起诉,并给出各自的利弊而不是替 用户悄悄做决定。

诉讼阶段 + 当事人地位 → 文书类型

先确定案件处于哪个阶段,再结合用户的诉讼地位确定文书类型:

阶段 当事人地位 文书类型
仲裁 申请人 商事仲裁申请书
仲裁 被申请人 仲裁答辩书
一审 原告 起诉状
一审 被告 答辩状
一审 反诉原告 反诉状
一审 反诉被告 反诉答辩状
二审 上诉人 上诉状
二审 被上诉人 上诉答辩状
再审 再审申请人 再审申请书
再审 被申请人 再审答辩状
执行 申请执行人 强制执行申请书
执行 被执行人 执行异议申请书
保全 申请人 财产保全申请书
保全 被申请人 保全异议申请书

不确定阶段或地位时先问用户,不要凭猜测直接开始起草。

通用排版规范

中国大陆法院诉讼文书的通行排版惯例:

  • 标题:宋体加粗二号,居中
  • 正文:仿宋小三号
  • 行距:28磅,段前段后0
  • 首行缩进:2字符

write_file 产出 Markdown/文本草稿时,在文末注明这套排版规范,方便用户 拿去 Word 里排版;本技能不直接生成排版好的 .docx 文件。

诉讼文书

起诉状

民事起诉状

原告:[姓名/名称],[性别],[出生日期],[民族],
住所地:[地址]
统一社会信用代码/身份证号:[代码/号码]
法定代表人:[姓名],[职务]
委托诉讼代理人:[姓名],[律所名称]律师

被告:[姓名/名称],[性别],[出生日期],[民族],
住所地:[地址]
统一社会信用代码/身份证号:[代码/号码]

诉讼请求:

一、判令被告[具体请求];
二、判令被告承担本案全部诉讼费用。

(暂计标的额:人民币[金额]元)

事实与理由:

[签约情况] [合同核心条款] [履行情况] [违约事实/争议事实] [催告/协商情况]

综上所述,原告依据《中华人民共和国民法典》第XXX条等相关规定,诉至贵院,望判如所请!

此致
[法院名称]

具状人:[原告名称]
[日期:年 月 日]

诉讼请求写法:

  • 暂计标的额在请求后用括号标注
  • 违约金按"基数→利率→起算→截止→暂计"的顺序表述,例如:"以XX元为基数, 自XXXX年XX月XX日起按全国银行间同业拆借中心公布的一年期贷款市场报价利率 (LPR)的X倍计算至实际清偿之日止,暂计至XXXX年XX月XX日为XX元"(LPR统一 小写)
  • 诉讼费作为独立一项列在最后
  • 给付之诉 > 确认之诉 > 形成之诉,按此优先顺序排列多项请求

事实与理由三段式: ①签约(时间+合同名称+核心条款摘要)②履行("上述合同 签订后,……"+具体履约细节)③违约+催告(违约事实→催告经过→"故诉至贵院, 望判如所请")

注意: 法条引用宜少不宜多;案由提交前需再次确认;管辖法院要同时确认 级别管辖和地域管辖;提醒用户保留证据原件备查。

答辩状

民事答辩状

答辩人(被告):[名称/姓名]
住所地:[地址]
被答辩人(原告):[名称/姓名]
住所地:[地址]

因答辩人与被答辩人[案由]纠纷一案(案号:[案号]),答辩人现提出答辩如下:

答辩意见

不同意被答辩人的全部诉讼请求,望贵院依法驳回。

一、[具体答辩意见1——事实层面]
二、[具体答辩意见2——法律层面]
三、[具体答辩意见3——金额/计算层面]

综上所述,答辩人认为被答辩人的诉讼请求缺乏事实和法律依据,请求贵院依法驳回。

此致
[法院名称]

答辩人:[答辩人名称]
[日期:年 月 日]

Read the full file on GitHub · 548 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 548 lines · 159 tokens per session scan A 5853040400b1

Subscribe to this mod's changes

legal-drafting is a skill published in the GitHub repository open-octo/octo-agent (97 stars, last pushed yesterday), licensed MIT. It adds 159 tokens to every session and 5,410 once invoked, about $0.0008 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.

Related

Other skills, from other repositories

uspto-database

Access USPTO APIs for patent/trademark searches, examination history (PEDS), assignments, citations, office actions, TSDR, for IP analysis and prior art searches.

synthetic-sciences/openscience · 40 tokens

fda-database

Query openFDA API for drugs, devices, adverse events, recalls, regulatory submissions (510k, PMA), substance identification (UNII), for FDA regulatory data analysis and safety research.

synthetic-sciences/openscience · 43 tokens

ha-mac-control

Hope Agent native macOS desktop control — the standard maccontrol status / diagnostics / apps / dock / spaces / snapshot / visual / windows / menu / clipboard / dialog loop, target-first action rules, no-blind-coordinate policy, and recovery for stale AX/window/menu/dialog state. Load whenever using maccontrol, or…

shiwenwen/hope-agent · 139 tokens

ha-skill-creator

Create, edit, improve, or audit Hope Agent skills. Use when the user wants to: (1) create a new skill from scratch, (2) edit or improve an existing skill, (3) review or clean up a SKILL.md file, (4) run evaluations to test skill effectiveness, (5) optimize skill descriptions for better trigger accuracy. Trigger…

shiwenwen/hope-agent · 106 tokens

ha-browser

Hope Agent browser automation — the standard status → tabs → snapshot → act loop, stale-ref recovery rules, and what to do when login / 2FA / captcha / camera-prompt / dialog blocks progress. Load this skill whenever you reach for the browser tool. Trigger on: user asks the agent to open / control / click / scrape /…

shiwenwen/hope-agent · 140 tokens

ha-logs

A read-only troubleshooting skill for querying Hope Agent’s local SQLite databases, which store logs, conversations, and background-job status.

shiwenwen/hope-agent · 183 tokens