legal-toa-formatter

legal-toa-formatter is a skill for Claude Code, Codex from NEU-ZHA/legal-ai-skills. It costs 91 tokens per session (1,424 once invoked), scanned A, original, MIT.

A document-formatting tool for a Table of Authorities, the part of a legal document that lists cited cases, laws, and other authorities with page numbers. It aligns entries with dot leaders, the rows of dots between a citation and its page number.

In plain words
What is it for?
It is for standardizing the formatting of cases, statutes, and other authorities in Word documents, especially their tab stops and dotted page-number alignment.
Why use it?
It makes legal citation lists visually consistent without manually typing different numbers of dots.

Skill for Claude CodeCodex

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is cd temp_unpacked && zip -r ../output.docx . -x "*.DS_Store".

Good fit It is for standardizing the formatting of cases, statutes, and other authorities in Word documents, especially their tab stops and dotted page-number alignment.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/NEU-ZHA/legal-ai-skills
agentmods
npx agentmods add skills/neu-zha/legal-ai-skills/legal-toa-formatter

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-toa-formatter

README.md
[![agentmods](https://agentmods.dev/badge/skills/neu-zha/legal-ai-skills/legal-toa-formatter/github.svg)](https://agentmods.dev/skills/neu-zha/legal-ai-skills/legal-toa-formatter)
Your own site
<a href="https://agentmods.dev/skills/neu-zha/legal-ai-skills/legal-toa-formatter"><img src="https://agentmods.dev/badge/skills/neu-zha/legal-ai-skills/legal-toa-formatter/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-toa-formatter

Your own site · 80×15
<a href="https://agentmods.dev/skills/neu-zha/legal-ai-skills/legal-toa-formatter"><img src="https://agentmods.dev/badge/skills/neu-zha/legal-ai-skills/legal-toa-formatter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,424 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.00091 $0.01424
Opus 5 $0.00046 $0.00712
Sonnet 5 $0.00018 $0.00285
Haiku 4.5 $0.00009 $0.00142

Measured 13d ago against content hash 76870fe340c8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

legal-toa-formatter 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 13d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/fix_toa_format.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.

skills/legal-toa-formatter/SKILL.md · 143 lines

How it starts

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

Overview

规范化法律文书中 Table of Authorities (TOA) 的条目格式。核心功能:将所有TOA条目统一修改为与参考条目相同的点号填充(dot leader)对齐格式,确保引用名称与页码之间的视觉一致性。

When to Use

  • 用户要求修改 TOA/Table of Authorities 条目格式
  • 条目需要点号填充对齐(dot leader alignment)
  • 需要统一多个 TOA 条目的样式
  • 触发词:TOA、Table of Authorities、法律文书格式修改、点号对齐

Core Concept

关键理解:Word 的制表符对齐使用 w:leader="dot" 属性,让 Word 自动填充点号,不是在文本中手动添加点号字符。

Workflow

Step 1: 分析源文档

  1. 解包 docx 文件:

    unzip -o input.docx -d temp_unpacked
    
  2. 找到 TOA 所在 section(通常在 word/document.xml 的 TOX(Table of Start) 字段中)

  3. 定位 TOA 条目:搜索 <w:p> 段落中包含制表符 <w:tab/> 的条目

Step 2: 分析参考格式

找到第一个正确格式的条目(通常是 TOA 标题后的第一条),分析其 XML 结构:

<w:p>
  <w:pPr>
    <w:widowControl w:val="0"/>
    <w:tabs>
      <w:tab w:val="right" w:leader="dot" w:pos="9016"/>
    </w:tabs>
    <w:spacing w:line="480" w:lineRule="auto"/>
    <w:jc w:val="both"/>
    <w:rPr>
      <w:rFonts w:hint="default" w:ascii="Times New Roman Regular" .../>
      <w:kern w:val="2"/>
      <w:sz w:val="24"/>
      <w:szCs w:val="24"/>
      <w:lang w:val="en-US" w:eastAsia="zh-CN" w:bidi="ar-SA"/>
    </w:rPr>
  </w:pPr>
  <w:r>
    <w:t>, 486 U.S. 531 (1988)</w:t>
  </w:r>
  <w:r>
    <w:tab/>
  </w:r>
  <w:r>
    <w:t>4, 5, 6, 7</w:t>
  </w:r>
</w:p>

关键元素

  • <w:tabs><w:tab w:val="right" w:leader="dot" w:pos="9016"/></w:tabs> - 定义右对齐点号填充制表位
  • <w:tab/> - 在文本中插入制表符位置
  • 制表位位置 pos="9016" 是 twips 单位(1/20 点)

Step 3: 修改目标条目

对于每个需要修改的条目:

  1. 确保 <w:pPr> 包含正确的 <w:tabs> 定义

  2. 如果条目有 <w:tabs> 但 leader 不是 "dot",修改为 w:leader="dot"

  3. 如果条目完全没有 <w:tabs>,在 <w:pPr> 中的适当位置添加:

    <w:tabs>
      <w:tab w:val="right" w:leader="dot" w:pos="9016"/>
    </w:tabs>
    
  4. 在引用名称与页码之间插入 <w:tab/> 元素

Step 4: 重新打包

cd temp_unpacked && zip -r ../output.docx . -x "*.DS_Store"

Quick Fix Script

对于批量处理,使用 scripts/fix_toa_format.py

python3 scripts/fix_toa_format.py input.docx output.docx

脚本会自动:

  1. 解包 docx
  2. 定位 TOA 条目
  3. 应用一致的点号填充格式
  4. 重新打包

Read the full file on GitHub · 143 lines

Files

What ships with it

1 file 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. 13d ago First seen · 143 lines · 91 tokens per session scan A 76870fe340c8

Subscribe to this mod's changes

legal-toa-formatter is a skill published in the GitHub repository NEU-ZHA/legal-ai-skills (64 stars, last pushed 23d ago), licensed MIT. It adds 91 tokens to every session and 1,424 once invoked, about $0.0005 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-30.

Related

Other skills, from other repositories

html-ppt-zhangzara-stencil-tablet

A workplace-safety compliance review for a manufacturing regulator — findings, the evidence chain, and the corrective mandate. Built as a decision-grade policy briefing deck for regulator, plant leadership.

nexu-io/open-design · 49 tokens

treatment-plans

Format and structurally validate local treatment-plan documentation after clinical decisions have already been supplied and verified by authorized licensed professionals. Use for source traceability, clinician-authored intervention records, goals and checkpoints, shared-decision records, reconciliation handoffs, and…

K-Dense-AI/scientific-agent-skills · 62 tokens

handbook-updates

Diff a proposed handbook change against the current version, flag ripple effects and state supplement impacts. Use when user says "update the handbook", "add this to the handbook", "handbook change", or has a policy ready for insertion.

anthropics/claude-for-legal · 52 tokens

software-copyright-materials

A workflow for creating Chinese application materials for software copyright registration from a real software project.

Fokkyp/SoftwareCopyright-Skill · 97 tokens

iflytek-contract-intelligence-review

A contract-review workflow for scanned or digital agreements. It can recognize document text, examine clauses, detect risks, check compliance, and create translation summaries; its output is for review and is not formal legal advice.

iflytek/iFly-Skills · 116 tokens

legal-writer

Legal document drafting -- contracts, memos, briefs, complaints, demand letters, opinions, discovery, settlements, ToS, privacy policies. Full pipeline: document structure, per-section writing, Bluebook citation, case law lookup (CourtListener API), regulation lookup (eCFR API), DOCX output, and TDD-style verification…

kortix-ai/suna · 161 tokens