LaunchKit · 2026
Back to Skills

markdown-fetch

Optimizes web fetching by using Cloudflare's Markdown for Agents, reducing token consumption by ~80%.

1
1.6k downloads
by @howtimeschange

Setup & Installation

openclaw skills install @howtimeschange/markdown-fetch

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install markdown-fetch

What This Skill Does

Wraps web fetch calls to request Cloudflare's Markdown for Agents format, returning markdown instead of HTML when the server supports it. Tracks token savings via the x-markdown-tokens response header. Falls back to HTML for sites that don't support the format.

Reduces token consumption by ~80% on supported sites compared to fetching raw HTML, which directly lowers API costs and fits more content into context windows.

When to use it

  • Fetching documentation pages with reduced token overhead
  • Scraping Cloudflare-hosted sites in agent pipelines
  • Replacing axios/fetch calls project-wide with a drop-in optimized version
  • Logging token savings across multiple web requests
  • Reading web content in LLM context windows more efficiently

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: fetch the content of https://example.com and summarize it

AGENT
  1. 1Call optimizedFetch with the target URL
  2. 2Set Accept header to 'text/markdown, text/html'
  3. 3Check response Content-Type to determine format
  4. 4If text/markdown, use result.markdown directly; otherwise fall back to result.html
  5. 5Log token savings from x-markdown-tokens header if present
OUTPUT

Markdown content of the page with tokensSaved value reported