Skip to content
Back to skills

Contract Ledger Pro

ASecurity

> 上传合同 PDF → AI 自动提取字段建档 → 到期提醒 + 飞书推送

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 25, 2026
toolspythonapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 10 files and shows the line behind each finding

Scanned September 25, 2026

npx -y skills add CSlawyer1985/legal-skillhub --skill contract-ledger-pro --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Contract Ledger Pro?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Contract Ledger Pro
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cslawyer1985-contract-ledger-pro/badge)](https://www.skillsdirectory.com/skills/cslawyer1985-contract-ledger-pro)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# SKILL.md - 合同台账管理(Contract Ledger)

> 上传合同 PDF → AI 自动提取字段建档 → 到期提醒 + 飞书推送

## 功能概述

### 核心能力
- **PDF 解析**:使用 PyMuPDF 提取合同文本
- **AI 字段提取**:自动识别合同名称、金额、日期、对方、关键节点
- **台账管理**:增删改查,支持按状态/金额/到期筛选
- **到期提醒**:可设置提前 N 天提醒
- **飞书推送**:到期提醒消息卡片推送给用户
- **数据导出**:支持 CSV/Excel/PDF(根据套餐)

## 套餐说明

| 套餐 | 月费 | 合同数 | 提醒数 | 导出 |
|------|------|--------|-------|------|
| FREE | 免费 | 5份 | 1个 | CSV |
| BSC | ¥29 | 50份 | 5个 | CSV |
| PRO | ¥99 | 300份 | 无限 | Excel/PDF |
| ENT | ¥299 | 无限 | 无限 | 全部 |

## 使用方法

### 1. 上传合同
```
openclaw run contract-ledger upload /path/to/contract.pdf --api-key CONTRACT-LGR-PRO-xxxxx
```

### 2. 查看台账
```
openclaw run contract-ledger list
openclaw run contract-ledger list --status 执行中 --sort amount
```

### 3. 查看合同详情
```
openclaw run contract-ledger get <contract_id>
```

### 4. 更新合同
```
openclaw run contract-ledger update <contract_id> --name "新名称" --status "已终止"
```

### 5. 删除合同
```
openclaw run contract-ledger delete <contract_id>
```

### 6. 设置提醒
```
openclaw run contract-ledger reminder <contract_id> add --days 7
openclaw run contract-ledger reminder <contract_id> list
openclaw run contract-ledger reminder <contract_id> remove --index 0
```

### 7. 检查到期合同
```
openclaw run contract-ledger check --days 30
openclaw run contract-ledger check --feishu
```

### 8. 导出数据
```
openclaw run contract-ledger export --format csv -o contracts.csv
openclaw run contract-ledger export --format xlsx -o contracts.xlsx --api-key CONTRACT-LGR-PRO-xxxxx
```

## Token 验证

- URL:`POST https://api.yk-global.com/v1/verify`
- 请求头:`Authorization: Bearer {api_key}`
- 响应字段:`**valid**`
- 前缀:`CONTRACT-LGR-*`
- 降级策略:网络错误 → FREE tier
- 缓存:本地 5 分钟

## 存储结构

```
contract-ledger/
├── data/
│   └── contracts.json   # 合同台账数据
├── scripts/
│   ├── main.py         # CLI 入口
│   ├── pdf_parser.py   # PDF 解析
│   ├── storage.py      # 数据存储
│   ├── token_validation.py  # Token 验证
│   └── feishu_notifier.py  # 飞书通知
├── .token_cache.json    # Token 缓存
└── SKILL.md
```

## 依赖

- PyMuPDF (fitz)
- requests
- Python 3.8+

> 如需购买收费版,请访问 [YK-Global.com](https://yk-global.com)

Files in this skill

  • README.md3.4 KB
  • SKILL.md2.7 KB
  • requirements.txt33 B
  • scripts/__init__.py26 B
  • scripts/feishu_notifier.py4.1 KB
  • scripts/main.py9.9 KB
  • scripts/pdf_parser.py4.9 KB
  • scripts/storage.py5.2 KB
  • scripts/token_validation.py2.9 KB
  • test_contract_ledger.py8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…