Chat Order OCR for Openclaw

Chat Order OCR turns pasted chat messages and OCR text into structured, grouped, and human-reviewable order lists.

qpooqp777
v1.0.0
Aug 27, 2026
0
277
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install chat-order-ocr

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 chat-order-ocr 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 Chat Order OCR?

Chat Order OCR is an Openclaw Skills utility for extracting customer names, product names, and quantities from LINE, Facebook, and other chat-based orders. Its bundled CLI applies deterministic parsing rules for patterns such as +1, +2, 一份, 兩盒, and 3個, while ignoring timestamps, standalone numbers, image notices, and system messages.

The skill preserves original text and clearly marks uncertain or OCR-derived results for manual verification. It exports JSON for downstream automation and CSV for spreadsheets, fulfillment, or customer-facing workflows, with optional name grouping, sorting, OCR processing, and catalog-based product matching.

Chat Order OCR Use Cases

  • Convert copied LINE or Facebook order conversations into structured order rows.
  • Parse OCR text extracted from chat screenshots without inventing missing names, products, or quantities.
  • Batch-process JPG, JPEG, PNG, WEBP, BMP, or TIFF screenshots with local Tesseract OCR.
  • Group orders by customer name for fulfillment, pickup, or delivery preparation.
  • Sort order rows in original order, by name A→Z, or by name Z→A.
  • Export UTF-8 BOM CSV files for Excel and spreadsheet-based operations.
  • Generate JSON containing rows, summaries, sorting metadata, source information, and confidence states.
  • Match recognized product aliases against a standard catalog while retaining the original item text.
  • Build or update a frontend chat-order management tool using the CLI output as the canonical data contract.

How Chat Order OCR Works

  1. Identify the source as pasted text, existing OCR text, or image files. For image processing, verify that Tesseract and the chi_tra+eng language data are available locally.
  2. Preserve the original UTF-8 chat content or pass it to the CLI through standard input. Do not manually rewrite source messages before parsing.
  3. Run scripts/order_ocr_cli.py with text input, stdin, individual images, or an image directory.
  4. Detect order-like lines containing quantity patterns such as +1, +2, 一份, 兩盒, or 3個, and associate them with the nearest plausible standalone name line.
  5. Ignore timestamps, system notices, image placeholders, and unrelated standalone numbers while preserving product specifications such as weight and size.
  6. Mark text-source results as high confidence when the name is identifiable; mark OCR results, missing names, ambiguous lines, and unmatched catalog items as check.
  7. Optionally normalize recognized products through a catalog, retaining item and adding matched_item and match_status.
  8. Apply original, name-asc, name-desc, or --group-by person ordering rules.
  9. Write JSON or CSV output and review the row count, person count, total units, source fields, and all entries requiring human confirmation.

Chat Order OCR Setup

  1. Ensure Python is available and locate the bundled CLI:
CLI=/home/ubuntu/skills/chat-order-ocr/scripts/order_ocr_cli.py
python "$CLI" --help
  1. For screenshot OCR, install Tesseract and the Traditional Chinese and English language data using your operating system's package manager. Confirm the language packs:
tesseract --list-langs

The output should include chi_tra and eng. Install the corresponding Tesseract language packages if either is missing.

  1. Prepare a UTF-8 text file, OCR text stream, or supported image files. Run a basic text-to-JSON conversion:
python "$CLI" --input messages.txt --format json --output orders.json
  1. Parse OCR text from stdin and export a grouped CSV:
cat ocr.txt | python "$CLI" --source ocr --group-by person --format csv --output orders.csv
  1. Process multiple screenshots with local Tesseract OCR and an optional product catalog:
python "$CLI" --images screenshots/*.jpg --catalog catalog.json --format json --output ocr-orders.json
  1. Use an image directory for supported formats or print sorted JSON to standard output:
python "$CLI" --images-dir screenshots/ --format json --output batch-orders.json
python "$CLI" --input messages.txt --sort name-desc --format json
  1. Before delivery or fulfillment, manually inspect every row marked confidence: check. OCR output is not automatically approved, and the skill must not fabricate quantities or fill in missing order details.

Chat Order OCR Data Schema & Taxonomy

JSON envelope

Field Purpose
rows Parsed order entries containing the extracted customer, item, quantity, source, and confidence information.
summary Aggregate counts, including people, rows, and total units.
sort The applied ordering mode, such as original, name-asc, or name-desc.
group_by Grouping metadata, including person when customer-based grouping is enabled.
ocr Per-image OCR reports, including source file path, success or failure status, recognized character count, and parsed row count.

Order row metadata

  • person: The identified ordering person when available.
  • item: The original product text captured by the parser.
  • quantity: The detected numeric or Chinese quantity.
  • source: The input origin, such as text or ocr.
  • confidence: Usually high for clear text-source rows and check for OCR, ambiguous, incomplete, or otherwise uncertain results.
  • matched_item: The standardized catalog item when alias matching succeeds.
  • match_status: 已對應 for a successful catalog match or 未對應,請確認 when no match is found.

Catalog format

Provide a JSON object mapping standard product names to aliases:

{
  "Standard Product": ["Alias One", "Alias Two"]
}

Catalog matching removes whitespace, ignores letter case, recognizes aliases contained in the input, and prefers longer aliases. It is a deterministic alias lookup rather than semantic inference, so the original item text remains available for review.

CSV output

CSV exports use UTF-8 BOM encoding for spreadsheet compatibility and include customer name, item, quantity, source, and confidence fields. Rows requiring manual review must remain visibly marked rather than being silently corrected.

Chat Order OCR Advanced Features

  • Local, deterministic parsing through the bundled order_ocr_cli.py rather than model guesses.
  • Batch screenshot OCR with Tesseract and chi_tra+eng language support.
  • Resilient batch processing that continues with remaining images when one image fails.
  • Per-image OCR audit metadata for file paths, completion status, character counts, and parsed row counts.
  • Product catalog alias matching with preservation of both raw and standardized item names.
  • Explicit confidence and review-state propagation from OCR and ambiguous parsing cases.
  • Multiple output modes: machine-friendly JSON and spreadsheet-ready UTF-8 BOM CSV.
  • Reusable sorting controls for original order, name ascending, and name descending.
  • Customer grouping with --group-by person and recorded grouping metadata.
  • Safe handling of duplicate names, cross-message content, mixed quantity notation, and product specifications.
  • A stable data contract for frontend tools: interfaces should preserve person, item, quantity, source, and review status instead of implementing conflicting parsing logic.
  • Verification-oriented behavior that returns empty rows when quantities cannot be recognized rather than inventing order quantities.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*