Agent skill

Invoice Organizer

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

整理一批发票/票据 PDF(增值税普通发票、铁路电子客票、住宿交通餐饮等),按购买方抬头归档到对应项目并出具报销清单。本技能应在用户需要整理发票报销、把发票归档到项目、或出具报销/消费清单时使用。不要用于:合同/法律文书合规审查、证据实体分析、PDF 合并压缩加页码(用 pdf-processor)、扫描件 OCR 转写(用 legal-ocr)。

MITAuto-check: notesDocuments & Office

Install Invoice Organizer

skills CLI
$ npx skills add cat-xierluo/legal-skills --skill invoice-organizer -a claude-code

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

GitHub CLI
$ gh skill install cat-xierluo/legal-skills invoice-organizer --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/invoice-organizer .claude/skills/invoice-organizer && 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
invoice-organizer
GitHub stars
720
Token cost
~940 tokens
SKILL.md length
224 words
Files
8 (incl. scripts, references)
Skills in repo
62
Repo updated
First seen
Licence
MIT

At a glance

整理一批发票/票据 PDF(增值税普通发票、铁路电子客票、住宿交通餐饮等),按购买方抬头归档到对应项目并出具报销清单。本技能应在用户需要整理发票报销、把发票归档到项目、或出具报销/消费清单时使用。不要用于:合同/法律文书合规审查、证据实体分析、PDF 合并压缩加页码(用 pdf-processor)、扫描件 OCR 转写(用 legal-ocr)。

  • Works in 6 steps: 提取发票文本 → 识别关键字段 → 匹配所属项目 → …
  • Tasks that involve Forms and invoices
  • SKILL.md covers 何时使用, 工作流程, 验收标准 and 依赖, plus 1 more section
  • Runs Python scripts from its folder; calls python3, pdftotext and brew

What it does

Invoice Organizer is an agent skill from cat-xierluo/legal-skills. 整理一批发票/票据 PDF(增值税普通发票、铁路电子客票、住宿交通餐饮等),按购买方抬头归档到对应项目并出具报销清单。本技能应在用户需要整理发票报销、把发票归档到项目、或出具报销/消费清单时使用。不要用于:合同/法律文书合规审查、证据实体分析、PDF 合并压缩加页码(用 pdf-processor)、扫描件 OCR 转写(用 legal-ocr)。

Its SKILL.md is about 940 tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including scripts and reference files (for example `CHANGELOG.md`, `references/invoice-field-guide.md` and `references/output-template.md`).

It sits in Documents & Office, covering Forms and invoices and PDF. The licence is MIT.

When your agent uses it

  • Tasks that involve Forms and invoices
  • Tasks that involve PDF

Example prompts

  • “/invoice-organizer”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. 提取发票文本
  2. 识别关键字段
  3. 匹配所属项目
  4. 读取项目上下文(向上回溯事由)
  5. 归档到项目报销目录
  6. 出具清单

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 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • pdftotext
    • brew
    • apt-get

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

  • Network

    No URLs in SKILL.md.

    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

Invoice Organizer loads about 940 tokens when it runs, and up to ~2.8k if it reads all its reference files. Until then it costs about 48 tokens; SKILL.md has 224 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:141
    macOS: `brew install poppler`<br>Linux: `sudo apt-get install poppler-utils` |

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

The full file from cat-xierluo/legal-skills at commit db2c58c, republished under its MIT licence (© cat-xierluo). 224 words, ~940 tokens.

Download SKILL.mdSave it as .claude/skills/invoice-organizer/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
invoice-organizer
description
整理一批发票/票据 PDF(增值税普通发票、铁路电子客票、住宿交通餐饮等),按购买方抬头归档到对应项目并出具报销清单。本技能应在用户需要整理发票报销、把发票归档到项目、或出具报销/消费清单时使用。不要用于:合同/法律文书合规审查、证据实体分析、PDF 合并压缩加页码(用 pdf-processor)、扫描件 OCR 转写(用 legal-ocr)。
license
MIT
version
0.1.1

