pdf-contract-redactor
PDF contract redaction tool. Use when the user needs to redact sensitive information from scanned PDF contracts. The tool performs OCR to extract text, identifies field names and their corresponding values, and redacts only the values while keeping field names visible. Supports Alibaba Cloud OCR API for accurate Chinese text recognition.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/chayjan/pdf-contract-redactorWhat This Skill Does
The pdf-contract-redactor is a specialized AI agent skill designed to process scanned PDF contracts by intelligently identifying sensitive information and redacting it. Unlike simple image editors that require manual selection, this tool automates the process by performing OCR to recognize field names—such as "合同金额" (Contract Amount) or "合同甲方名称" (Contract Party A)—and their corresponding values. It effectively creates black redaction boxes over the sensitive data while ensuring the field names remain legible for administrative or record-keeping purposes. Built to utilize the high-precision Alibaba Cloud OCR service, it provides robust recognition for Chinese-language legal documents, making it an essential tool for compliance and document privacy.
Installation
To integrate this skill into your environment, use the OpenClaw command-line interface. Ensure you have the necessary system dependencies (pymupdf, pillow, requests) installed. Run the following command:
clawhub install openclaw/skills/skills/chayjan/pdf-contract-redactor
Once installed, you must provide your Alibaba Cloud AccessKey ID and Secret to allow the tool to communicate with the OCR service APIs. Detailed configuration is handled in the execution script.
Use Cases
- Regulatory Compliance: Automatically redact sensitive personal or financial information from thousands of scanned contracts before archiving them in a company database.
- Vendor Audits: Prepare shared contract files for third-party auditors where non-sensitive business terms must remain visible, but payment details and contact information must be hidden.
- Data Privacy: Protect partner, employee, and client PII (Personally Identifiable Information) when moving physical contract archives into digital workflows.
Example Prompts
- "Redact all sensitive values from the file 'legal_agreement_2023.pdf' using my Alibaba Cloud API credentials and save the output as 'redacted_final.pdf'."
- "Process the scan in 'contract_v1.pdf' and provide me with the JSON summary of all extracted and redacted fields."
- "Run the redaction tool on the folder of scanned PDFs; make sure the '合同金额' and '收款银行' fields are correctly masked in every document."
Tips & Limitations
- OCR Accuracy: Always verify the outputs for complex handwriting or very low-resolution scans, as OCR accuracy relies on clear, high-contrast text. 200 DPI is the recommended input setting.
- Field Logic: The tool looks for values to the right or immediately below the field name. If your contract layout uses unconventional non-standard tables or extreme whitespace, manual review might be required.
- Security: Because this tool transmits images to the Alibaba Cloud OCR service, ensure your cloud account settings comply with your organization's data privacy and security policies regarding document processing.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-chayjan-pdf-contract-redactor": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write, external-api
Related Skills
dingtalk-docs
管理钉钉云文档中的文档、文件夹和内容。当用户想要创建文档、搜索文档、读取或写入文档内容、创建文件夹整理文档时使用。也适用于用户提到云文档、在线文档、钉钉文档、钉文档等关键词的场景。不要在用户需要操作多维表、管理日程、发消息或处理审批流时触发。
Coding
Coding style memory that adapts to your preferences, conventions, and patterns for consistent coding.
investment-data
获取高质量 A 股投资数据,基于 investment_data 项目。支持日终价格、涨跌停数据、指数数据等。每日更新,多数据源交叉验证。触发词:股票数据、A股数据、金融数据、量化数据、历史行情。
dingtalk
DingTalk channel plugin for OpenClaw - send and receive messages via DingTalk (钉钉)