make-integration

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

make-integration

make-integration

When to use

适用场景

Use this skill when the user needs Make Platform integration capabilities, especially OCR recognition for invoices and bills.
Current capability:
  • Bill and invoice OCR through
    makecli integration ocr
  • Optional invoice authenticity verification
  • Structured extraction for PDF/OFD/PNG/JPG/JPEG files
  • Returned invoice fields, stamps, QR codes, coordinates, and optional crop images
当用户需要Make Platform集成能力,尤其是发票和账单的OCR识别时,使用本技能。
当前能力:
  • 通过
    makecli integration ocr
    实现账单和发票OCR
  • 可选的发票真伪验证
  • 支持PDF/OFD/PNG/JPG/JPEG文件的结构化提取
  • 返回发票字段、印章、二维码、坐标以及可选的裁剪图片

Dependency

依赖

make-integration depends on the
makecli
skill and the installed
makecli
binary.
make-integration依赖
makecli
技能以及已安装的
makecli
二进制文件。

Instructions

使用说明

Pre-flight check

预检步骤

Before running OCR:
  1. Check
    makecli
    is installed.
    • Missing: run
      brew tap qfeius/makecli && brew install makecli
  2. Check the OCR command exists.
    • Run
      makecli integration ocr --help
    • If the command is missing, run
      makecli update
      or upgrade makecli.
  3. Check the selected profile.
    • Run
      makecli configure verify --profile <profile> --output=json
    • If not configured, tell the user to run the interactive setup:
      ! makecli configure token --profile <profile>
    • If the token is invalid or missing, stop and ask the user to configure makecli credentials. Do not recognize, extract, infer, correct, or complete invoice content outside makecli.
  4. Check the request base URL from makecli.
    • Run
      makecli configure get server-url --profile <profile>
    • Prefer using the profile-configured server URL instead of hard-coding an environment URL.
    • If the profile has no server URL, makecli uses its own default base URL.
  5. Check the input file.
    • Supported extensions:
      .pdf
      ,
      .ofd
      ,
      .png
      ,
      .jpg
      ,
      .jpeg
    • Only upload files provided or approved by the user.
在运行OCR之前:
  1. 检查
    makecli
    是否已安装。
    • 未安装:执行
      brew tap qfeius/makecli && brew install makecli
  2. 检查OCR命令是否存在。
    • 执行
      makecli integration ocr --help
    • 如果命令不存在,执行
      makecli update
      或升级makecli。
  3. 检查所选的profile。
    • 执行
      makecli configure verify --profile <profile> --output=json
    • 如果未配置,告知用户执行交互式设置:
      ! makecli configure token --profile <profile>
    • 如果token无效或缺失,停止操作并要求用户配置makecli凭证。不得在makecli之外识别、提取、推断、更正或补全发票内容。
  4. 检查makecli的请求基础URL。
    • 执行
      makecli configure get server-url --profile <profile>
    • 优先使用profile中配置的服务器URL,而非硬编码环境URL。
    • 如果profile未设置服务器URL,makecli将使用其默认的基础URL。
  5. 检查输入文件。
    • 支持的扩展名:
      .pdf
      ,
      .ofd
      ,
      .png
      ,
      .jpg
      ,
      .jpeg
    • 仅上传用户提供或批准的文件。

Recognition workflow

识别工作流

Use table output when the user only needs a readable answer:
bash
makecli integration ocr -f <file> --profile <profile>
Use JSON output when you need to parse fields or feed the result into another Make operation:
bash
makecli integration ocr -f <file> --output=json --profile <profile>
Common options:
bash
undefined
当用户仅需要可读的结果时,使用表格输出:
bash
makecli integration ocr -f <file> --profile <profile>
当需要解析字段或将结果传入其他Make操作时,使用JSON输出:
bash
makecli integration ocr -f <file> --output=json --profile <profile>
常用选项:
bash
undefined

Recognize selected pages

Recognize selected pages

makecli integration ocr -f invoice.pdf --pages "1,3,2" makecli integration ocr -f invoice.pdf --pages "2-4"
makecli integration ocr -f invoice.pdf --pages "1,3,2" makecli integration ocr -f invoice.pdf --pages "2-4"

Bind a business document id

Bind a business document id

makecli integration ocr -f invoice.pdf --business-id <business-id>
makecli integration ocr -f invoice.pdf --business-id <business-id>

Explicitly disable invoice authenticity verification

Explicitly disable invoice authenticity verification

makecli integration ocr -f invoice.pdf --verify-vat=false
makecli integration ocr -f invoice.pdf --verify-vat=false

Optional response controls

Optional response controls

