Contract Ledger Pro: Contract PDF Archiving and Expiration Reminder Skill

Preface

When contracts are scattered across emails, cloud drives, and paper archives, ledgers are often maintained manually in Excel: uploading a PDF, copying down amounts and expiration dates, and setting up separate calendar reminders. The cost of missed updates and forgotten reminders is high. Contract Ledger Pro is a community Skill on SkillHub (business-ops) that strings together “Upload PDF → Extract Fields → Local Ledger → Expiration Check & Feishu Cards” into a workflow callable by Agents; data is stored in local JSON without relying on a separately deployed database.

What is this

Contract Ledger Pro (Coordinates @user_26bdbd50/contract-ledger-pro, current version 1.0.1, source community, publisher user_26bdbd50) is designed for contract ledgers and lifecycle reminders. The positioning described within the Skill is: upload contract PDFs, let AI automatically extract fields to build archives, and support expiration reminders and Feishu (Lark) push notifications.

On SkillHub, this Skill is categorized under business-ops with the tag requires_api_key=true; the page sidebar statistics show a rating of 100000, 932 downloads, and 0 installations (subject to SkillHub display).

In terms of technical implementation, the Skill package includes Python scripts (scripts/main.py serving as the CLI entry point), relying on PyMuPDF for PDF text extraction and requests for HTTP calls, with the ledger written to data/contracts.json.

Core Functions

The following capabilities are derived from the SKILL.md / README.md and script module divisions within the Skill package, and corresponding commands can be handed over to an Agent for execution as needed.

  1. PDF Parsing: Uses PyMuPDF (fitz) to extract text from contract PDFs.
  2. AI Field Extraction: Identifies and archives fields such as contract name, amount, dates, counterparties, and key milestones.
  3. Ledger CRUD: List, details, update, and delete; supports filtering and sorting by status, amount, expiration, etc.
  4. Expiration Reminders: Can configure “N days in advance” reminders for single contracts; supports checking for contracts expiring within a specified number of days.
  5. Feishu Push: check --feishu can output Feishu message card structures related to expiration reminders (templates maintained by feishu_notifier.py).
  6. Export: Supports CSV; Excel/PDF and other formats are tied to plan tiers (see the pricing table below).

Plans and API Key

The paid tiers are clearly detailed in a table within the Skill documentation; if no Key is passed or verification fails, usage is logically constrained to the FREE tier (during network anomalies, the Token module downgrades to FREE without blocking basic usage).

Plan Monthly Fee Contracts Reminders Export
FREE Free 5 1 CSV
BSC ¥29 50 5 CSV
PRO ¥99 300 Unlimited Excel/PDF
ENT ¥299 Unlimited Unlimited All

The API Key prefix is CONTRACT-LGR-*. Verification Interface:

  • Method: POST https://api.yk-global.com/v1/verify
  • Header: Authorization: Bearer {api_key}
  • Local Cache: .token_cache.json, TTL 5 minutes

For purchasing paid versions, refer to YK-Global.com mentioned in the Skill documentation.

Installation and Activation

Installing to Agent via SkillHub CLI

First, confirm if skillhub is already on your machine:

command -v skillhub && skillhub --version

If not installed, follow the SkillHub installation documentation for a full installation or just the CLI (see skillhub.cn/install/skillhub.md). When installing the Skill, you must use --dir to point to the current Agent’s skills directory; otherwise, if it defaults to ./skills/, it might not be recognized.

skillhub install @user_26bdbd50/contract-ledger-pro --dir ~/.cursor/skills/

In Cursor, the common path is ~/.cursor/skills/; for Claude Code, it is ~/.claude/skills/; for Codex, it is ~/.codex/skills/ or .agents/skills/ under the project. For other clients, refer to their respective documentation.

Alternatively, follow the prompts on the SkillHub page to let the AI read the Installation Instructions and then install @user_26bdbd50/contract-ledger-pro.

Python Dependencies

Enter the extracted Skill directory and install dependencies (Python 3.8+):

pip install -r requirements.txt

The content of requirements.txt is:

PyMuPDF>=1.23.0
requests>=2.28.0

Typical Usage

The Skill documentation provides two equivalent entry points: the OpenClaw subcommand form and the internal python scripts/main.py. The following examples use the local CLI, and the steps are directly reproducible.

1. Initialize / View Ledger

python scripts/main.py list

2. Upload Contract PDF

python scripts/main.py upload /path/to/contract.pdf
python scripts/main.py upload /path/to/contract.pdf --api-key CONTRACT-LGR-PRO-xxxxx

3. Filter and Sort

python scripts/main.py list --status 执行中
python scripts/main.py list --sort end_date

In OpenClaw scenarios, the documentation example is openclaw run contract-ledger list --status 执行中 --sort amount, which has similar semantics.

4. Maintain Single Contract

python scripts/main.py get <contract_id>
python scripts/main.py update <contract_id> --name "New Name" --status "Terminated"
python scripts/main.py delete <contract_id>

5. Reminders

python scripts/main.py reminder <contract_id> add --days 7
python scripts/main.py reminder <contract_id> list
python scripts/main.py reminder <contract_id> remove --index 0

6. Expiration Check and Feishu Cards

python scripts/main.py check --days 30
python scripts/main.py check --feishu

7. Export

python scripts/main.py export --format csv -o contracts.csv
python scripts/main.py export --format xlsx -o contracts.xlsx --api-key CONTRACT-LGR-PRO-xxxxx

After enabling the Skill, you can also describe business intentions in the conversation (e.g., “Upload this contract and set a reminder for 7 days in advance”), and the Agent will select the above commands according to SKILL.md; a valid CONTRACT-LGR-* Key is required for PRO/ENT capabilities.

Use Cases and Notes

Who it is for: Legal, business, or operations teams in small and medium-sized enterprises (SMEs) that need to quickly turn contract PDFs into searchable ledgers and periodically scan expiration dates; specifically for scenarios already using Feishu for collaboration and hoping for reminders to land as cards.

Limitations and Notes:

  • SkillHub marks requires_api_key=true; advanced quotas and export formats are bound to the Key tier. Verification relies on api.yk-global.com, so you need to assess compliance and availability yourself.
  • The ledger is stored by default in data/contracts.json under the Skill directory; backup and permissions must be managed manually; multi-machine sync is not covered in the Skill description.
  • The accuracy of “AI Field Extraction” depends on PDF quality and model/implementation details; manual review is still recommended for critical fields.
  • Choose either OpenClaw or running main.py directly; do not mix paths as this may lead to the data/ directory not being found.

Conclusion

Contract Ledger Pro consolidates contract PDFs, local ledgers, expiration scanning, and Feishu reminders into an installable Agent Skill, suitable for integration into clients like Cursor as a business-ops capability. Installation and metadata are subject to SkillHub:

  • SkillHub Page: https://www.skillhub.cn/skills/user_26bdbd50/contract-ledger-pro
  • API Entry: https://api.skillhub.cn/user_26bdbd50/contract-ledger-pro
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye