Invoice and Contract Data Extraction for Openclaw

Openclaw Skills extracts structured invoice and contract data from PDFs or images, validates key fields, and outputs clean JSON plus readable reports.

sh2601393743-png
v1.0.0
Jul 22, 2026
0
354
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install invoice-contract-extract

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install invoice-contract-extract using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Invoice and Contract Data Extraction?

Openclaw Skills turns invoices, receipts, and contracts into structured data by reading PDFs and images, detecting the document type, and extracting fields such as totals, dates, vendors, obligations, and signatures. It is built for finance, legal, and operations teams that need reliable document parsing without manual copy-paste.

The skill produces both machine-readable JSON and human-readable reports, performs amount and date validation, and supports single-file or batch-folder workflows. Openclaw Skills is especially useful when you need local-first extraction, audit-friendly output, and a consistent format across mixed document sources.

Invoice and Contract Data Extraction Use Cases

  • Extract invoice numbers, dates, vendors, line items, taxes, and totals from PDFs or images.
  • Review receipts and compile spend data for finance operations.
  • Pull contract parties, effective and expiration dates, obligations, termination terms, and signatories.
  • Process a folder of documents in batch and return merged JSON plus a summary table.
  • Flag inconsistent amounts, missing fields, or date issues for human review.
  • Use Openclaw Skills when you need private, local document extraction instead of sending files externally.

How Invoice and Contract Data Extraction Works

  1. Accept a file path or directory, then optionally specify the document type and output format.
  2. Read the PDF or image through the Read tool, OCR the content when needed, and detect whether the file is an invoice, receipt, or contract.
  3. Extract document-specific fields into structured sections for financial data, parties, dates, line items, clauses, and signatures.
  4. Validate totals, line-item sums, date ordering, currency matching, and required-field completeness.
  5. Generate both JSON output and a human-readable report with statuses, warnings, and source references.
  6. If a directory is provided, repeat the process for every file, aggregate results into a batch array, and tag any failures.
  7. Run a final quality self-check so invalid JSON, missing required fields, and unresolved uncertainties are clearly flagged.

Invoice and Contract Data Extraction Setup

Openclaw Skills does not require a separate runtime package beyond your host agent. Add it to a supported environment and make sure the Read tool can access PDFs and images.

  1. Import the skill into Claude Code, Cursor, Codex CLI, or OpenClaw.
  2. Verify OCR-capable Read access for PDF, PNG, and JPG documents.
  3. Use the document-specific trigger command or a natural-language request.
  4. For batch jobs, point the skill at a directory of files.
/extract-invoice ./receipts/ --format=json
/extract-contract ./contracts/ --format=report
/extract-invoice invoice_001.pdf
  1. Review validation warnings for missing fields, date issues, or amount mismatches, then send uncertain cases for manual review.

Invoice and Contract Data Extraction Data Schema & Taxonomy

Top-level JSON

Key Type Purpose
file string Source filename or path
type string invoice, receipt, or contract
extractedAt string Extraction timestamp
fields object Document-specific extracted data
validation object Validation status and warnings

Invoice field model

Field Type Required Notes
invoiceNumber string Yes Invoice identifier
issueDate date Yes Invoice date
dueDate date No Payment due date
vendor object Yes name, address, taxId
customer object Yes name, address
lineItems array Yes description, quantity, unitPrice, amount
subtotal number Yes Must match line item sum
taxRate number No Tax percentage
taxAmount number Yes Tax value
total number Yes subtotal + tax
currency string Yes Currency code
paymentTerms string No Payment terms
notes string No Additional comments

Contract field model

Field Type Required Notes
contractTitle string Yes Contract name
contractNumber string No Reference number
contractType string Yes NDA, service, procurement, employment, etc.
effectiveDate date Yes Start date
expirationDate date Yes End date
partyA object Yes name, address
partyB object Yes name, address
contractValue number No Contract amount
paymentTerms string No Payment schedule
keyObligations array/string Yes Core duties of each party
terminationClause string Yes Termination terms
confidentiality string No Confidentiality terms
disputeResolution string No Governing dispute path
signatories array Yes name, position, date
signatureDate date Yes Signing date

Validation and metadata taxonomy

  • Document identity: file, type, extractedAt.
  • Financial data: invoiceNumber, subtotal, taxAmount, total, currency, contractValue.
  • Party data: vendor and customer for invoices; partyA, partyB, and signatories for contracts.
  • Time data: issueDate, dueDate, effectiveDate, expirationDate, signatureDate.
  • Validation data: passed, warnings, and manual review flags.
  • Audit trail: original context references from the source document should be retained for human verification.

Generated artifacts

  • Structured JSON output for downstream automation.
  • Human-readable report with field tables, validation results, line items or clauses, and source references.
  • Batch summary table when a directory is processed, plus a merged JSON array for multi-file runs.

Invoice and Contract Data Extraction Advanced Features

  • Automatic document-type detection across invoices, receipts, and contracts.
  • Batch folder processing with merged JSON arrays and per-file failure tagging.
  • Dual output mode: structured JSON plus an audit-friendly human report.
  • Validation logic for amount math, date ordering, currency matching, and required-field completeness.
  • Chinese and English document support, plus PDF, PNG, and JPG inputs.
  • Local-only processing for privacy-sensitive finance and legal workflows.
  • Original-text reference snippets for audit and manual review.
  • Openclaw Skills command-driven workflows such as /extract-invoice and /extract-contract across Claude Code, Cursor, Codex CLI, and OpenClaw.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*