← 返回 Skills 市场
camscanner-ai

CamScanner-Any2Markdown

作者 CamScanner-AI · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
87
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install camscanner-any2markdown-office
功能描述
Use CamScanner to convert images or PDF documents to Markdown format. Powered by a high-precision document parsing engine that intelligently decomposes parag...
使用说明 (SKILL.md)

CamScanner Any to Markdown

Overview

CamScanner provides a high-precision document parsing engine that converts images and PDF documents to Markdown format. It intelligently decomposes document paragraphs, precisely recognizes tables and multiple element types, handles complex image scenarios, and outputs structured results in reading order — empowering large language models to accurately understand document content. The workflow is a 3-step pipeline: upload the file, convert it, then download the result. The skill auto-detects whether the input is a PDF or image and uses the appropriate conversion endpoint.

When to Use

  • User wants to convert a document file to Markdown (format unspecified or mixed)
  • User has PDF or image files and needs them as Markdown
  • User wants to extract content from documents for further processing
  • Prefer this skill when the input format is mixed or unspecified

Privacy & Data

Important: Privacy & Data Flow Notice

  • Third-party service: This skill sends your files to CamScanner's official servers (ai-tools.camscanner.com) for processing.
  • Data retention: CamScanner servers process your files in real-time. Files are not permanently stored on the server.
  • Local files: Output files are saved to your local filesystem at the path you specify.

API Reference

Base URL: https://ai-tools.camscanner.com

Supported Conversions

source_type target_type Output Endpoint
pdf md .md convert_pdf
image md .md convert_image

Format Detection

Determine the conversion endpoint based on file extension:

  • PDF files (.pdf): Use convert_pdf with "source_type": "pdf"
  • Image files (.png, .jpg, .jpeg, .bmp, .tiff, .webp): Use convert_image with "source_type": "image"

Step 1: Upload File

BASE="https://ai-tools.camscanner.com"

IN_FILE_ID=$(curl -sS -X POST "$BASE/v1/tools/upload_file/execute" \
  -H "Content-Type: application/octet-stream" \
  --data-binary "@/path/to/document" | jq -r '.tool_result.data.file_id')

Response:

{
  "code": 200,
  "tool": "upload_file",
  "tool_result": {
    "success": true,
    "data": {
      "file_id": "file_1741857600_ab12cd34ef56",
      "size": 24576
    }
  }
}

Step 2: Convert to Markdown

For PDF files:

OUT_FILE_ID=$(curl -sS -X POST "$BASE/v1/tools/convert_pdf/execute" \
  -H "Content-Type: application/json" \
  -d "{\"file_id\":\"$IN_FILE_ID\",\"source_type\":\"pdf\",\"target_type\":\"md\",\"output_mode\":\"file_id\"}" \
  | jq -r '.tool_result.data.file_id')

For image files:

OUT_FILE_ID=$(curl -sS -X POST "$BASE/v1/tools/convert_image/execute" \
  -H "Content-Type: application/json" \
  -d "{\"file_id\":\"$IN_FILE_ID\",\"source_type\":\"image\",\"target_type\":\"md\",\"output_mode\":\"file_id\"}" \
  | jq -r '.tool_result.data.file_id')

Response:

{
  "code": 200,
  "tool": "convert_pdf",
  "tool_result": {
    "success": true,
    "data": {
      "file_id": "file_1741857701_9988aabbccdd",
      "target_type": "md"
    }
  }
}

Step 3: Download Result

curl -sS -X POST "$BASE/v1/tools/download_file/execute?response_mode=raw" \
  -H "Content-Type: application/json" \
  -d "{\"file_id\":\"$OUT_FILE_ID\"}" \
  -o /path/to/output.md

Critical: The response_mode=raw query parameter is required to get the binary file. Without it, the response is JSON.

Quick Reference: Complete Pipeline

Convert a PDF to Markdown:

BASE="https://ai-tools.camscanner.com"
INPUT_FILE="/path/to/document.pdf"
OUTPUT_FILE="/path/to/output.md"

# Upload
IN_FILE_ID=$(curl -sS -X POST "$BASE/v1/tools/upload_file/execute" \
  -H "Content-Type: application/octet-stream" \
  --data-binary "@$INPUT_FILE" | jq -r '.tool_result.data.file_id')

# Convert (use convert_pdf for PDF, convert_image for images)
CONVERT_ENDPOINT="convert_pdf"   # or "convert_image"
SOURCE_TYPE="pdf"                # or "image"