发票信息整理与清单出具

读取一批发票 PDF 的结构化信息,向上回溯项目上下文填补事由,归档到对应项目,并出具清单(默认报销清单,可切换为消费清单、对账流水等其他形态)。

何时使用

  • 用户给出一个或多个发票/票据 PDF(交通、住宿、餐饮、办公采购等),需要整理报销
  • 用户要把发票归档到某个案件/项目目录,并生成清单
  • 触发词:"这几张发票报销""整理一下这批发票""做个报销清单""这些票归到 XX 项目""出个消费清单""按项目整理发票"

不适用:发票的法律/税务合规审查、作为诉讼证据的实体分析、PDF 物理处理(合并/压缩/页码)。

工作流程

1. 提取发票文本

优先用 pdftotext(poppler)提取文本层,电子发票大多自带文本层,开箱即用:

bash
pdftotext -layout "发票.pdf" -

批量提取多个 PDF 用本 skill 脚本(自动分隔、缺失依赖给提示):

bash
python3 scripts/extract_invoice.py 发票1.pdf 发票2.pdf 发票3.pdf
# 或传一个目录
python3 scripts/extract_invoice.py ~/Downloads/

若 pdftotext 无文本输出(扫描件/图片型发票),降级到 OCR:调用 legal-ocr 或 pdf skill。

2. 识别关键字段

从文本中解析每张发票的核心字段,识别要点见 references/invoice-field-guide.md。常用类型速查:

发票类型必抓字段
铁路电子客票发到站、车次、日期、票价、乘车人、购买方、发票号
增值税普通发票(住宿/餐饮/服务)购买方、销售方、项目、金额、税额、价税合计、发票号、开票日期

无法确认的字段标注"待人工确认",不臆测。

3. 匹配所属项目

按**购买方名称(发票抬头)**判断这批发票归属哪个项目:取购买方全称在工作文档库中检索匹配的委托人/客户;同抬头的发票归同一项目;无法匹配时向用户确认,不擅自归档。

4. 读取项目上下文(向上回溯事由)

从发票所在位置(或拟归档位置)向上回溯,读取所属项目的信息文件,用于填补清单"报销信息"表的事由/案号/日期/路线/报销单位:

bash
python3 scripts/find_project_context.py "发票所在目录或文件路径"

识别与提取要点见 references/project-context-guide.md。核心映射:

清单字段项目上下文来源
事由项目/案件名称 + 触发出行的事件
案号项目信息.md 的"法院案号"
日期与发票业务日期匹配的项目时间线事件
路线事件地点(如法院所在地)↔ 常驻地
报销单位委托人/客户(与发票购买方交叉验证)
出差人承办律师/项目出差人员

把发票业务日期与项目时间线对照,推断本次出行事由(如发票 06-15~17 + 项目"06-16 石家庄开庭" → 事由"赴石家庄参加第一次开庭")。无法从上下文确认的,向用户核实,不臆造。

5. 归档到项目报销目录

确定归属项目后,把发票复制(不移动,保留原件)到该项目的报销子目录:

  • 目标目录由 AI 依据该项目实际目录结构判断,不强绑固定路径
    • 诉讼案件(12 目录体系):常见于"其他材料/杂项"类目录下,不进证据/文书等案件实体目录
    • 无明显目录时,新建一个 报销/(默认;差旅等可进一步子分类,如 报销/差旅/)
  • 发票文件规范命名:YYMMDD 类型 摘要 [人名].pdf
    • 业务日期(非开票日期)+ 类型 + 关键摘要 + 可选相关人员
    • 示例:260615 高铁票 苏州北-石家庄 G1220 张某.pdf
    • 示例:260615-0617 住宿费 石家庄XX酒店.pdf
    • 示例:260620 餐饮费 XX餐厅 部门聚餐.pdf
6. 出具清单

读取的发票信息可生成多种清单——报销清单(默认),也可按需输出消费清单、对账流水、按月汇总等。用户未指定时默认出具报销清单。模板与命名规范见 references/output-template.md。

