Markdown to HTML round-trip

Markdown to HTML and back - a round-trip conversion that proves fidelity and gives you both formats from one input.

$0.003 per call · one payment for the whole workflow
POST /api/skill/markdown-convert
Sample output + API docs →

3 tools run server-side in one request. You pay once, settle once, and get a single response - no orchestration, no per-step payments, and a partial-success envelope if any step fails. USDC over x402 on any supported chain.

When to use this pack

An agent has markdown content and needs HTML output (for email, CMS, or rendering), plus wants to verify the round-trip fidelity by converting back. Useful for content pipelines and format migration.

Tools in this pack

All 3 run inside the single $0.003 call above. Each is also callable on its own if you only need one part.

Bought one at a time, these 3 tools cost $0.003 together; the pack is that sum less a 10% bundle discount, rounded up to the $0.001 settlement floor, which is $0.003.

Workflow

  1. Convert markdown to HTML with markdown-to-html - produces clean semantic HTML.
  2. Convert the HTML back to markdown with html-to-markdown - verifies round-trip fidelity. Differences indicate formatting that doesn't survive the conversion.
  3. Diff the original markdown against the round-tripped markdown with text-diff - the diff IS the fidelity report: an empty diff means lossless, and every hunk is exactly the formatting that didn't survive the HTML round-trip.

Arguments

NameRequiredDescriptionExample
markdownyesMarkdown text to convert# Hello\n\nThis is **bold** and _italic_.

What one call returns

A JSON object with pack, args, steps, summary; steps holds one entry per tool (markdown-to-html, html-to-markdown, text-diff), each with its own result or error. Full example on the API page.

Call it directly

Any x402 client pays the 402 and gets the whole workflow back in one response. With the agent402-client SDK (npm i agent402-client, an ES module):

import { Agent402 } from "agent402-client";
// payFetch: an x402-wrapped fetch your wallet signs (@x402/fetch).
// Tools on the free tier need no options: new Agent402() pays them by proof-of-work.
// an existing prepaid credits key also works: new Agent402({ creditsKey })
const client = new Agent402({ fetch: payFetch });
const result = await client.call("skill-markdown-convert", {"markdown":"# Hello\\n\\nThis is **bold** and _italic_."});

Run it in Claude

claude mcp add agent402 -s user -- npx -y agent402-mcp@latest

Then paste this prompt into Claude:

Round-trip markdown using Agent402: (1) markdown-to-html {markdown:"# Hello\n\nThis is **bold** and _italic_."} - get HTML. (2) html-to-markdown on the result - verify round-trip. (3) text-diff {a:<original>, b:<round-tripped>} - quantify what changed. Return {html, roundTripped, diff}.

← All skill packs