Skip to content
Agentmart
Submit a tool

legal-text-format

法律文本清洗与格式化工具,自动识别条文/案例类型,去除推广冗余,输出规范排版。

Skill by laubeing-droid

IndexedMIT★ 16
Write a review

Chalk Labs

Need help deploying legal-text-format?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/laubeing-droid-legal-text-format

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

法律文本清洗与格式化工具,自动识别条文/案例类型,去除推广冗余,输出规范排版。

Use cases: legal

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/legal-text-format

What's inside

Skill name
legal-text-format
Description
法律文本清洗与格式化工具,自动识别条文/案例类型,去除推广冗余,输出规范排版。
License
MIT
Instructions
82 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (14)

  • CHANGELOG.md
  • SKILL.md
  • .gitkeep · archive/
  • examples.md · references/
  • final_fix.py · scripts/
  • fix_case_headers.py · scripts/
  • fix_case_headers2.py · scripts/
  • fix_nanjing_cases.py · scripts/
  • fix_remaining.py · scripts/
  • fix_targeted.py · scripts/
  • format_legal_cases.py · scripts/
  • format_step2.py · scripts/
  • format_step2_v2.py · scripts/
  • postprocess_step2.py · scripts/

SKILL.md (first lines)

# 法律文本格式化

将来源各异的法律文本转换为统一规范格式,保证原始信息完整的同时清除杂乱。

## 一、处理对象

### (一) 法律条文

包括法律法规原文、司法解释、部门规章等。格式化后按编章节条层级呈现。

### (二) 法律案例

包括裁判文书、典型案例、法院公告等。保留当事人信息脱敏后的案例事实与裁判要旨。

### (三) 混合文本

含法律与非法律内容的复合文本(如公众号文章、培训讲稿),提取法律核心部分并标注来源。

## 二、格式化规则

### (一) 公共规则

- 去除推广信息:广告、引流话术、二维码、外链
- 统一标点:中文上下文使用全角标点
- 统一缩进:段落首行缩进两字符(法律条文层级除外)
- 修正换行:合并不当断行,保留有意分段

### (二) 条文专用规则

- 层级标识:编→章→节→条→款→项
- 条号格式:"第一条""第二条"
- 保留原条号,不自行编序

### (三) 案例专用规则

- 当事人信息替换为通用指代
- 保留案件编号与审理法院
- 保留"经审理查明""本院认为"等裁判文书结构标记

## 三、处理流程

1. 自动识别文本类型(条文/案例/混合)
2. 按类型应用对应规则清洗
3. 内容完整性校验:对比格式化前后的关键信息量
4. 输出至归档目录

## 四、归档与溯源

输出按时间戳组织:
```
archive/{YYYYMMDD}_{主题}/
├── {日期}_{主题}_raw.md # 原始文本
└── {日期}_{主题}_formatted.md # 格式化文本
```

保留原始文件确保可溯源比对。

## 五、来源协作

支持接收来自抓取类技能(如 wechat-article-fetch)的文本作为输入,由本技能专注完成格式化清洗。

## 六、使用方式

```
/legal-text-format [粘贴法律文本]
```

或:
```
/legal-text-format @文章原文.md
```

## 七、参考文件

- `references/examples.md`:格式化前后对比示例
- `scripts/`:Python 辅助脚本

---

格式化结果为文本排版参考,不改变原文法律含义。

From laubeing-droid/unified-legal-ai-cn, MIT.

More from laubeing-droid/unified-legal-ai-cn

Signals

Stars
16
Forks
4
Open issues
1
Last commit (this folder)
Jun 5, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from laubeing-droid

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get legal-text-format running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying legal-text-format?

CallGet help
Cite this page

legal-text-format skill. Agent Mart. https://agentmart.dev/skills/laubeing-droid-legal-text-format (last updated 2026-10-24)