默认输出风格(除非用户另行要求):

  • 清单含两部分:报销信息表 + 凭证明细表
  • 报销信息表的事由/案号/日期/路线等优先取自第 4 步项目上下文,并与发票抬头交叉验证
  • 凭证明细列:序号 | 日期 | 类型 | 摘要 | 金额(元) | 发票号,末行合计
  • 不加 emoji、不加备注或说明性文字段落
  • 涉及人员只写姓名,不写身份证号等证件信息
  • 清单文件名:YYMMDD 报销清单.md(YYMMDD 为预计发送日期,询问用户,无则取当天)
  • 类型枚举涵盖 交通/住宿/餐饮/办公采购 等,不限于差旅

验收标准

完成一次发票整理后,按下述门控自检。任一 Hard Fail 命中即判定本次输出不合格,不可交付。

Hard Fail(一票否决)
  1. 不得编造:发票字段、金额、事由必须取自发票原文或项目上下文;取不到一律标"待确认",不臆测、不补全
  2. 归档不错配:发票购买方抬头与目标项目委托人不匹配时,必须向用户确认,不擅自归档
  3. 原件不动:归档一律 cp 复制,禁止 mv 移动或删除原件
  4. 脱敏:清单与归档文件名只写姓名,不得出现身份证号、电话等证件信息
  5. 事由不杜撰:发票业务日期与项目时间线无对应事件时,事由标"待确认",不凭地名或日期编造出行目的
完成条件(可机判)
  • 凭证明细表末行有合计,且合计金额 = 各明细金额之和
  • 每张发票已匹配到唯一项目,或标注"待确认"(无孤儿发票)
  • 所有日期统一 YYYY-MM-DD;归档文件名与清单"日期"列用业务日期(非开票日期)
  • 清单文件名 YYMMDD 报销清单.md(YYMMDD 为预计发送日,已询问用户)
  • 无 emoji、无说明性备注段落、人员无证件号
典型场景自检

输入:2 张发票(1 张高铁票 + 1 张住宿费),购买方为同一公司,业务日期落在某案件"XX 开庭"时间线前后。

应产出:

  • 两张发票归同一项目,归档目录为该项目的 报销/ 子目录
  • 事由从开庭事件推断(如"赴 XX 参加开庭"),非编造
  • 凭证明细 2 行 + 合计行,金额取价税合计(含税)
  • 清单"报销单位"= 购买方名称,与项目委托人交叉验证一致

不在本 skill 验收范围:OCR 识别精度本身(扫描件降级到 legal-ocr)、发票真伪、税务合规判断。

依赖

系统依赖
依赖安装方式
poppler(提供 pdftotext)macOS: brew install poppler<br>Linux: sudo apt-get install poppler-utils

仅"文本提取"需要 poppler;文本层缺失时改用 OCR skill,不强制安装。scripts/find_project_context.py 仅用 Python 标准库,无需安装。

与其他技能配合

  • legal-ocr / pdf:pdftotext 无文本层时,用其 OCR 能力识别扫描件/图片型发票
  • new-case:归档目标若为诉讼案件,目录体系与项目信息文件由 new-case 定义,本 skill 依据其结构判断报销子目录与回溯上下文
  • xlsx:如需把清单导出为 Excel 表格,交由 xlsx skill 处理

© cat-xierluo, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (scripts, references) in skills/invoice-organizer of cat-xierluo/legal-skills.

  • SKILL.md
  • CHANGELOG.md
  • LICENSE.txt
  • references/invoice-field-guide.md
  • references/output-template.md
  • references/project-context-guide.md
  • scripts/extract_invoice.py
  • scripts/find_project_context.py

Open the folder on GitHubat commit db2c58c

Compare with similar skills

Invoice Organizer 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.

