Agent skill

Legal Text Format

by cat-xierluo in cat-xierluo/legal-skills

将法律文本(法律条文或法律案例)转换为规范的 Markdown 格式,删除推广冗余信息。本技能应在用户需要处理法律条文(如民法典、刑法等)、整理法律案例(如最高法典型案例、裁判文书等)、或从粘贴文本中格式化法律文档时使用。注意:本技能只负责格式化和内容清理,不包含内容抓取能力。内容获取应由其他 skill(如 wechat-article-fetch)完成,AI 会自动判断技能协作顺序。内置…

CC-BY-NC-4.0Auto-check passedProductivity & Automation

Install Legal Text Format

skills CLI
$ npx skills add cat-xierluo/legal-skills --skill legal-text-format -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cat-xierluo/legal-skills legal-text-format --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cat-xierluo/legal-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/legal-text-format .claude/skills/legal-text-format && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
legal-text-format
GitHub stars
720
Token cost
~1.3k tokens
SKILL.md length
213 words
Files
10 (incl. scripts, references)
Skills in repo
62
Repo updated
First seen
Licence
CC-BY-NC-4.0

At a glance

将法律文本(法律条文或法律案例)转换为规范的 Markdown 格式,删除推广冗余信息。本技能应在用户需要处理法律条文(如民法典、刑法等)、整理法律案例(如最高法典型案例、裁判文书等)、或从粘贴文本中格式化法律文档时使用。注意:本技能只负责格式化和内容清理,不包含内容抓取能力。内容获取应由其他 skill(如 wechat-article-fetch)完成,AI 会自动判断技能协作顺序。内置…

  • Works in 3 steps: 用户提供微信公众号链接 → AI 使用 wechat-article-fetch… → 用户提供普通网页链接 → AI 使用其他工具抓取 → AI 调用… → 用户直接粘贴文本 → AI 直接调用 legal-text-format 格式化
  • Tasks that involve Messaging and chat bots
  • SKILL.md covers 概述, 与其他技能的协作, 核心原则 and 工作流程, plus 6 more sections
  • Runs Python scripts from its folder; calls python3; reaches mp.weixin.qq.com

What it does

Legal Text Format is an agent skill from cat-xierluo/legal-skills. 将法律文本(法律条文或法律案例)转换为规范的 Markdown 格式,删除推广冗余信息。本技能应在用户需要处理法律条文(如民法典、刑法等)、整理法律案例(如最高法典型案例、裁判文书等)、或从粘贴文本中格式化法律文档时使用。注意:本技能只负责格式化和内容清理,不包含内容抓取能力。内容获取应由其他 skill(如 wechat-article-fetch)完成,AI 会自动判断技能协作顺序。内置 archive 机制,所有结果自包含存储在 skill 目录内。

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including scripts and reference files (for example `CHANGELOG.md`, `DECISIONS.md` and `TASKS.md`).

It sits in Productivity & Automation, covering Messaging and chat bots. It works with WeChat and Python.

When your agent uses it

  • Tasks that involve Messaging and chat bots

Example prompts

  • “/legal-text-format”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. 用户提供微信公众号链接 → AI 使用 wechat-article-fetch 抓取 → AI 调用 legal-text-format 格式化
  2. 用户提供普通网页链接 → AI 使用其他工具抓取 → AI 调用 legal-text-format 格式化
  3. 用户直接粘贴文本 → AI 直接调用 legal-text-format 格式化

What it can do on your machine

Read from SKILL.md and the folder at commit db2c58c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • mp.weixin.qq.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Legal Text Format loads about 1.3k tokens when it runs, and up to ~3.4k if it reads all its reference files. Until then it costs about 62 tokens; SKILL.md has 213 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

Its licence (CC-BY-NC-4.0) doesn't allow us to republish the file, so here is its outline and opening line. It has 213 words (~1,314 tokens).

name
legal-text-format
homepage
https://github.com/cat-xierluo/legal-skills
author
杨卫薪律师(微信ywxlaw)
version
1.2.3
license
CC-BY-NC

