Install
openclaw skills install auto-dimension-report-skill-enProcess PDF, DOCX, XLSX from supply chain document packages — conversion, image extraction, OCR, dimension verification, and review report generation. Invoked when users mention part dimension inspection, dimension report review, supplier document review, seal/signature check, or image extraction.
openclaw skills install auto-dimension-report-skill-enA general-purpose Agent Skill for supply chain document review, dimension inspection report verification, and seal/signature checks. Core pipeline: Document sorting -> Image extraction -> OCR recognition -> Verification -> Review report output
Quickly select execution path based on user goal:
| User wants | Minimum steps | Main outputs |
|---|---|---|
| Sort document package, extract images | Step 1 | output/, image/, _ImageIndex.xlsx |
| Check seals, signatures, scanned text | Step 1 -> Step 2 | imagetomd/, OCR keyword clues |
| Verify dimension correctness | Step 1 -> Step 3 | Judgement consistency check results |
| Generate full review conclusion | Step 1, optionally Step 2/3, then Step 4 | ReviewReport.md |
Quick judgment:
PDF / DOCX / XLSX document package -> prioritize Step 1seal / signature / scanned document / OCR -> add Step 2OK / NG / Pass / Fail / tolerance -> add Step 3summary report / final review conclusion -> execute Step 4 lastWhen a user provides a document package containing PDF, DOCX, XLSX files, this skill organizes the scattered files into a reviewable structure and provides directly usable intermediate results and reports for manual review.
Common suitable tasks:
output/, image/, imagetomd/) for traceabilityUse this skill when the user shows the following intent:
Typical trigger phrases:
dimension inspection reportpart dimension inspectionsupply chain reviewsupplier document reviewquality document reviewtable data reviewjudgement consistency checkseal reviewstamp reviewsignature reviewPDF to DOCXextract imagesIf unsure how to start, follow this order:
.pdf, .docx, .xlsx, .xlsm files?Decision rules:
Do not promise completion in these cases; explain boundaries first:
.pdf, .docx, .xlsx, .xlsmAfter task completion, the following structure is typically created:
Task Folder/
├── Original files
├── output/
│ ├── *.pdf.docx
│ ├── *.docx
│ ├── *.xlsx
│ └── _ImageIndex.xlsx
├── image/
│ └── Extracted images saved in subdirectories by source file
├── imagetomd/
│ └── OCR Markdown generated per image
└── ReviewReport.md
output/ for traceabilityWhen converting PDF to DOCX, image positions retain two types of information:
| Method | Purpose |
|---|---|
| Embedded image | For manual review directly in DOCX |
Path reference [Image Reference] image/... | For agent or manual backtracking to original image |
Extract embedded images from PDF, DOCX, XLSX/XLSM and save to image/{source file name}/.
| File Type | Image Naming Convention |
|---|---|
source.pdf-p{page}-img{seq}.{ext} | |
| DOCX | source.docx-{seq}.{ext} |
| XLSX/XLSM | source.xlsx-{seq}.{ext} |
image/imagetomd/HERDSMAN_SKILL_DIR or scripts/config.jsonFor common dimension inspection tables, the script checks:
OK / PassAggregate data from output/, image/, imagetomd/ to generate a report for manual review, with additional OCR text scanning for:
seal / stampsignatureExecute in the following order by default. Do not skip steps unless the user explicitly requests only partial results.
First confirm the following:
If the user has not been clear, ask at least once — do not make assumptions.
Main entry script:
uv run python "<skill-dir>/scripts/task_convert_extract.py" --dir "<task-folder>"
This step will:
image/output/output/_ImageIndex.xlsxpython "<skill-dir>/scripts/image_to_markdown.py" --dir "<task-folder>"
Optional parameters:
python "<skill-dir>/scripts/image_to_markdown.py" --dir "<task-folder>" --force
python "<skill-dir>/scripts/image_to_markdown.py" --dir "<task-folder>" --model "paddleocr-ppocrv5-server"
python "<skill-dir>/scripts/image_to_markdown.py" --dir "<task-folder>" --batch-size 20
This step is mandatory only in these scenarios:
python "<skill-dir>/scripts/extract_verify_data.py" --dir "<task-folder>"
When template column positions vary, supplement with these parameters:
python "<skill-dir>/scripts/extract_verify_data.py" --dir "<task-folder>" --seq-col 2 --item-col 3 --std-col 5 --method-col 7 --data-start 9 --data-cols 5 --judge-col 14 --data-start-row 24
Enhancements:
√, ○ as pass judgement43°±5°, Φ6-0.05, ≥5.4MPa, 13(+0.2/0)Applicable to:
python "<skill-dir>/scripts/generate_report.py" --dir "<task-folder>"
Optional output formats:
python "<skill-dir>/scripts/generate_report.py" --dir "<task-folder>" --format md
python "<skill-dir>/scripts/generate_report.py" --dir "<task-folder>" --format json
python "<skill-dir>/scripts/generate_report.py" --dir "<task-folder>" --format summary
Key output includes:
The final response should at least cover:
The following phrases should typically trigger this skill:
"Review this supplier document package for dimension judgement issues."
"Convert all PDFs in this task folder to reviewable versions and extract images."
"Check this batch of reports for stamp or signature clues."
"Check if the OK/NG judgements in the Excel match the measured values."
"Once done, produce a review report."
Recommended response strategy:
Standard pass terms:
OK合格 (Pass)√○Standard fail terms:
NOK不合格 (Fail)NGThe following are considered non-standard pass terms and require user notification:
PASS正确 (Correct)通过 (Pass)If measured values are outside tolerance range but the judgement column still reads:
OK合格 (Pass)It must be marked as a high-risk item with explicit warning in the summary.
When OCR hits the following keywords, only indicate "relevant text clues found" — do not draw conclusions:
印章 (seal)公章 (official stamp)签名 (signature)Do not overwrite original files. All output should be placed in:
output/image/imagetomd/Configuration file: scripts/config.json
{
"base_url": "http://127.0.0.1:8080",
"ocr_model": "paddleocr-ppocrv5-server",
"ocr_transport": "auto",
"request_timeout": 120,
"retry_count": 2,
"retry_delay": 5,
"ocr_script_dir": ""
}
Priority (high to low):
--modelconfig.jsonRelevant environment variables:
HERDSMAN_BASE_URL: Override OCR service addressHERDSMAN_SKILL_DIR: Explicitly specify OCR skill root directoryHERDSMAN_OCR_TRANSPORT: Override OCR transport method (auto / http / script)image/ not foundtask_convert_extract.py firstHERDSMAN_SKILL_DIR or update scripts/config.jsonExecute on demand, no forced full workflow:
| Path | Purpose |
|---|---|
scripts/task_convert_extract.py | Document sorting, PDF to DOCX, image extraction, index generation entry point |
scripts/image_to_markdown.py | Image OCR recognition and Markdown output |
scripts/extract_verify_data.py | Dimension data extraction and judgement consistency verification |
scripts/generate_report.py | Aggregate and generate review report |
scripts/config.json | OCR model and service configuration |
references/setup-guide.md | Environment installation and setup instructions |
references/naming-conventions.md | Directory structure and naming conventions |