Calliper Compare to Markdown Generator
Paste the following prompt into your AI chat to install this skill:
Please install @user_15292d5a/yjkj-calliper-compare2markdown using https://skillhub.cn/install/skillhub.md.
About this skill
Problem
When two versions of a contract, spec, config, or text file differ, manual review often misses subtle clause wording, field values, table cells, and compliance changes. calliper-compare2markdown turns the “submit two local files and get a readable diff” step into one fixed script: it calls the synchronous calliper API through PDRouter, by default POST /openapi/{serviceCode}/compare/markdown, and prints Markdown diff output to stdout. For engineers, the value is a stable intermediate artifact that can be parsed downstream.
How It Works
- Fixed entry point: use
scripts/compare_to_markdown.jsdirectly; do not reimplement the API flow or bypass the script during normal tasks. - Auth and environment: prefer
PAODINGAI_API_KEY, fall back toCALLIPER_ACCESS_TOKEN; fail if both are missing. Optional variables includePD_ROUTER_BASE_URL,PD_ROUTER_SERVICE_CODE, andPD_ROUTER_COMPARE_ENDPOINT. - Request shape: after validating that both local input files exist, the script sends one
multipartrequest withfile1,file2, and optionalconfig, plus anAuthorization: Bearerheader. - Output parsing: if the response is Markdown or plain text, output it directly; otherwise try common JSON fields such as
data.markdownandmarkdown, then fall back to the JSON text. - File output: with
output-markdown-path, the script writes the same content to that file while also printing to stdout. Progress and errors go to stderr, and failures return a non-zero exit code.
Boundaries
Use it for “export diff to Markdown,” generating parseable change summaries, clause extraction, mismatch validation, and rule checks. If the Markdown is only intermediate input, write it to a working file first and extract only needed fragments; return full Markdown only when the user explicitly asks for the original complete diff. If routing, service code, or endpoint differs from defaults, adjust environment variables rather than changing script logic.
Use Cases
- Compare two contract drafts, extract clause differences, and export Markdown for review.
- Check spec version changes and generate a structured diff summary for change review.
- Write config or rule-file differences to a working file, then parse needed fields.
- Before compliance checks, convert differences from two files into machine-readable Markdown.
Best For
- Legal operations reviewing contract clauses: quickly export two-version differences to Markdown.
- Documentation engineers maintaining specs: extract version changes for review workflows.
- Automation engineers building parsers: obtain stable Markdown diff intermediates.
- Compliance engineers validating files: convert differences into checkable structured text.
Related Skills
Batch-import team weekly reports, aggregate progress, plans, issues, and support by project, flag delivery or resource risks, and generate structured department reports.
Generates Kingdee Cloud ERP startup, implementation, and acceptance documents from Word templates with delivery guidance.
Read PDF, Word, Excel, PowerPoint, HTML, and text documents, list archive files, and extract text or JSON for AI analysis.
Extract decisions and action items from meeting notes, emails, or chat logs, then track owners, deadlines, and follow-ups with lightweight reminders and no direct tool integrations.