cross-border-trade-supervisor

End-to-end cross-border trade supervision tool. Automatically collects materials and classifies them into five stages—order/price communication, ordering, shipping, payment, and collection—extracts key fields to produce a structured Excel (6+ sheets), and archives packages by stage; includes amount reconciliation, tracking-number linking, timeline consistency checks, and flags anomalies or risks.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "cross-border-trade-supervisor" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-bf1f57f9baa179b07d1174d2d25097b47f37882f2fe2f69a33086feb70c48680. Verify the upstream source and version against https://skillhub.cn/skills/user_7df67fc2/cross-border-trade-supervisor before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

End-to-end cross-border trade supervision tool. Automatically collects materials and classifies them into five stages—order/price communication, ordering, shipping, payment, and collection—extracts key fields to produce a structured Excel (6+ sheets), and archives packages by stage; includes amount reconciliation, tracking-number linking, timeline consistency checks, and flags anomalies or risks.

0 Downloads

Introduction source: third_party · user_7df67fc2 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Translation pending; see source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: cross-border-trade-supervisor
description: 跨境交易全流程监管 — 自动采集并分类订单/价格沟通、下单、发货、付款、催款五阶段材料,抽取关键字段生成结构化 Excel(6+ Sheet)并按阶段归档打包;含金额勾稽、单号关联、时间线一致性校验与异常/风险标记。
emoji: 🛃
version: 2.2.0

跨境交易全流程监管 Skill

适用场景

当你需要把一堆零散的跨境交易材料(邮件、报价单、合同、PO、报关单、运单、发票、水单、催款函……PDF/Word/Excel/图片/邮件)整理成一份可追溯、可审计、带风险预警的监管台账时使用。

五大处理阶段(对应 5 个独立 Sheet)

  1. 订单/价格沟通 — 邮件、函件、聊天记录、报价单、议价记录
  2. 下单 — 框架协议、采购订单(PO)、合同文本、配套沟通
  3. 发货 — 出库单、报关单、随附单证、运输合同、物流运单、收货/验收/入库单
  4. 付款 — 付款沟通、商业/税务发票、银行付款凭证、水单
  5. 催款(如有) — 催款函、催收沟通、交涉函

输出:0-汇总概览 + 上述 5 个阶段 Sheet,共 6 个 Sheet;并按阶段把原始材料复制归档 + 生成 归档清单.csv + archive.zip。

核心能力

  • 批量上传与智能解析:--input 接受「目录 / 单个文件 / 直接传 .zip 包」三种形式。目录递归遍历;zip 自动解压展开一层(嵌套 zip 不再递归,防 zip-bomb);按扩展名分发到 txt/csv/eml、docx、pdf、图片(OCR) 解析器。不支持或解析失败的文件(如 .exe、缺 OCR 的图片)会被明确跳过并在报告中列出,不会误分类。
  • 五阶段自动分类:基于文件名 + 正文关键词权重(规则见 config/classify_rules.json)。
  • 关键字段 OCR/抽取:正则 + 关键词启发式抽取日期/金额/单号/主体等(见 config/field_schemas.json)。
  • 数据校验:金额勾稽、单号关联、时间线一致性、缺失材料提示、超期/未付风险预警。
  • 异常/风险标记:风险列条件格式红色高亮;汇总页标注异常数与风险等级。

依赖

openpyxl        # Excel 生成
python-docx     # .docx 解析
pdfplumber      # .pdf 文本抽取
Pillow + pytesseract + 系统 tesseract  # 图片 OCR(可选;缺失时图片回退为"待人工录入")

用法

# 一次性批处理(生成台账 + 归档)
python scripts/cli.py --input <材料目录|单个文件|xxx.zip> --output <输出目录>

# 引导式交互(首次引导 + 五维校验 + 异常处理循环)
python scripts/interactive.py --input <材料目录|单个文件|xxx.zip> --output <输出目录>
#   --no-onboarding  跳过首次引导
#   --check-only     仅输出校验报告、不生成(遇阻塞即停)
#   --auto-ack       自动确认所有阻塞项后生成(自动化/测试用)
#   --enable-push    生成「每日主动提醒」automation JSON(满血版一键开启)
#                    默认写到 <input>/.push_automation.json,可用 --push-output 指定

