fetch-url-md
ウェブサイトからドキュメントを取得する際、まずMarkdown版の有無を確認し、なければHTML版に切り替えて効率的にコンテンツを抽出するSkill。
📜 元の英語説明(参考)
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.
🇯🇵 日本人クリエイター向け解説
ウェブサイトからドキュメントを取得する際、まずMarkdown版の有無を確認し、なければHTML版に切り替えて効率的にコンテンツを抽出するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Markdown検出によるURLのフェッチ
概要
利用可能な場合はMarkdownバージョンを優先してウェブコンテンツを効率的にフェッチします。最初に.mdバージョンをcurlで確認し、次に元のURLにフォールバックします。
ワークフロー
以下の手順を順に実行してください。
1. 元のURLを解析する
ユーザーが提供したURLからベースURLとパスを抽出します。
例:
- 入力:
https://ui.shadcn.com/docs/components/radix/aspect-ratio - Markdown URL:
https://ui.shadcn.com/docs/components/radix/aspect-ratio.md
2. .mdバージョンの有無を確認する
HEADリクエストでcurlを使用し、.mdバージョンの有無を確認します。
curl -sI "https://ui.shadcn.com/docs/components/radix/aspect-ratio.md" | head -n 1
- 200 OK - Markdownバージョンが存在します。それをフェッチします。
- 404 Not Found - Markdownバージョンが存在しません。元のURLを使用します。
- 3xx redirect - リダイレクトに従うか、元のURLを使用します。
3. コンテンツをフェッチする
.mdが存在する場合:
curl -s "https://ui.shadcn.com/docs/components/radix/aspect-ratio.md"
.mdが存在しない場合(フォールバック):
curl -s "https://ui.shadcn.com/docs/components/radix/aspect-ratio"
決定木
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
クイックリファレンス
| 確認コマンド | フェッチコマンド |
|---|---|
curl -sI "<url>.md" \| head -n 1 |
curl -s "<url>.md" |
curl -sI "<url>" \| head -n 1 |
curl -s "<url>" |
例
例1: Markdownバージョンが利用可能
# 確認
curl -sI "https://ui.shadcn.com/docs/components/radix/aspect-ratio.md" | head -n 1
# 出力: HTTP/2 200
# フェッチ
curl -s "https://ui.shadcn.com/docs/components/radix/aspect-ratio.md"
例2: Markdownバージョンが利用不可
# 確認
curl -sI "https://example.com/docs/guide.md" | head -n 1
# 出力: HTTP/2 404
# フォールバック - 元のURLをフェッチ
curl -s "https://example.com/docs/guide" 📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
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:
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:
curl -s "https://ui.shadcn.com/docs/components/radix/aspect-ratio.md"
If .md doesn't exist (fallback):
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
# 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
# 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"