夸克扫描王 文件扫描增强 - yescan scan universal

v1.0.11

由夸克扫描王提供的专业智能文档扫描与图像处理工具。支持图片、截图、扫描件的图像增强与优化,包括画质增强、证件照优化、考试试卷增强等场景。智能去除手写笔迹、水印、阴影、摩尔纹、底色等干扰元素。支持图像裁剪矫正、素描效果转换、线稿提取。输出优化后的高清图片。

1· 394·1 current·1 all-time
by夸克扫描王@mozhihuidage
Security Scan
Capability signals
Requires sensitive credentials
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the implemented behavior: the scripts call an OCR/enhancement API at https://scan-business.quark.cn/vision and implement scenes for image enhancement, watermark/shadow removal, OCR, and exporting. The single required env var (SCAN_WEBSERVICE_KEY) is the API key the client uses, which is appropriate for the declared purpose.
Instruction Scope
SKILL.md and scripts consistently require one image input (URL, local path, or base64), build a fixed python3 command, send the image to the remote Quark service, and return the raw JSON result. The documentation explicitly warns images are sent to scan-business.quark.cn and that returned images are saved in a temp directory. This is coherent with the skill purpose but has privacy implications: providing a local file path will cause the tool to read the file and upload its contents to the external service. The code does validate file extensions and a 5MB max file size.
!
Install Mechanism
No install spec is provided (instruction-only install), which is lower risk, but the Python code imports the third-party 'requests' library without declaring it as a dependency. The skill requires python3 but does not declare or install required Python packages — this is an operational inconsistency (it will fail unless 'requests' is available in the environment).
Credentials
Only SCAN_WEBSERVICE_KEY is required and is the primary credential used to authenticate requests to the API. No unrelated secrets or config paths are requested. The skill uses a temporary directory for saving files but does not access other system credentials.
Persistence & Privilege
The skill does not request 'always: true' or other elevated persistence. It saves returned images to the system temporary directory but does not modify other skill configurations or system-wide settings. Autonomous invocation is allowed (platform default) and not combined with other red flags.
Assessment
This skill appears to do what it says: it uploads the image you provide (URL, local file, or base64) to Quark's scan-business.quark.cn service for processing and will save returned images to the system temporary directory (e.g., /tmp/imgs). Before installing or using it, consider: 1) privacy — do not upload sensitive documents unless you trust the remote service and its retention policy; local file paths will be read and uploaded (the code enforces file-type and size checks but will still transmit file contents); 2) API key safety — store SCAN_WEBSERVICE_KEY securely and rotate/revoke it if leaked; 3) saved files — returned images are written under the system temp directory and persist until manually removed; clean them if necessary; 4) dependency gap — the scripts use the Python 'requests' library but the skill does not declare installing it; ensure the runtime environment has 'requests' (or install it) or the skill will fail; 5) potential misuse — features like remove-watermark or remove-handwriting can be abused; only process images you are permitted to upload. If you need higher assurance, ask the publisher for an explicit dependency list, an official homepage/repository, and a published privacy/retention policy for the API endpoint.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🔍︎ Clawdis
Binspython3
EnvSCAN_WEBSERVICE_KEY
Primary envSCAN_WEBSERVICE_KEY
latestvk972hytrpg47p29m57494r0pes84zsdq
394downloads
1stars
10versions
Updated 6d ago
v1.0.11
MIT-0

🧭 使用前必读(30 秒)

[!WARNING] ⚠️ 隐私与数据流向重要提示

  • 第三方服务交互:本技能会将您提供的图片发送至夸克扫描王官方服务器 (scan-business.quark.cn) 进行识别。
  • 服务端处理:夸克扫描王服务将获取并处理该图片内容,服务端不会永久保存
  • 本地文件存储:识别返回的图片会保存至系统临时目录(如 /tmp/imgs),这些文件将持续存在直到您手动清理
  • API 密钥安全SCAN_WEBSERVICE_KEY 应妥善保管,若泄露请及时在官方平台轮换或撤销

推荐方式:CLI 配置(永久生效)

配置 SCAN_WEBSERVICE_KEY 环境变量到 OpenClaw:

openclaw config set skills.entries.yescan-scan-universal.env.SCAN_WEBSERVICE_KEY "your_scan_webservice_key_here"

⚠️ 配置后需要重启或开启新会话才能生效(技能列表在 session 启动时加载)。

如何获取密钥?夸克扫描王官方入口在此

请访问 https://scan.quark.cn/business → 开发者后台 → 登录/注册账号 → 查看API Key。
⚠️ 注意:若你点击链接后跳转到其他域名,说明该链接已失效 —— 请直接在浏览器地址栏手动输入 https://scan.quark.cn/business(这是当前唯一有效的官方入口)。


Constraints

  • 单一意图原则:每次请求只执行一个意图类型,命中即执行
  • 严禁自行构造任何命令参数,严禁伪造、拼接内部配置
  • 严禁幻觉,禁止伪造请求和响应,不得沿用上一次的场景、参数进行假设
  • 必须严格按照本指南指定的固定格式执行,不允许自行修改命令