Invoice Organizer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Invoice Organizer this skillcat-xierluo/legal-skills720—~940Automated safety check: NotesMIT
PDFzai-org/ZCode7.7k—~18kAutomated safety check: NotesProprietary
Code2mediatsingliuwin/autoclaw283—~985Automated safety check: PassMIT
Reportlabjimmc414/Kosmos5951 repos~4.2kAutomated safety check: PassNone
PDF ReadingWide-Moat/open-computer-use1261 repos~2.7kAutomated safety check: PassProprietary
PDF Processing Toolkittelagod/code-abyss244—~532Automated safety check: NotesMIT

Similar skills

  • PDF

    zai-org/ZCode

    Professional PDF toolkit covering four production workflows: reports, creative visuals, academic LaTeX, and existing PDF processing.

    7.7k GitHub stars~18k tokensUpdated yesterday
    Documents & OfficeAuto-check: notes
  • Code2media

    tsingliuwin/autoclaw

    Universal media renderer with no fixed template — any custom layout, size or style becomes pixel-perfect images (PNG/JPEG/WebP), vector SVG, paged PDFs or animations (WebP/GIF).

    283 GitHub stars~985 tokensUpdated yesterday
    Documents & OfficeAuto-check passed
  • Reportlab

    jimmc414/Kosmos

    PDF generation toolkit. An agent skill from jimmc414/Kosmos.

    595 GitHub starsUsed in 1 repo~4.2k tokens
    Documents & OfficeAuto-check passed
  • PDF Reading

    Wide-Moat/open-computer-use

    A skill your agent uses when you need to read, inspect, or extract content from PDF files — especially when file content is NOT in your context and you need to read it from disk.

    126 GitHub starsUsed in 1 repo~2.7k tokens
    Documents & OfficeAuto-check passed
  • PDF Processing Toolkit

    telagod/code-abyss

    Picks the right Python library or CLI tool for a PDF task, text and table extraction, merging, splitting, OCR, watermarking or form filling, and points to a matching recipe.

    244 GitHub stars~532 tokensUpdated 2 mo ago
    Documents & OfficeAuto-check: notes
  • Document Converter Suite

    dkyazzentwatwa/chatgpt-skills

    Convert PDFs, Office docs, markdown, HTML, and tables between editable formats.

    116 GitHub stars~386 tokensUpdated 6 mo ago
    Documents & OfficeAuto-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

Questions about Invoice Organizer

What does Invoice Organizer do?

整理一批发票/票据 PDF(增值税普通发票、铁路电子客票、住宿交通餐饮等),按购买方抬头归档到对应项目并出具报销清单。本技能应在用户需要整理发票报销、把发票归档到项目、或出具报销/消费清单时使用。不要用于:合同/法律文书合规审查、证据实体分析、PDF 合并压缩加页码(用 pdf-processor)、扫描件 OCR 转写(用 legal-ocr)。. Invoice Organizer is an agent skill from cat-xierluo/legal-skills.

When should I use Invoice Organizer?

Invoice Organizer fits situations like: tasks that involve Forms and invoices; tasks that involve PDF.

How do I install Invoice Organizer in Claude Code?

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

How do I install Invoice Organizer in Codex?

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

Can I use Invoice Organizer 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 invoice-organizer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/invoice-organizer, .gemini/skills/invoice-organizer, .github/skills/invoice-organizer and .opencode/skills/invoice-organizer in your project.

What does Invoice Organizer need to run?

Going by SKILL.md and its folder, Invoice Organizer needs Python for the scripts in its folder and the command-line tools its instructions call (python3, pdftotext, brew and apt-get). Our summary lists: Python 3.

Does Invoice Organizer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Invoice Organizer safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. 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 Invoice Organizer use?

Invoice Organizer is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Invoice Organizer use?

About 940 tokens (SKILL.md is roughly 3.8k 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 1.8k tokens, read only when the agent opens those files.

What are the alternatives to Invoice Organizer?

Skills that share tags, products or a category with Invoice Organizer: PDF (zai-org/ZCode, 7.7k stars), Code2media (tsingliuwin/autoclaw, 283 stars), Reportlab (jimmc414/Kosmos, 595 stars) and PDF Reading (Wide-Moat/open-computer-use, 126 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Invoice Organizer?

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.