Read the full SKILL.md on GitHub

Files

SKILL.md and 9 other files (scripts, references) in skills/legal-text-format of cat-xierluo/legal-skills.

  • SKILL.md
  • CHANGELOG.md
  • DECISIONS.md
  • LICENSE.txt
  • TASKS.md
  • archive/.gitkeep
  • references/examples.md
  • scripts/format_legal_cases.py
  • scripts/tests/test_content_preservation.py
  • scripts/tests/test_format_legal_cases.py

Open the folder on GitHubat commit db2c58c

Compare with similar skills

Legal Text Format next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Legal Text Format compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Legal Text Format this skillcat-xierluo/legal-skills720—~1.3kAutomated safety check: PassCC-BY-NC-4.0
Create Experkfly/ex-skill2.5k—~3.7kAutomated safety check: NotesMIT
Wechat AutomationLAVARONG/wechat-automation-api181—~1.2kAutomated safety check: PassNone
Wechat Article Searchnexus-research-lab/nexus151—~858Automated safety check: NotesApache-2.0
Wechat Account Analyzerredfox-data/redfox-community427—~1.4kAutomated safety check: PassNone
Wechat Prohibited Wordredfox-data/redfox-community427—~1.3kAutomated safety check: PassNone

Similar skills

  • Create Ex

    perkfly/ex-skill

    Distill an ex-girlfriend into an AI Skill. An agent skill from perkfly/ex-skill.

    2.5k GitHub stars~3.7k tokensUpdated 6 mo ago
    Productivity & AutomationAuto-check: notes
  • Wechat Automation

    LAVARONG/wechat-automation-api

    微信发信能力:通过 Windows 桌面微信发送文本、图片URL或本地文件。适合各类 Agent 在本机直接发送一次性消息。触发词:给[某人]发微信、通知[某人]、把这个用微信发给[某人]、用微信发个图片、把本地文件发给[某人]

    181 GitHub stars~1.2k tokensUpdated 23 days ago
    Productivity & AutomationAuto-check passed
  • Wechat Article Search

    nexus-research-lab/nexus

    搜索微信公众号文章,并整理标题、摘要、发布时间、来源公众号和链接。用户提到微信公众号、 公众号文章、微信文章、搜一批公众号资料、按关键词找公众号内容、查某公众号相关报道, 或需要为中文研究收集微信公众平台文章时使用;即使用户只说“搜微信里的文章”也应触发。

    151 GitHub stars~858 tokensUpdated yesterday
    Productivity & AutomationAuto-check: notes
  • Wechat Account Analyzer

    redfox-data/redfox-community

    公众号账号诊断工具是对任意公众号账号进行四维度量化评分(内容健康度、用户活跃度、内容核心数据、运营规范性),对标行业平均水平,输出可落地的运营优化建议。

    427 GitHub stars~1.4k tokensUpdated yesterday
    Productivity & AutomationAuto-check passed
  • Wechat Prohibited Word

    redfox-data/redfox-community

    扫描公众号文案、文件或网页中的违禁词与敏感表述,标注风险并提供合规替换建议,帮你安全过审、避免删文限流. An agent skill from redfox-data/redfox-community.

    427 GitHub stars~1.3k tokensUpdated yesterday
    Productivity & AutomationAuto-check passed
  • Wechat Search

    redfox-data/redfox-community

    公众号搜索工具,支持按关键词搜索爆款文章,展示推荐热门文章,助力内容创作者把握趋势与获取灵感;当用户需要搜索公众号文章、查找爆款内容、获取创作灵感时使用

    427 GitHub stars~2.7k tokensUpdated yesterday
    Productivity & AutomationAuto-check passed

More from cat-xierluo/legal-skills