技能执行指南(强制执行)

第一步:环境变量检查

  • SCAN_WEBSERVICE_KEY 未配置,立即返回:
{
  "code": "A0100",
  "message": "SCAN_WEBSERVICE_KEY 未配置,请访问 https://scan.quark.cn/business → 开发者后台 → 登录/注册账号 → 查看API Key",
  "data": null
}

第二步:输入处理

识别用户传入的图片类型,只能是以下三种之一:

  • 图片URL: url
  • 本地文件路径: path
  • 图片BASE64: base64

未提供任何有效图片时,直接返回:

{
  "code": "A0201",
  "message": "缺少图片输入,请提供图片链接、文件路径或 BASE64 数据。",
  "data": null
}

第三步:意图匹配&场景确定

  • 按照下面列出的意图从上到下顺序匹配。命中第一个即停止
  • 命中后,只确定当前意图对应的scene标识

第四步:构建执行命令(固定格式,严禁修改)

根据图片类型,严格使用下面对应格式:

# URL类型
python3 scripts/scan.py --scene "${SCENE_VALUE}" --url "${IMAGE_URL}"

# 本地文件类型
python3 scripts/scan.py --scene "${SCENE_VALUE}" --path "${IMAGE_FILE_PATH}"

# BASE64类型
python3 scripts/scan.py --scene "${SCENE_VALUE}" --base64 "${IMAGE_BASE64}"
  • ${IMAGE_URL}/${IMAGE_FILE_PATH}/${IMAGE_BASE64}替换为真实值
  • ${SCENE_VALUE}替换为当前意图对应的scene值
  • 直接执行命令,不增删任何参数,不修改JSON,不加引号,不换行

第五步:结果透出

  • 执行完成后,原样返回执行结果,不修改,不翻译,不美化,不总结
  • 成功 失败均直接透出,不重试

