pi-fetch-markdown

内容来源:SKILL.md(标准 Skill 格式) · 原始地址 · 查看安装指南

原始内容


name: fetch-markdown description: "Fetch any web page as clean markdown. Uses Cloudflare Markdown for Agents content negotiation for supported sites, with automatic fallback to Jina Reader for all other sites. Use when you need to read, summarize, or analyze web page content."

Fetch Markdown

Fetch any URL as clean, token-efficient markdown instead of raw HTML.

How It Works

  1. Content Negotiation (preferred): Sends Accept: text/markdown header. Sites using Cloudflare's Markdown for Agents return markdown directly — ~80% fewer tokens than HTML.
  2. Jina Reader (fallback): For sites that don't support markdown negotiation, routes through r.jina.ai which renders the page and extracts clean markdown.

Usage

# Basic: fetch a URL as markdown
bash ./fetch-markdown.sh "https://example.com/page"

# With metadata (shows method used, token count, content signals)
bash ./fetch-markdown.sh "https://example.com/page" --info

Examples

# Cloudflare blog (uses content negotiation directly)
bash ./fetch-markdown.sh "https://blog.cloudflare.com/markdown-for-agents/"

# Medium article (falls back to Jina Reader)
bash ./fetch-markdown.sh "https://medium.com/@user/article-slug"

# Any documentation site
bash ./fetch-markdown.sh "https://developers.cloudflare.com/workers/"

When to Use

  • Reading blog posts, articles, or documentation
  • Summarizing web content
  • Extracting structured information from web pages
  • Any task requiring web page content in a token-efficient format