All 62 skills in this repo
  • Elements-Style Complaint Generator

    cat-xierluo/legal-skills

    Converts a lawyer's ordinary complaint or a described case into the Supreme People's Court's elements-style Word template, with layout checks on the result.

    721 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check: notes
  • Lecture Performance Review

    cat-xierluo/legal-skills

    Analyzes raw lecture transcripts for verbal tics, pacing, time use and promise follow-through, with optional slide-by-slide comparison and cross-session tracking.

    721 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • De-AI Polish for Chinese Articles

    cat-xierluo/legal-skills

    Detects and rewrites machine-sounding patterns in the body text of Chinese articles while keeping the author's facts, headings and legal terms intact.

    721 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • GitHub Star Manager

    cat-xierluo/legal-skills

    Finds GitHub projects mentioned in articles or screenshots and stars them, tracks updates to your starred repos, and builds an HTML dashboard to browse them.

    721 GitHub stars~2k tokensUpdated yesterday
    Auto-check: notes
  • Legal Harness Initializer

    cat-xierluo/legal-skills

    Sets up or incrementally updates AGENTS.md and CLAUDE.md for legal professionals, with a minimal safety baseline and a check that a new session loads and follows the rules.

    721 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Moot Court Simulation Builder

    cat-xierluo/legal-skills

    Chinese-language skill that organizes a case file into a multi-role mock trial with judge, parties and clerk, producing a transcript, issue review and a to-strengthen list.

    721 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Legal Text Format

What does Legal Text Format do?

将法律文本(法律条文或法律案例)转换为规范的 Markdown 格式,删除推广冗余信息。本技能应在用户需要处理法律条文(如民法典、刑法等)、整理法律案例(如最高法典型案例、裁判文书等)、或从粘贴文本中格式化法律文档时使用。注意:本技能只负责格式化和内容清理,不包含内容抓取能力。内容获取应由其他 skill(如 wechat-article-fetch)完成,AI 会自动判断技能协作顺序。内置…. Legal Text Format is an agent skill from cat-xierluo/legal-skills.

When should I use Legal Text Format?

Legal Text Format fits situations like: tasks that involve Messaging and chat bots.

How do I install Legal Text Format in Claude Code?

Run `npx skills add cat-xierluo/legal-skills --skill legal-text-format -a claude-code`. Or copy the skill folder (skills/legal-text-format in cat-xierluo/legal-skills) into .claude/skills/legal-text-format in your project. Claude Code loads it when a task matches its description.

How do I install Legal Text Format in Codex?

Run `npx skills add cat-xierluo/legal-skills --skill legal-text-format -a codex`. Or copy the skill folder (skills/legal-text-format in cat-xierluo/legal-skills) into .agents/skills/legal-text-format in your project. Codex loads it when a task matches its description.

Can I use Legal Text Format in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cat-xierluo/legal-skills --skill legal-text-format -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/legal-text-format, .gemini/skills/legal-text-format, .github/skills/legal-text-format and .opencode/skills/legal-text-format in your project.

What does Legal Text Format need to run?

Going by SKILL.md and its folder, Legal Text Format needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Legal Text Format access the network?

SKILL.md names 1 domain. In commands or code: mp.weixin.qq.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Legal Text Format safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Legal Text Format use?

Legal Text Format is published under the CC-BY-NC-4.0 licence (declared in SKILL.md).

How many tokens does Legal Text Format use?

About 1.3k tokens (SKILL.md is roughly 5.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.1k tokens, read only when the agent opens those files.

What are the alternatives to Legal Text Format?

Skills that share tags, products or a category with Legal Text Format: Create Ex (perkfly/ex-skill, 2.5k stars), Wechat Automation (LAVARONG/wechat-automation-api, 181 stars), Wechat Article Search (nexus-research-lab/nexus, 151 stars) and Wechat Account Analyzer (redfox-data/redfox-community, 427 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Legal Text Format?

cat-xierluo (a GitHub user) maintains it in cat-xierluo/legal-skills, which has 720 GitHub stars. The repository holds 62 skills in this directory. The repository was last updated on October 10, 2026.

Source: cat-xierluo/legal-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.