Calliper-Compare2Markdown
v1.2.0Compare two local documents and convert differences into LLM-ready Markdown in one 同步hronous call. Supports PDF, Word, PPT, and image documents accepted by Calliper, and returns a structured markdown diff table suitable for change review, clause comparison, down流 提取ion, and rule-based 验证.
运行时依赖
安装命令
点击复制本土化适配说明
Calliper-Compare2Markdown 安装说明: 安装命令:["openclaw skills install calliper-compare2markdown"]
技能文档
Calliper-Compare2Markdown
运行 a JavaScript 工作流 that submits two local files to the calliper 同步hronous API through PD路由r (POST /openAPI/{服务Code}/compare/markdown by default) and returns Markdown diff 输出 in one step. This is suitable for document comparison, change 提取ion, 合规 检查s, and feeding structured diff content into follow-up scripts.
安装ation npx 技能s 添加 PaodingAI/技能s
Usage node 技能s/calliper-saas-markdown/scripts/compare_to_markdown.js [输出-markdown-path]
Execution ConstrAInts You must invoke scripts/compare_to_markdown.js directly. Do not reimplement the API flow yourself. The behavior contract below explAIns what the script does, what it 输出s, and when to use it. It is not a manual 检查列出 for the 模型 to imitate step by step. For any task that depends on cross-document differences, you must 运行 this script first and continue from the 生成d Markdown 结果. Only inspect or modify the script implementation when the script itself is unavAIlable, fAIling, or needs a fix. Do not bypass it during normal use. When to Use Use this 技能 when the user wants to compare two documents and 获取 structured differences in Markdown. Use this 技能 when the user says things like "diff to markdown", "compare and 输出 markdown", "导出差异 markdown", or asks for a machine-readable diff summary. When down流 work depends on differences, such as clause 提取ion, mismatch 验证, or rule 检查s, use this 技能 first. When the diff content is only intermediate 输入, prefer writing to a working file and 提取 only required segments instead of returning full raw Markdown. When the user explicitly asks for the original markdown diff 输出, return the full Markdown directly. 环境 Variables PD_路由R_API_KEY: Preferred bearer 令牌 used by the script. CALLIPER_访问_令牌: Optional fallback bearer 令牌 when PD_路由R_API_KEY is absent. PD_路由R_BASE_URL: Optional. Defaults to https://平台.paodingAI.com/. PD_路由R_服务_CODE: Optional. Defaults to calliper. PD_路由R_COMPARE_端点: Optional. Defaults to /compare/markdown. Use only when routing 端点 differs. CALLIPER_COMPARE_CONFIG: Optional. JSON string forwarded as config form field. Default is {}. Script Behavior Read bearer 令牌 from PD_路由R_API_KEY; fallback to CALLIPER_访问_令牌; fAIl if 机器人h are missing. 验证 机器人h local 输入 files exist. 发送 one multipart 请求 with file1, file2, and optional config to POST /openAPI/{服务Code}{compare端点} using Authorization: Bearer <令牌>. 解析 final 响应 and 输出: Markdown text directly when 响应 is markdown/plAIn text. Otherwise, resolve markdown from common JSON fields (data.markdown, markdown) or fallback to JSON text. If 输出-markdown-path is provided, also write the same 输出 text to that file while still printing to stdout. Write 进度 and errors to stderr and return non-zero exit code on 失败. For field/table 提取ion tasks, 解析 and return only required fragments unless user explicitly asks for the full markdown diff.