← Back to Skills Marketplace
wwbwin

Chexian Baodan Tong

by wwbwin · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
74
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install chexian-baodan-tong
Description
车险保单通 — 一站搞定重命名和归档。消除低效环节,让代理人和保险公司工作人员一站搞定识别、整理、重命名、归档保险保单,让保险保单归档更直接、更便捷。支持识别多家保险公司保单 PDF,自动提取车牌号、投保人、保单号,追加车牌号重命名文件,本地模式(pdfminer)与 API 模式(AI 解析)双轨并行,整理完毕...
README (SKILL.md)

车险保单通

一站搞定重命名和归档 · V1.0.1 作者:WuWenBin-BeiJing-ST

车险保单通消除低效环节,让代理人和保险公司工作人员一站搞定识别、整理、重命名、归档保险保单,让保险保单归档更直接、更便捷。

核心脚本

scripts/extract_and_rename.py — 唯一入口脚本,包含全部逻辑。

功能特性

功能 说明
📄 PDF 识别 自动扫描指定文件夹下所有 PDF 保单文件
🔍 信息提取 提取车牌号投保人保单号
✏️ 自动重命名 {原名}_{车牌号}.pdf,如 Policy_xxx_晋MX0923.pdf
🤖 双模式 本地模式(pdfminer,正则匹配,无需联网)\x3Cbr>API 模式(AI 解析,更精准,需配置 API Key)
📦 ZIP 打包 自动打包为 保险单整理_YYYYMMDD.zip

工作流程

用户指定文件夹
    │
    ▼
┌──────────────────────┐
│   选择解析模式        │
├──────────────────────┤
│ 本地模式(默认)       │  ← 使用 pdfminer.six + 正则匹配
│ API 模式(--api)      │  ← 调用外部 AI API 解析
└──────────────────────┘
    │
    ▼
提取:车牌号 / 投保人 / 保单号
    │
    ▼
重命名文件:{原名}_{车牌号}.pdf
    │
    ▼
打包 ZIP:保险单整理_YYYYMMDD.zip

使用方式

命令行参数

参数 说明
folder PDF 文件所在文件夹(默认当前目录)
--no-rename 跳过文件重命名(预览模式)
--no-pack 跳过 ZIP 打包
--api 使用 API 模式(需设置环境变量)
--zip-name 自定义 ZIP 文件名

典型用法

# 本地模式(默认,无需联网)
python3 ~/.qclaw/skills/chexian-baodan-tong/scripts/extract_and_rename.py ~/Downloads

# API 模式(需设置 INSURANCE_API_KEY)
python3 ~/.qclaw/skills/chexian-baodan-tong/scripts/extract_and_rename.py ~/Downloads --api

# 预览模式(不重命名、不打包)
python3 ~/.qclaw/skills/chexian-baodan-tong/scripts/extract_and_rename.py ~/Downloads --no-rename --no-pack

环境变量(API 模式)

变量 说明 默认值
INSURANCE_API_KEY API 密钥(必需) -
INSURANCE_API_ENDPOINT API 端点 OpenAI 兼容接口
INSURANCE_API_MODEL 模型名称 gpt-4o

解析模式选择建议

本地模式:速度快、无需联网,对标准格式保险单识别率高。首选方案。

API 模式:识别率更高,能处理复杂/非标准格式或扫描图片类 PDF(无文字层)。需要配置 INSURANCE_API_KEY

推荐工作流:

  1. 先用本地模式尝试
  2. 如返回"未识别",切换到 API 模式重试

提取字段说明

字段 提取逻辑 备注
车牌号 在"车牌号"标签后跨行匹配省级简称+字母+数字 支持晋/京/沪等全部省份格式
投保人 在"投保人"/"被保险人"标签后查找公司名或姓名 优先返回公司名称
保单号 在"保单号码"标签后查找大写字母数字组合 通常 15-22 位

重命名规则

  • 有车牌号{原文件名}_{车牌号}.pdf
    • 例如:Policy_abc.pdfPolicy_abc_晋MX0923.pdf
  • 无车牌号但有保单号{原文件名}_{保单号}.pdf
  • 都未识别:跳过重命名,标记"未识别"

ZIP 打包规则

  • 文件名格式:保险单整理_YYYYMMDD.zip
  • 打包范围:目标文件夹下所有文件
  • 同一日期多次运行会覆盖前一次 ZIP

依赖安装

本地模式依赖 pdfminer.six

pip install pdfminer.six

注意事项

  • 脚本直接修改原文件,完成后 PDF 已被重命名,建议先做备份或使用 --no-rename 预览
  • 本地模式对纯扫描图片类 PDF(无文字层)识别率极低,建议切换到 API 模式
