Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

docs-fetch-fallbacks

БесплатноБез исполняемых скриптовНе проверен

WebFetch 404/403/timeout/empty-SPA fallback ladder: strip query, raw.githubusercontent, `gh api`, docs-source-at-a-pinned-tag, context7/WebSearch. Use when a…

laurigatesот laurigates★ 61 звезда на GitHub

Об этом скилле

/docs:fetch-fallbacks

A failed WebFetch is not a signal to retry the same URL. Re-issuing an identical request costs a round trip and returns the identical failure — the path is wrong, the resource is gated, or the host is slow, and none of those change between attempts. Read the failure signature, apply the fallback that matches it, and stop at two attempts.

Execution

Step 1: Read the failure signature

Note the status and the URL shape before acting — the same status means different things depending on where it lands:

Observed What it actually means
404 on a URL carrying ?ref=, ?v=, or tracking params The path is fine; the query is not
404 on github.com/<owner>/<repo>/blob/<ref>/<path> An HTML view URL, not a content URL
404 on a repo path with no host problem The content is reachable through the API, not the web UI
403 with an empty body on a public docs page Bot/UA gating, not authorization
403 on a github.com URL The resource needs authentication
403 on lore.kernel.org search (/<list>/?q=…, /all/?q=…), a message page (/all/<msgid>/) or /raw Bot gating on lore's web interface; a different User-Agent gets the same 403
A timeout with no status at all Host slow or unreachable — needs a different source, not a retry
No status at all, and the answer says the page had no content ("I don't have access to the content", "you've only provided the heading") The fetch succeeded. The page is client-rendered and the served HTML is an empty shell — see Step 4

Step 2: Apply the matching fallback

Failure Try
404 on a docs page with ?ref=… Strip query string
404 on a GitHub blob URL Switch to raw.githubusercontent.com URL
404 on a repo path gh api repos/<owner>/<repo>/contents/<path>
403 on a public docs page (except lore.kernel.org) Try once with a different UA or a search engine
403 on a GitHub URL Use gh api (authenticated)
403 on lore.kernel.org search, message HTML or /raw Fetch the thread mbox by message-id (lore.kernel.org); no UA retries
Timeout One retry, then fall back to context7 / WebSearch
200 with an empty shell (SPA) Fetch the docs source from the project's repo at a pinned tag (Step 4)

If two attempts both fail, surface the failure in the response — do not loop.

lore.kernel.org: fetch the thread mbox

lore's search, message pages and /raw return 403 with or without a custom User-Agent, so do not retry them. The thread mbox for a known message-id is served:

curl -fsSL "https://lore.kernel.org/all/<msgid>/t.mbox.gz" | gunzip > thread.mbox

https://lore.kernel.org/<list>/<msgid>/t.mbox.gz works the same way. Parse the result with Python's mailbox.mbox("thread.mbox"). The message-id goes in without angle brackets.

This works only by message-id. To find an unknown one, web-search the subject, or read the "Link to vN" lines in a b4-generated cover letter of a later revision. For searching a list's archive, use the git mirrors described in kernel-plugin:kernel-lore-search.

Step 3: Worked example — a GitHub blob URL

WebFetch returns 404 on:

https://github.com/laurigates/claude-plugins/blob/main/README.md?plain=1

Two things are wrong at once. Fix them cheapest-first rather than jumping to the authenticated call:

  1. Strip the query → still 404, so the query was not the whole problem.
  2. Swap the host → https://raw.githubusercontent.com/laurigates/claude-plugins/main/README.md — this is the fetch that succeeds for a public repo.
  3. Still 404 or 403? The repo is private or rate-limited. Authenticate instead of guessing at more URL shapes:
gh api repos/laurigates/claude-plugins/contents/README.md \
  -H "Accept: application/vnd.github.raw+json"

That is attempt two. There is no attempt three.

For the full URL → gh command mapping (pulls, issues, commits, contents at a given ref), see git-plugin:gh-cli-agentic § GitHub URL Resolution — it owns that table. This skill covers only the recovery path after a fetch has failed.

Step 4: The SPA case — a 200 that carries no content

Every signature above is an error. This one is not: the request succeeds, the status is 200, and the HTML is a shell that a browser would fill in with JavaScript. Nothing in the result says "empty page" — instead the answer says it cannot see the content and asks you to paste it. That reads as a broken fetcher and invites a retry, which returns the identical shell.

The tell is the answer's shape, not a status code: it reports receiving only a heading or a title, and asks for the documentation to be provided. Two of those in a row on the same host means the host is client-rendered — stop fetching it.

The fallback is the docs' source, not the docs' URL. Most such sites render markdown that lives in a publ

Полный SKILL.md на GitHub

Установить docs-fetch-fallbacks в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

WebFetch
WebSearch
Bash(gh api *)
Read

FAQ

Что делает скилл docs-fetch-fallbacks?

WebFetch 404/403/timeout/empty-SPA fallback ladder: strip query, raw.githubusercontent, `gh api`, docs-source-at-a-pinned-tag, context7/WebSearch. Use when a doc or GitHub URL fetch fails or returns a page with no content.

Как установить скилл docs-fetch-fallbacks?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл docs-fetch-fallbacks запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить docs-fetch-fallbacks с