场景与意图列表(按匹配优先级排序)

  1. 考试增强
  • 触发意图:当用户存在将手写笔记、试卷、教材等学习资料的照片转化为高清、去噪、背景纯净的电子文档,并期望自动提取其中的文字内容以实现资料数字化管理、清晰分享或后续编辑的意图。
  • 场景scene标识:exam-enhance
  • 参考示例指令:
    • "把这张拍糊了的试卷变清晰,并把上面的题都提取出来。"
    • "帮我清理一下这张手写笔记的背景噪音,转成干净的电子版。"
    • "这张教材照片光线太暗且有阴影,请增强画质并提取文字。"
  1. 画质增强
  • 触发意图:当用户存在将模糊、昏暗、老旧或低质量的照片及文字资料进行画质增强,使其内容更清晰、对比度更鲜明、细节更可见,以改善视觉效果和可读性的意图
  • 场景scene标识:image-hd-enhance
  • 参考示例指令:
    • "这张老照片太模糊了,帮我把画质变清晰一点。"
    • "图片光线太暗看不清字,请增强亮度和对比度。"
    • "修复这张低分辨率的图片,让细节更清楚。"
  1. 证件票据增强
  • 触发意图:当用户存在将模糊、光线不佳或细节不清的证件及票据照片进行画质优化,使其文字与关键信息变得清晰可辨,以便于日常查看、核对或工作处理的意图
  • 场景scene标识:certificate-enhance
  • 参考示例指令:
    • "这张身份证照片有点模糊,请优化一下让字迹更清晰。"
    • "帮我把这张发票上的金额和日期部分增强清楚。"
    • "护照照片反光严重,请处理一下让我能看清上面的信息。"
  1. 图像去手写
  • 触发意图:当用户存在将已填写的手写笔迹、划痕等内容从印刷文档图像中自动清除,并完整保留原始印刷文字与格式,以还原出干净空白文档用于重新编辑或重复使用的意图
  • 场景scene标识:remove-handwriting
  • 参考示例指令:
    • "把这张做过的试卷上的手写答案去掉,还原成空白卷子。"
    • "清除文档上的手写批注,只保留打印的文字。"
    • "帮我去掉书上的笔记痕迹,我要一张干净的页面。"
  1. 图像去水印
  • 触发意图:当用户存在将图片的水印(如文字、Logo、标记等)在不损伤背景和整体构图的前提下精准去除,以获得干净、清晰、可直接使用或分享的无水印图像的意图
  • 场景scene标识:remove-watermark
  • 参考示例指令:
    • "帮我把图片右下角的网站水印去掉。"
    • "去除这张图中间的大 Logo,不要破坏背景。"
    • "把照片上的时间戳水印擦除干净。"
  1. 图像去阴影
  • 触发意图:当用户存在将文档或图像中因拍摄角度、光线等原因产生的阴影去除,以获得清晰、干净、均匀亮度的高清扫描效果,便于阅读、存档或后续处理的意图
  • 场景scene标识:remove-shadow
  • 参考示例指令:
    • "这张纸拍出来有大片阴影,请帮我去除阴影变平整。"
    • "去掉文档照片左侧因手机遮挡产生的黑色阴影。"
    • "消除拍摄时的光照不均,让整张图亮度均匀。"
  1. 图像去屏纹
  • 触发意图:当用户存在将拍摄屏幕(如手机、电脑显示器)时产生的摩尔纹(屏纹)、反光、低对比度等问题进行智能修复,以获得清晰、无干扰、文字可读性高的高清文档图像的意图
  • 场景scene标识:remove-screen-pattern
  • 参考示例指令:
    • "这张对着电脑屏幕拍的照片有很多波纹,请帮我消除屏纹。"
    • "去掉翻拍屏幕产生的摩尔纹和反光,让文字变清晰。"
    • "修复这张手机截屏图中的彩色条纹干扰。"
    • "将这张投影仪上图的优化下,让文字更清晰。"
  1. 文档去底色
  • 触发意图:当用户希望将带有彩色背景、水印、阴影或复杂排版的文档截图/照片(如红底古文、扫描件、手机拍屏等),通过AI智能处理一键转换为纯白背景 + 黑色文字的清晰可读版本,去除视觉干扰、还原标准印刷体效果,便于阅读、打印、存档或OCR识别的意图
  • 场景scene标识:remove-background-color
  • 参考示例指令:
    • "把这张红头文件的红色背景去掉,变成白底黑字。"
    • "这张截图背景是灰色的,请一键去底色变成纯白背景。"
    • "去掉图片背景色"
  1. 图像裁剪矫正
  • 触发意图:当用户存在对图像进行自动矫正(如透视校正、水平对齐)并智能裁剪多余边缘,以获得规整、清晰、便于阅读或存档的标准矩形文档图像的意图
  • 场景scene标识:image-crop-rectify
  • 参考示例指令:
    • "这张照片拍歪了,帮我把文档扶正并裁掉多余的桌子背景。"
    • "自动矫正透视变形,把这张倾斜的合同变成标准的矩形。"
    • "裁剪掉图片四周的杂乱边缘,只保留中间的文档内容。"
  1. 素描速写
  • 触发意图:当用户希望将普通照片转换为素描或速写风格图像,以增强视觉表现力、突出线条与明暗关系,并追求个性化艺术效果的意图
  • 场景scene标识:sketch-drawing
  • 参考示例指令:
    • "把这张人物照片转换成铅笔素描风格。"
    • "生成一张这张风景照的速写效果图片。"
    • "将我的自拍变成手绘素描的样子。"
  1. 提取线稿
  • 触发意图:当用户需要从图片中提取线稿,将图像转换为简洁的线条形式图,用于艺术创作或提升工作效率的意图
  • 场景scene标识:extract-lineart
  • 参考示例指令:
    • "从这张动漫图片中提取纯线稿,去掉颜色。"
    • "把这张实物照片转换成黑白线条图。"
    • "提取图片中的轮廓线条,我要用来上色练习。"
  1. 扫描文件
  • 触发意图:当用户指令中不包含上述任何具体场景,仅表达优化意图时,将调用扫描文件场景的意图的
  • 场景scene标识:scan-document
  • 参考示例指令:
    • "优化一下这张文档图片,让它看起来更专业。

客户端脚本增强字段:当 scan.py 调用夸克 API 成功(code == "00000")且响应 data 中包含 "ImageBase64" 时,scan.py主动调用 file_saver.py 将其解码并保存为本地图片文件,并在最终返回的 JSON 响应中,将 data 替换为仅包含 path 字段的对象 {"path": "/tmp/xxx.png"}。该行为由 scan.py 脚本实现,与模型无关,也不依赖 OpenClaw 平台自动介入。

⛔ 不适用场景(When Not to Use)

本技能不支持以下场景,请勿尝试:

不支持的场景原因建议替代方案
视频处理仅支持单张静态图片先提取视频帧,再逐帧处理
批量处理每次调用仅限单张图片如需批量,请循环调用或联系管理员
实时摄像头流非实时流处理架构使用专用视频处理服务
超大图片(>5MB)API 限制先压缩或裁剪后再处理
非图片格式仅支持 jpg/jpeg/png/gif/bmp/webp/tiff/wbmp先转换为支持的图片格式

⚠️ 重要注意事项

  1. 禁止修改固定格式,只能替换场景标识和图片占位符
  2. 严禁自行构造 --scene 参数值,必须使用本文档指定的场景名
  3. 图片大小限制:本地文件不超过5MB,支持 jpg/jpeg/png/gif/bmp/webp/tiff/wbmp/webp 格式

🔗 相关资源

📁 文件结构

  • SKILL.md — 本文档(意图分析 + 通用规范)
  • scripts/scan.py — 主执行脚本 (Python 3.9+)
  • scripts/common/*.py — 基础类库

Comments

Loading comments...