Usage Guidance
Before installing or running this skill: - Inspect the full Python file: the packaged script appears truncated at the end (the final main guard is incomplete). Do not run until you confirm the file ends correctly (should include if __name__ == '__main__': main()). - Backup your PDFs and run with --no-rename first to preview behavior (script renames files in-place). The author explicitly warns of in-place renames. - Use local mode (pdfminer.six) whenever possible. Only enable API mode if you trust the target endpoint and accept sending full PDF contents (including PII) to that external service. - When using API mode, set INSURANCE_API_ENDPOINT only to a trusted service; the default points to an OpenAI-compatible endpoint and the script will POST base64 PDF data. Check request size limits and privacy policy of the endpoint. - Run the script in a dedicated folder to avoid including unrelated files in the ZIP archive; the script packs all files under the folder. - If you are not comfortable reviewing the code yourself, ask the publisher for an intact, complete script and for clarification about how file data is sent to the API (format and security guarantees).
Capability Analysis
Type: OpenClaw Skill Name: chexian-baodan-tong Version: 1.0.2 The skill is a legitimate utility designed to help insurance agents organize PDF policies by extracting metadata (license plates, policy numbers) and automating renaming and archiving. The script `scripts/extract_and_rename.py` implements a local parsing mode using `pdfminer.six` and an optional API mode that sends PDF data to a user-specified AI endpoint (e.g., OpenAI). The code is well-structured, lacks obfuscation, and contains no evidence of malicious intent, unauthorized data exfiltration, or persistence mechanisms.
Capability Tags
requires-sensitive-credentials
Capability Assessment
Purpose & Capability
Name/description match the delivered script: it scans a folder for PDFs, extracts plate/holder/policy, renames files, and creates a ZIP. Declared API-related env vars correspond to the API parsing mode. No unrelated credentials or binaries are requested.
Instruction Scope
Runtime instructions and script operate on all files in the target folder (renaming PDFs in-place and packing the folder into a ZIP). API mode base64-encodes and sends the entire PDF contents to the configured endpoint — this will transmit potentially sensitive PII to an external service. The pack step includes all files in the folder (not limited to PDFs), which may inadvertently archive other data.
Install Mechanism
No installer is provided; this is an instruction-only skill with a single Python script. The only declared dependency is pdfminer.six for local mode, which is reasonable and minimal for the stated functionality.
Credentials
Environment variables (INSURANCE_API_KEY, INSURANCE_API_ENDPOINT, INSURANCE_API_MODEL) are appropriate for the API parsing mode. However, supplying INSURANCE_API_KEY grants any configured endpoint the full PDF contents (PII). The skill does not request unrelated secrets.
Persistence & Privilege
The skill does not request persistent/always-on privileges and does not modify other skills or system-wide settings. It runs only when invoked.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install chexian-baodan-tong
  3. After installation, invoke the skill by name or use /chexian-baodan-tong
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
No user-facing changes detected in this version. - Version bump to 1.0.2, but no changes in code or documentation content.
v1.0.1
- 支持 PDF 车险保单的自动识别、提取(车牌号/投保人/保单号)、重命名和 ZIP 打包归档。 - 本地模式(使用 pdfminer.six + 正则)与 API 模式(需 API Key,AI 解析)双轨并行,增强识别率。 - 多种命令行参数支持定制流程:可选重命名、打包、解析模式和 ZIP 文件名。 - 详细字段提取规则与重命名规范,异常情况自动跳过并标记。 - zip 打包自动完成归档,命名规范,支持多次运行覆盖。 - 支持复杂或扫描型 PDF,推荐工作流明确,文档完整易用。
Metadata
Slug chexian-baodan-tong
Version 1.0.2
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is Chexian Baodan Tong?

车险保单通 — 一站搞定重命名和归档。消除低效环节,让代理人和保险公司工作人员一站搞定识别、整理、重命名、归档保险保单,让保险保单归档更直接、更便捷。支持识别多家保险公司保单 PDF,自动提取车牌号、投保人、保单号,追加车牌号重命名文件,本地模式(pdfminer)与 API 模式(AI 解析)双轨并行,整理完毕... It is an AI Agent Skill for Claude Code / OpenClaw, with 74 downloads so far.

How do I install Chexian Baodan Tong?

Run "/install chexian-baodan-tong" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Chexian Baodan Tong free?

Yes, Chexian Baodan Tong is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Chexian Baodan Tong support?

Chexian Baodan Tong is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Chexian Baodan Tong?

It is built and maintained by wwbwin (@wwbwin); the current version is v1.0.2.

💬 Comments