makecli integration ocr -f invoice.pdf --coord-restore-original makecli integration ocr -f invoice.pdf --crop-complete makecli integration ocr -f invoice.pdf --crop-value makecli integration ocr -f invoice.pdf --merge-elec makecli integration ocr -f invoice.pdf --return-ppi
undefined
makecli integration ocr -f invoice.pdf --coord-restore-original makecli integration ocr -f invoice.pdf --crop-complete makecli integration ocr -f invoice.pdf --crop-value makecli integration ocr -f invoice.pdf --merge-elec makecli integration ocr -f invoice.pdf --return-ppi
undefined

Output handling

输出处理

For
--output=json
, summarize from:
text
data.file_name
data.bill_count
data.processing_duration_ms
data.result.pages[].bills[].items[]
data.result.pages[].bills[].stamps[]
data.result.pages[].bills[].qr_codes[]
When reporting results to the user:
  • Include file name, bill count, page count, and processing duration when available.
  • Extract non-empty
    items[].value
    fields.
  • Include stamps and QR codes when they are present and useful.
  • Keep base64 crop payloads out of normal summaries.
  • Report recognized OCR values only from successful
    makecli integration ocr
    output.
  • Treat only
    makecli integration ocr
    output as the recognition result. Do not use visual inspection, model knowledge, file parsing, alternate OCR tools, direct HTTP calls, or user-visible image content to recognize or fill invoice data.
  • Mask or replace special and personal information only in skill documentation examples, committed samples, logs, or debug snippets.
  • If the OCR result will be written to Make records, invoke the
    makecli
    skill for record operations after recognition.
对于
--output=json
的情况,从以下字段中提取汇总:
text
data.file_name
data.bill_count
data.processing_duration_ms
data.result.pages[].bills[].items[]
data.result.pages[].bills[].stamps[]
data.result.pages[].bills[].qr_codes[]
向用户报告结果时:
  • 如可用,包含文件名、票据数量、页数和处理时长。
  • 提取非空的
    items[].value
    字段。
  • 当印章和二维码存在且有用时,包含这些信息。
  • 正常汇总中不要包含base64裁剪载荷。
  • 仅报告来自成功的
    makecli integration ocr
    输出的OCR识别值。
  • 仅将
    makecli integration ocr
    的输出视为识别结果。不得使用视觉检查、模型知识、文件解析、其他OCR工具、直接HTTP调用或用户可见的图像内容来识别或填充发票数据。
  • 仅在技能文档示例、提交的样本、日志或调试片段中,对特殊和个人信息进行掩码或替换。
  • 如果OCR结果需要写入Make记录,在识别完成后调用
    makecli
    技能执行记录操作。

Failure handling

故障处理

  • API 错误 [990300403]: token验证失败
    • The token is invalid for the selected environment. Ask the user to configure a token valid for that environment, then retry OCR through makecli.
  • API 错误 [990300404]: 服务不存在
    • The selected makecli server URL likely has not deployed the OCR route. Check the profile server URL or confirm deployment.
  • unsupported file extension
    • Ask for a supported PDF/OFD/PNG/JPG/JPEG file.
  • 打开文件失败
    • Check the local path and permissions.
  • Any makecli OCR failure
    • Report the makecli failure and the next makecli configuration or environment step. Do not continue by recognizing the invoice content yourself.
  • API 错误 [990300403]: token验证失败
    • 所选环境的token无效。要求用户配置对应该环境的有效token,然后通过makecli重试OCR。
  • API 错误 [990300404]: 服务不存在
    • 所选的makecli服务器URL可能未部署OCR路由。检查profile的服务器URL或确认部署情况。
  • unsupported file extension
    • 要求提供支持的PDF/OFD/PNG/JPG/JPEG文件。
  • 打开文件失败
    • 检查本地路径和权限。
  • 任何makecli OCR故障
    • 报告makecli故障以及下一步的makecli配置或环境调整步骤。不要自行识别发票内容来继续处理。

Hard rules

硬性规则

  • Do not write user-provided tokens into repository files.
  • Prefer temporary config directories when the user provides a one-off token.
  • Clean up temporary credentials and OCR result files after the run unless the user asks to keep them.
  • Never print, commit, or duplicate tokens.
  • Do not upload local files unless the user provided or approved them.
  • Do not commit real invoice numbers, taxpayer IDs, order numbers, phone numbers, addresses, tokens, QR payloads, or other sensitive values in skill examples.
  • Do not use any non-makecli path as a fallback for this skill. If makecli cannot run or OCR fails, fix makecli configuration/environment first and retry through makecli.
  • 不得将用户提供的token写入仓库文件。
  • 当用户提供一次性token时,优先使用临时配置目录。
  • 运行结束后清理临时凭证和OCR结果文件,除非用户要求保留。
  • 严禁打印、提交或复制token。
  • 不得上传本地文件,除非用户提供或批准了这些文件。
  • 不得在技能示例中提交真实的发票号码、纳税人识别号、订单号、电话号码、地址、token、二维码载荷或其他敏感值。
  • 不得使用任何非makecli路径作为本技能的备用方案。如果makecli无法运行或OCR失败,请先修复makecli配置/环境,再通过makecli重试。