ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified productivity Safety 3/5

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.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/chayjan/pdf-contract-redactor
Or

What 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

  1. "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'."
  2. "Process the scan in 'contract_v1.pdf' and provide me with the JSON summary of all extracted and redacted fields."
  3. "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

Author@chayjan
Stars3875
Views1
Updated2026-04-07
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-chayjan-pdf-contract-redactor": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#pdf#redaction#ocr#security#contracts
Safety Score: 3/5

Flags: file-read, file-write, external-api