Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fetch URLs Skill

A Claude Code skill for fetching and processing web content. Extract specific sections, discover page structure, and paginate large responses—all with a single skill Claude activates automatically.

What You Get

Full-Page Fetching

Fetch any URL as clean Markdown. The skill simplifies complex HTML, removes noise, and converts to readable Markdown automatically.

Anchor Extraction

Point to a specific section of a page (by URL fragment like #installation) and extract just that section with all sub-headings included.

Page Discovery

Not sure what sections a page has? List all anchors with heading hierarchy so you can find exactly the section you need.

Pagination

For large pages or sections, fetch content in chunks. The skill handles character-based pagination and tells you how to get the next chunk.

Raw HTML Option

When Markdown conversion isn't suitable, get raw HTML instead.

Quick Start: Web Content On Demand

The Problem

You're working with Claude and need to fetch and read a web page. You could:

  • Copy-paste the whole page (noisy, loses structure)
  • Read it yourself first (slower, defeats the point of working with Claude)
  • Give Claude just the URL (it can't access the web directly)

The Solution: Automatic Fetching

With fetch-urls-skill, Claude fetches and processes the URL for you:

User: "Read the installation section from https://example.com/docs#installation"

Claude (using fetch-urls-skill):
→ Fetches the page
→ Finds the "installation" section
→ Extracts it with all subsections
→ Returns clean Markdown

User gets: Just the installation guide, formatted and ready to read

How It Works

The skill activates automatically when you ask Claude to:

  • "Read this URL"
  • "Fetch the section about X from this page"
  • "What sections does this page have?"
  • "Get the installation guide from the documentation"

Claude chooses the right mode (full page, specific anchor, discovery, pagination) based on what you ask for.

Usage Scenarios

Scenario 1: Read Documentation Quickly

You're setting up a tool and need to find a specific section of the documentation, but don't want to navigate the site yourself.

me: "Fetch the API authentication section from https://api.example.com/docs#auth"

Claude:
→ Fetches the page
→ Finds the #auth anchor
→ Returns just that section
→ You get: Clean Markdown with the auth guide

Scenario 2: Discover What's Available

You want to know what sections a page has before asking Claude to fetch a specific part.

me: "What sections does https://example.com/guide have?"

Claude:
→ Fetches the page
→ Lists all anchors with hierarchy (h1, h2, h3, etc.)
→ You see: # Getting Started, ## Installation, ## Configuration, ### Basic, ### Advanced, etc.
→ You can now ask for the exact section you want

Scenario 3: Handle Large Pages

You're reading extensive documentation and the page is too long to fetch all at once.

me: "Read the first 5000 characters of https://docs.example.com/api"

Claude:
→ Fetches 5000 characters
→ Returns content + "next chunk starts at character 5000"
→ You ask for the next chunk when ready

Scenario 4: Get Raw HTML

Most of the time Markdown conversion is great, but sometimes you need the original HTML structure.

me: "Fetch https://example.com/special#section as raw HTML"

Claude:
→ Fetches and returns raw HTML
→ You can parse or process it yourself

Scenario 5: Process Non-HTML Content

The skill handles JSON, plain text, and other formats too—returns them as-is.

me: "Fetch https://api.example.com/data.json"

Claude:
→ Fetches the JSON
→ Returns it directly
→ You can ask Claude to parse or analyze it

Installation

From GitHub

claude plugin install https://github.com/full-stack-biz/fetch-urls-skill --scope user

From Marketplace (when published)

Add the marketplace:

/plugin marketplace add full-stack-biz/fetch-urls-skill

Then install the plugin:

/plugin install fetch-urls-skill@full-stack-biz

Local Development

Test locally in Claude Code:

claude --plugin-dir /path/to/fetch-urls-skill

Requirements

  • System: Requires uv for running the Python script
  • Python: 3.11 or higher
  • Network: Makes HTTP requests (follows redirects, 30-second timeout)

Troubleshooting

"Anchor not found"

If you ask for a specific anchor and it's not found:

  • Use the discovery mode first: "What sections does this page have?"
  • The skill will list available anchors with their heading levels
  • Then ask for the exact anchor you found

Large pages timing out

If a page takes longer than 30 seconds to fetch:

  • Try fetching with --max-length to get a chunk first
  • Some sites may have slow servers or large page loads

HTML conversion looks odd

If Markdown conversion isn't quite right for your use case:

  • Ask Claude to fetch it as raw HTML instead
  • Use the --raw flag option

How the Skill Works Internally

The skill uses:

  • httpx — Downloads pages with proper timeouts and redirect handling
  • readabilipy — Extracts main content (removes navigation, ads, sidebar clutter)
  • BeautifulSoup — Parses and extracts sections by heading hierarchy
  • markdownify — Converts clean HTML to readable Markdown

Pages are fetched with a user agent that identifies the skill: FetchUrlsSkill/0.0.1

Version

0.0.1 — Initial release with full-page fetch, anchor extraction, discovery, and pagination.

Attribution

This project is based on the Model Context Protocol (MCP) fetch server maintained by Anthropic. The core functionality for fetching and processing web content was adapted from that reference implementation.

License

MIT

Author

full-stack-biz

Repository

https://github.com/full-stack-biz/fetch-urls-skill

About

Fetch URLs Agent Skill

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages