document-fill

document-fill is a skill for Claude Code, Codex from code-lawyer/Legal-Agent-Skills. It costs 61 tokens per session (1,153 once invoked), scanned A, original, MIT.

A document-filling assistant that uses a supplied template and case files to fill in forms, contracts, or legal documents. It also reports where each filled value came from and which details are missing.

In plain words
What is it for?
Use it to complete a document template from case records, evidence, notes, or another provided knowledge base. It is for extracting facts into fields, not for writing legal arguments or reviewing contract risks.
Why use it?
It reduces manual searching through case materials and helps prevent unsupported details from being added. Missing information is clearly marked for later completion.

Skill for Claude CodeCodex

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

Good fit Use it to complete a document template from case records, evidence, notes, or another provided knowledge base. It is for extracting facts into fields, not for writing legal arguments or reviewing contract risks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/code-lawyer/legal-agent-skills/document-fill
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 code-lawyer/Legal-Agent-Skills --skill document-fill
Clone the repo
git clone --depth 1 https://github.com/code-lawyer/Legal-Agent-Skills

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 document-fill

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/code-lawyer/legal-agent-skills/document-fill"><img src="https://agentmods.dev/badge/skills/code-lawyer/legal-agent-skills/document-fill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,153 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.00061 $0.01153
Opus 5 $0.00030 $0.00576
Sonnet 5 $0.00012 $0.00231
Haiku 4.5 $0.00006 $0.00115

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

Security

Grade A, and why

document-fill 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 10d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/fill_docx.py, scripts/fill_lint.py, scripts/test_fill_docx.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

document-fill/SKILL.md · 47 lines

What it actually says

文书模板填充(按本案知识库取证填空)

文件定位(先读)

本 skill 由多个文件组成。下文所有 references/…scripts/… 路径均相对于本 SKILL.md 所在目录。开始前先确定该目录(你被指向或读取本文件时所在的位置),之后所有读取都基于它解析,不要用当前工作目录去找。

何时使用

  • 用户给了一份文书模板/表单(起诉状、答辩状、合同模板等占位符文本)+ 本案知识库(案卷材料、证据、笔录等),要求按模板把待填项填好。
  • 用户明确要求「按案卷填一份模板」「把这份表单填了」「用知识库填这份文书」。
  • 上游技能路由到文书填充。

任务边界

本技能只做模板 × 本案知识库 的取证填充,产出干净文书 + 溯源/缺口报告。不做以下事项:

  • 说理论证、法律主张的论证性文字撰写 → 路由 legal-research(论证)或起草类技能(成文)
  • 法律问题研究、类案检索 → 路由 legal-research
  • 合同审查、条款风险评估、红线稿 → 路由 contract-review

硬不变量(常驻,不可跳过)

无论任务大小、读没读全深层文件,以下底线始终生效:

  • 闭世界:只使用本案材料(知识库内文件)取证;本案材料之外的任何来源(模型记忆、常识、网络)一律不得作为填入值的依据。
  • 宁可查不到,也不编造:材料中确实找不到的待填项,写「未在本案材料中找到」,绝不脑补、绝不用推测值冒充事实。
  • 缺口显性标注:找不到、待人工补充的待填项必须在填充计划与最终文书中显性标出(status: gap),不得静默留白或悄悄跳过。
  • 每个填入值挂且仅挂一个状态标签extracted / inferred / user_confirmed / ambiguous / gap / pending_drafting 六选一,不得混用或省略;各状态必填字段见 references/_templates/fill-plan-contract.md
  • Mode-2 强约束status: extractedvalue 必须能在其 source_span.quote 的原文字符串中逐字命中,不允许同义改写、数值换算或跨句拼接冒充摘录;此规则由 scripts/fill_lint.py 机检强制执行。
  • 论证型待填项一律留空slot_type: argument(如"事实与理由"这类说理性文字)不属于本 skill 的填空范围,一律 status: pending_drafting,交起草/论证环节处理,不由本 skill 代写。

执行顺序(按需读取,不要一次读全)

  1. references/00-workflow.md,了解主流程与阶段划分。
  2. 探测/接入本案知识库时读 references/10-kb-access.md
  3. 识别模板待填项、逐项取证填充时读 references/20-slot-and-fill.md
  4. 出稿(渲染文书)与出溯源/缺口报告时读 references/30-output-and-report.md

按需读取索引

  • references/00-workflow.md — 主流程与阶段划分
  • references/10-kb-access.md — 本案知识库探测与接入
  • references/20-slot-and-fill.md — 待填项识别 + 取证填充规则
  • references/30-output-and-report.md — 出稿方式 + 溯源/缺口报告格式
  • references/_templates/fill-plan-contract.md — 填充计划 JSON 契约(字段表 + 各 status 必填字段 + Mode-2 说明)
  • scripts/fill_lint.py — 填充计划确定性闸门:机检来源锚定完整性与状态合法性,输出覆盖率账本
  • scripts/fill_docx.py — 把填充计划渲染进模板;docx 优先,缺 python-docx 或模板非 docx 时降级为 markdown 并显式返回 degraded=True

读取失败必须明说,不静默跳过。

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. 10d ago First seen · 47 lines · 61 tokens per session scan A 35946309fb14

Subscribe to this mod's changes

document-fill is a skill published in the GitHub repository code-lawyer/Legal-Agent-Skills (2 stars, last pushed 18d ago), licensed MIT. It adds 61 tokens to every session and 1,153 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-08-31.

Related

Other skills, from other repositories

evidence-catalog-generator

Organize user-provided evidence materials into evidence catalog entries and fill them into a user-provided or generic DOCX template. The public version contains no real case template, parties, docket numbers, facts, amounts, addresses, or local file paths.

lawyerllsx-dotcom/Legal-Workflow-Chain · 56 tokens

kr-patent-full-workflow

A coordinator for writing a Korean patent specification from start to finish. It guides the work through invention interviews, claim preparation, technical details, consistency checks, and final DOCX output.

lsj4232/KR_PATENT_SKILL · 305 tokens

kr-patent-docx-builder

Nástroj na automatické vytváranie súborov DOCX s textom patentovej prihlášky podľa formulárov Kórejského úradu pre duševné vlastníctvo.

lsj4232/KR_PATENT_SKILL · 224 tokens

kr-patent-format-unify

A Microsoft Word document-formatting tool for Korean patent specifications. It finds newly added paragraphs and copies the surrounding paragraph and text formatting onto them.

lsj4232/KR_PATENT_SKILL · 560 tokens

kr-patent-navigation-pane

A tool for adding Word document outline levels to Korean patent specifications without changing their visible formatting.

lsj4232/KR_PATENT_SKILL · 394 tokens

legal-citation-comprehensive

A Chinese and foreign legal-citation tool for checking, completing, explaining, and formatting footnotes under the second edition of a legal citation manual. It handles laws, cases, legal documents, and academic sources when the relevant source material is provided.

lawyerllsx-dotcom/Legal-Workflow-Chain · 119 tokens