← Back to Skills Marketplace
cumtyc

Calliper-Compare2Markdown

by cumtyc · GitHub ↗ · v1.2.0 · MIT-0
cross-platform ✓ Security Clean
43
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install calliper-compare2markdown
Description
Compare two local documents and convert differences into LLM-ready Markdown in one synchronous call. Supports PDF, Word, PPT, and image documents accepted by...
README (SKILL.md)

Calliper-Compare2Markdown

Run a JavaScript workflow that submits two local files to the calliper synchronous API through PDRouter (POST /openapi/{serviceCode}/compare/markdown by default) and returns Markdown diff output in one step. This is suitable for document comparison, change extraction, compliance checks, and feeding structured diff content into follow-up scripts.

Installation

npx skills add PaodingAI/skills

Usage

node skills/calliper-saas-markdown/scripts/compare_to_markdown.js \x3Cleft-file-path> \x3Cright-file-path> [output-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 outputs, and when to use it. It is not a manual checklist for the model to imitate step by step.
  • For any task that depends on cross-document differences, you must run this script first and continue from the generated Markdown result.
  • 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 skill when the user wants to compare two documents and get structured differences in Markdown.
  • Use this skill when the user says things like "diff to markdown", "compare and output markdown", "导出差异 markdown", or asks for a machine-readable diff summary.
  • When downstream work depends on differences, such as clause extraction, mismatch validation, or rule checks, use this skill first.
  • When the diff content is only intermediate input, prefer writing to a working file and extract only required segments instead of returning full raw Markdown.
  • When the user explicitly asks for the original markdown diff output, return the full Markdown directly.

Environment Variables

  • PD_ROUTER_API_KEY: Preferred bearer token used by the script.
  • CALLIPER_ACCESS_TOKEN: Optional fallback bearer token when PD_ROUTER_API_KEY is absent.
  • PD_ROUTER_BASE_URL: Optional. Defaults to https://platform.paodingai.com/.
  • PD_ROUTER_SERVICE_CODE: Optional. Defaults to calliper.
  • PD_ROUTER_COMPARE_ENDPOINT: Optional. Defaults to /compare/markdown. Use only when routing endpoint differs.
  • CALLIPER_COMPARE_CONFIG: Optional. JSON string forwarded as config form field. Default is {}.

Script Behavior

  1. Read bearer token from PD_ROUTER_API_KEY; fallback to CALLIPER_ACCESS_TOKEN; fail if both are missing.
  2. Validate both local input files exist.
  3. Send one multipart request with file1, file2, and optional config to POST /openapi/{serviceCode}{compareEndpoint} using Authorization: Bearer \x3Ctoken>.
  4. Parse final response and output:
    • Markdown text directly when response is markdown/plain text.
    • Otherwise, resolve markdown from common JSON fields (data.markdown, markdown) or fallback to JSON text.
  5. If output-markdown-path is provided, also write the same output text to that file while still printing to stdout.
  6. Write progress and errors to stderr and return non-zero exit code on failure.
  7. For field/table extraction tasks, parse and return only required fragments unless user explicitly asks for the full markdown diff.
Usage Guidance
Before installing or using this skill, confirm you trust the Calliper/PDRouter endpoint, use an appropriately scoped API token, and only compare documents that are allowed to be uploaded to that service.
Capability Tags
requires-oauth-tokenrequires-sensitive-credentials
Capability Assessment
Purpose & Capability
The core behavior is coherent with the stated purpose: compare two local documents and produce Markdown. The main user-visible risk is that the full selected files are sent to an external API.
Instruction Scope
The instructions scope execution to document comparison and require the bundled script rather than arbitrary reimplementation; no prompt override, deception, or unrelated autonomous behavior is evident.
Install Mechanism
There is no automatic install spec in the artifact set, but SKILL.md documents an unpinned npx-based install command from a remote source; users should verify the source before using that command.
Credentials
The script uses provider credentials from environment variables and sends requests to a configurable base URL. This is expected for the provider API, but users should confirm the URL and token scope.
Persistence & Privilege
No background persistence, privilege escalation, deletion, or ongoing agent behavior is shown. The only local write is an optional user-supplied Markdown output path.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install calliper-compare2markdown
  3. After installation, invoke the skill by name or use /calliper-compare2markdown
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.2.0
- Initial release of Calliper-Compare2Markdown skill. - Supports comparing two local documents (PDF, Word, PPT, images) and outputs structured Markdown diffs. - Integrates with Calliper via synchronous API for single-step comparison. - Markdown output is suitable for review, clause comparison, and further extraction or rule checks downstream. - Offers flexible environment variable setup for authentication and API configuration. - Ensures robust error handling, progress reporting, and optional output file creation.
Metadata
Slug calliper-compare2markdown
Version 1.2.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Calliper-Compare2Markdown?

Compare two local documents and convert differences into LLM-ready Markdown in one synchronous call. Supports PDF, Word, PPT, and image documents accepted by... It is an AI Agent Skill for Claude Code / OpenClaw, with 43 downloads so far.

How do I install Calliper-Compare2Markdown?

Run "/install calliper-compare2markdown" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Calliper-Compare2Markdown free?

Yes, Calliper-Compare2Markdown is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Calliper-Compare2Markdown support?

Calliper-Compare2Markdown is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Calliper-Compare2Markdown?

It is built and maintained by cumtyc (@cumtyc); the current version is v1.2.0.

💬 Comments