运行后:

  • <output>/跨境交易监管_<时间戳>_<随机>.xlsx(随机后缀避免同秒重复运行互相覆盖)
  • <output>/archive/(5 个阶段子目录 + 归档清单.csv + archive.zip)

输出约定(自动化友好):

  • 批处理 cli.py 与交互 interactive.py 的 stdout 仅输出纯 JSON 报告(含 anomalies 与新增的 reminders),所有引导/分类预览/错误明细/诊断均走 stderr,便于脚本解析与管道接入。
  • 报告中的 reminders 为静态节点提醒(R3 闭环的批处理层实现):自动派生「收货超期 / 付款超期 / 临近截止」等可行动待办;真正的定时主动推送仍需外接 workbuddy automations 桥接截止日。
  • 退出码:成功 0;无可处理文件或处理出错 1。

测试:

python tests/run_tests.py            # 运行全部(49 项:单元+集成)
python tests/run_tests.py -v         # 详细模式

合成样例(sample_synthetic/,纯文本虚构,SkillHub 上传包内自带):

  • 01_negotiation.txt — 议价邮件片段(订单沟通阶段)
  • 02_po.txt — 简化 PO(含明细/合计,下单阶段)
  • 03_payment.txt — 付款凭证(含发票号、PO 关联,付款阶段)
  • README.md — 使用与"不要替换为真实客户材料"的安全说明

交互流程(建议)

  1. 用户将材料放入一个文件夹(或提供路径)。
  2. Skill 先跑分类预览,把"文件名 → 阶段 + 命中关键词 + 置信度"列给用户确认/纠正。
  3. 确认后执行字段抽取,输出各阶段初步结构化结果。
  4. 用户可补录/修正抽错字段(如 OCR 不全的发票)。
  5. Skill 跑校验,高亮异常。
  6. 生成 Excel + 归档包交付。

配置化扩展

  • 新增/调整阶段关键词:config/classify_rules.json
  • 新增/调整字段列与类型:config/field_schemas.json(抽取器与 Excel 表头均据此自动生成)

已知局限(v2.1)

  • 抽取为正则/关键词启发式,对排版自由的扫描件依赖 OCR,复杂表格建议人工复核。
  • 节点主动提醒(R3):批处理层已通过报告 reminders 派生「超期/临近」可行动待办(静态闭环);若要"到截止日自动推送",仍需外接 workbuddy automations 桥接。
  • 金额/时间校验为单币种、单时区简化逻辑。
  • 并发:单进程 CLI,输出文件名已加随机后缀避免同秒覆盖;不建议多进程写入同一 --output 目录。

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 解决跨境交易零散材料结构化归档与审计合规痛点
  • 覆盖订单沟通、下单、发货、付款、催款五阶段全流程
  • 提供金额勾稽、单号关联、时间线一致性校验与风险预警
Trigger Precision95/100

Highlights

  • 触发词精准完整,五阶段边界清晰
  • description 明确涵盖核心功能与使用场景
Structure and Standards90/100

Areas to improve

  • description写错位置 Reported severity: Minor

    顶层 frontmatter 中 description 为空,实际内容在 skill_body 内部

    Recommendation: 将 description 移至顶层 frontmatter 字段

  • 缺少When to Use显式章节 Reported severity: Minor

    虽有适用场景说明,但未使用标准 When to Use 标题

    Recommendation: 增加显式 When to Use 章节以提升规范性

  • 文档过长 Reported severity: Minor

    SKILL.md 约 600 行,超出建议长度

    Recommendation: 可考虑拆分部分配置说明至独立文档

Highlights

  • 五大处理阶段划分清晰,步骤完整
  • 提供合成样例与测试用例,便于验证
  • frontmatter 元数据完整(含 emoji、version)
Execution Reliability90/100

Highlights

  • 工具依赖明确,参数设计合理
  • 异常处理完善(解析失败文件明确跳过,OCR 缺失回退)
  • 提供交互模式用于纠正分类与字段抽取错误
  • 退出码规范,stdout/stderr 分离便于自动化集成
Evidence Verifiability (mean of the first four)92/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.