Communitygithub.com

alibaba-quark-scanking/alibaba-quark-scan-skill

A collection of Quark Scan King OpenClaw Skills. Three major document AI skill packs for the OpenClaw Agent: OCR text recognition (17 scenarios), document scanning enhancement (13 modes), and image-to-Office (Word/Excel/PDF). Unlock all 30+ capabilities with one API Key, ready to use with `openclaw skills install`.

What is alibaba-quark-scan-skill?

This skill pack integrates the Quark Scan King (夸克扫描王) document AI capabilities into the OpenClaw Agent, providing three core skill sets: OCR text recognition covering 17 scenarios (such as ID cards, business cards, documents, etc.), document scanning enhancement with 13 modes (including de-skewing, sharpening, and color adjustment), and image-to-document conversion supporting Word, Excel, and PDF output. It requires a single API Key from the Quark Scan business platform to activate all 30+ functions. The execution follows a strict Plan → Execute → Verify cycle, ensuring environment readiness (CLI tool `yescan` installed and updated, API key configured) before each run. It uses the `yescan` command-line tool for all operations, with explicit scene discovery via `--list-scenes` and parameter validation. The skill is designed for OpenClaw, Hermes, QoderWork, Wukong, Coze, Claude Code, and other agent platforms, and is installed via `openclaw skills install`.

Works with✓Claude Code~Codex CLI~Cursor
npx skills add alibaba-quark-scanking/alibaba-quark-scan-skill

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Execution Flow

Each execution must strictly follow the Plan → Execute → Verify sequence. Do not skip or reorder.

Plan — Understand Intent, Discover Capabilities

  1. Verify Environment Readiness (mandatory before every execution, do not skip):

    • Installation & Upgrade:
      1. Run yescan --version — if not installed, execute pip3 install yescan; if version < 1.0.5, execute pip3 install yescan --upgrade, and only proceed after the upgrade is complete.
      2. Run pip3 index versions yescan — if INSTALLED < LATEST, inform the user of the new version and provide the upgrade command: pip3 install yescan --upgrade. The user decides whether to upgrade.
    • Key Check: Run yescan config get SCAN_WEBSERVICE_KEY. If not configured, guide the user to configure it.
      • Setting command: yescan config set SCAN_WEBSERVICE_KEY <your_api_key>

      How to obtain the key: https://scan.quark.cn/business → Developer Console → API Key

    Checkpoint: Version < 1.0.5 → must upgrade before proceeding. Version ≥ 1.0.5 but not the latest → may proceed after prompting the user. If the key is not configured, guide configuration before proceeding.

  2. Discover Capabilities:

    yescan --list-scenes              # Get all scenes and their intent descriptions
    yescan --list-scenes <scene>      # Get the --set parameters for that scene
    

    Match the user's intent to a specific scene from the output.

  3. For multi-step processing, show the user the complete step plan.

Gate:

  • Each step of "Verify Environment Readiness" is a hard prerequisite. Do not skip any step. If all are not passed, do not enter Execute:
    1. Did not run yescan --version to confirm installation status → must not proceed.
    2. Version < 1.0.5 and upgrade not completed → must not proceed.
    3. Did not run pip3 index versions yescan to confirm latest version status → must not proceed.
    4. Did not run yescan config get SCAN_WEBSERVICE_KEY to confirm the key is configured → must not proceed.
  • Only execute scenes the user explicitly requests. Do not proactively add extra steps. Auxiliary operations to improve the current task's outcome are exempt from this rule.
  • Document conversion (Word/Excel/PDF) directly processes images and does not rely on OCR results. Both inputs are images; they are independent operations.
  • Scene names and --set parameters must come from the current session's CLI output.
  • If --list-scenes has not been executed, do not enter Execute.
  • If a scene has --set parameters and the user has not specified them, present the optional parameters to the user for confirmation before execution.

Execute — Execute the Scene

yescan --scene <SCENE> --path <FILE> --platform "${AGENT_NAME}" [--output <DIR>] [--set key=value]
yescan --scene <SCENE> --url  <URL>  --platform "${AGENT_NAME}" [--output <DIR>] [--set key=value]

Use --path for local file paths, --url for http/https links.

Replace ${AGENT_NAME} with the current Agent platform name (e.g., openclaw, hermes, qoderWork, wukong, coze, claudecode, etc.). If unsure, use community. Do not guess or invent.

  • Single step: Execute directly.
  • Multi-step processing: Use a step-by-step Execute → Verify loop. The command for step N+1 is constructed only after step N's Verify passes. The --path is taken from data.path in the response of step N.

Gate:

  • For multi-step processing, explain the step plan to the user.
  • Do not construct commands for future steps in advance.
  • --set parameters are not carried over across scenes.

Verify — Verify and Deliver

After each step, check the code field in the response:

  • Success (code is "00000" or 0) → Proceed to delivery.
  • Failure → Do not proceed to the next step. Handle according to the error message (see Gate).

Delivery criteria — a step is considered complete only when the following conditions are met:

  • OCR Recognition: The recognized content has been presented to the user as readable text.
  • Image Translation / Image Enhancement / AIGC: The output file path has been communicated to the user.
  • Document Conversion: The output document path and format have been communicated to the user.

Gate:

  • If the code is not successful → do not proceed to the next step, do not report success.
  • Automatically fix the issue based on the error message (e.g., if the scene name is invalid, re-run --list-scenes) or inform the user of the error reason.
  • If the user has not seen the result → the task is not complete.

Constraints

  • Input Method: Use --path or --url, choose one. Base64 is not supported. If base64 is provided, first write it to a temporary file.
  • URL Quoting: The --url parameter must be enclosed in single quotes to prevent the shell from interpreting special characters like ! or $.
  • File Size: ≤ 5MB.
  • Image Source: Only files or URLs explicitly specified in the user's current request.
  • No Fabrication: Do not fabricate or simulate yescan CLI request parameters or response output. All scene names, parameter values, and execution results must come from actual CLI commands that were run.

Reference Documentation

Related Skills