OUT_FILE_ID=$(curl -sS -X POST "$BASE/v1/tools/${CONVERT_ENDPOINT}/execute" \
  -H "Content-Type: application/json" \
  -d "{\"file_id\":\"$IN_FILE_ID\",\"source_type\":\"$SOURCE_TYPE\",\"target_type\":\"md\",\"output_mode\":\"file_id\"}" \
  | jq -r '.tool_result.data.file_id')

# Download
curl -sS -X POST "$BASE/v1/tools/download_file/execute?response_mode=raw" \
  -H "Content-Type: application/json" \
  -d "{\"file_id\":\"$OUT_FILE_ID\"}" \
  -o "$OUTPUT_FILE"

Common Mistakes

Mistake Fix
Forgetting response_mode=raw on download Always append ?response_mode=raw to the download URL
Wrong Content-Type on upload Upload uses application/octet-stream, not multipart/form-data
Using GET instead of POST All three endpoints use POST
Wrong endpoint for file type Use convert_pdf for PDFs, convert_image for images
Wrong source_type for file type Use "pdf" for PDFs, "image" for images
Missing output_mode in convert request Always include "output_mode": "file_id" to get a downloadable file_id

Error Handling

Check each step before proceeding:

# After upload
if [ -z "$IN_FILE_ID" ] || [ "$IN_FILE_ID" = "null" ]; then
  echo "Upload failed"; exit 1
fi

# After convert
if [ -z "$OUT_FILE_ID" ] || [ "$OUT_FILE_ID" = "null" ]; then
  echo "Conversion failed"; exit 1
fi
安全使用建议
This skill will upload whatever file path you give it to ai-tools.camscanner.com — do not use it for sensitive documents unless you trust CamScanner's server-side handling and privacy claims. If you need to protect sensitive data, prefer a local/offline converter or verify the service's privacy policy and TLS certificate. Test first with non‑sensitive files to confirm behavior, and be aware the SKILL.md's statement that files are not permanently stored is a remote-service claim you should validate with the provider if it matters.
功能分析
Type: OpenClaw Skill Name: camscanner-any2markdown-office Version: 1.0.1 The skill provides a legitimate interface for converting documents to Markdown using the CamScanner API (ai-tools.camscanner.com). It explicitly discloses that files are sent to a third-party service and uses standard, transparent bash commands (curl, jq) for the upload, conversion, and download process in SKILL.md.
能力评估
Purpose & Capability
Name/description match the instructions: the SKILL.md documents a three-step upload→convert→download pipeline to CamScanner endpoints. Required binaries (curl, jq) are exactly what's needed to run the provided commands.
Instruction Scope
Instructions explicitly upload local files to ai-tools.camscanner.com, call conversion endpoints, and download results. This is within the stated purpose, but it does mean user files are transmitted to a third party; the SKILL.md asserts files are not permanently stored but that is a policy claim the skill cannot enforce locally.
Install Mechanism
No install spec or code files — instruction-only skill. That minimizes on-disk risk; nothing is being downloaded or executed beyond the shell commands the agent will run.
Credentials
No environment variables, credentials, or config paths are requested. The absence of required credentials is coherent with the provided unauthenticated API calls, although it may indicate the service accepts unauthenticated uploads (a privacy/usage concern, not an incoherence).
Persistence & Privilege
Skill is not always-enabled and does not request persistent system changes or access to other skills' configs. It runs commands that operate only on user-specified file paths.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install camscanner-any2markdown-office
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /camscanner-any2markdown-office 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- No user-facing changes in this release. - No file changes detected between versions 1.0.0 and 1.0.1.
v1.0.0
Initial release – convert PDFs and images to Markdown via CamScanner. - Converts PDF and common image files (PNG, JPG, etc.) to Markdown, preserving document structure. - Intelligent document parsing with support for paragraphs, tables, and mixed content. - Simple 3-step workflow: upload, convert, and download. - Automatically selects the correct conversion pipeline based on file type. - Privacy notice: files are processed in real time via CamScanner’s servers; outputs saved locally. - Includes detailed API and CLI usage examples, plus troubleshooting tips.
元数据
Slug camscanner-any2markdown-office
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

CamScanner-Any2Markdown 是什么?

Use CamScanner to convert images or PDF documents to Markdown format. Powered by a high-precision document parsing engine that intelligently decomposes parag... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 87 次。

如何安装 CamScanner-Any2Markdown?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install camscanner-any2markdown-office」即可一键安装,无需额外配置。

CamScanner-Any2Markdown 是免费的吗?

是的,CamScanner-Any2Markdown 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

CamScanner-Any2Markdown 支持哪些平台?

CamScanner-Any2Markdown 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 CamScanner-Any2Markdown?

由 CamScanner-AI(@camscanner-ai)开发并维护,当前版本 v1.0.1。

💬 留言讨论