Skip to content
Back to skills

Fetch Url Md

ASecurity

Fetch web content with automatic markdown version detection using curl. Use when Claude needs to retrieve documentation from websites that offer both HTML and markdown formats. First checks if a .md version exists (more efficient and cleaner), then falls back to HTML if unavailable. Ideal for fetching documentation from sites like ui.shadcn.com, GitHub wikis, or any documentation site that mirrors content in markdown format.

  • 225 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 4, 2026
documentationbashgitdocumentation

Security analysis

A100/100

Pro scans all 13 files and shows the line behind each finding

Scanned September 4, 2026

npx -y skills add NeverSight/skills_feed --skill fetch-url-md --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fetch Url Md?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Fetch Url Md
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/neversight-fetch-url-md/badge)](https://www.skillsdirectory.com/skills/neversight-fetch-url-md)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: fetch-url-md
description: Fetch web content with automatic markdown version detection using curl. Use when Claude needs to retrieve documentation from websites that offer both HTML and markdown formats. First checks if a .md version exists (more efficient and cleaner), then falls back to HTML if unavailable. Ideal for fetching documentation from sites like ui.shadcn.com, GitHub wikis, or any documentation site that mirrors content in markdown format.
---

# Fetch URL with Markdown Detection

## Overview

Efficiently fetch web content by prioritizing markdown versions when available. Uses curl to check for .md versions first, then falls back to the original URL.

## Workflow

Follow these steps sequentially:

### 1. Parse the original URL

Extract the base URL and path from the user-provided URL.

**Example:**
- Input: `https://ui.shadcn.com/docs/components/radix/aspect-ratio`
- Markdown URL: `https://ui.shadcn.com/docs/components/radix/aspect-ratio.md`

### 2. Check for .md version

Use curl with HEAD request to check if .md version exists:

```bash
curl -sI "https://ui.shadcn.com/docs/components/radix/aspect-ratio.md" | head -n 1
```

- **200 OK** - Markdown version exists, fetch it
- **404 Not Found** - Markdown version doesn't exist, use original URL
- **3xx redirect** - Follow the redirect or use original URL

### 3. Fetch content

**If .md exists:**
```bash
curl -s "https://ui.shadcn.com/docs/components/radix/aspect-ratio.md"
```

**If .md doesn't exist (fallback):**
```bash
curl -s "https://ui.shadcn.com/docs/components/radix/aspect-ratio"
```

## Decision Tree

```
User provides URL
       │
       ▼
Construct .md URL (append .md)
       │
       ▼
curl -sI <markdown-url> | head -n 1
       │
   ┌───┴───┐
   │       │
200 OK   404/Other
   │       │
   ▼       ▼
Fetch    Fetch original
.md      HTML URL
```

## Quick Reference

| Check Command | Fetch Command |
|---------------|---------------|
| `curl -sI "<url>.md" \| head -n 1` | `curl -s "<url>.md"` |
| `curl -sI "<url>" \| head -n 1` | `curl -s "<url>"` |

## Examples

**Example 1: Markdown version available**
```bash
# Check
curl -sI "https://ui.shadcn.com/docs/components/radix/aspect-ratio.md" | head -n 1
# Output: HTTP/2 200

# Fetch
curl -s "https://ui.shadcn.com/docs/components/radix/aspect-ratio.md"
```

**Example 2: Markdown version not available**
```bash
# Check
curl -sI "https://example.com/docs/guide.md" | head -n 1
# Output: HTTP/2 404

# Fallback - fetch original
curl -s "https://example.com/docs/guide"
```

Files in this skill

  • SKILL.md2.5 KB
  • description_ar.txt641 B
  • description_cn.txt382 B
  • description_de.txt528 B
  • description_en.txt429 B
  • description_es.txt474 B
  • description_fr.txt548 B
  • description_it.txt494 B
  • description_ja.txt687 B
  • description_ko.txt532 B
  • description_ru.txt859 B
  • description_tw.txt382 B
  • stats.json65 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in documentation →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.