fixing-broken-links — скилл для Claude Code: что делает и как ставить
Скилл находит в файлах проекта битые внешние URL и локальные пути, проверяет их ответы через curl и заменяет на актуальные адреса.
npx skills add spencerpauly/awesome-cursor-skills --skill fixing-broken-links -a claude-codeЧто делает fixing-broken-links
Скилл извлекает из переданных файлов ссылки любого вида: разметку Markdown [text](url), прямые адреса, HTML-атрибуты href и src, а также локальные относительные пути. Каждый внешний адрес проверяется через вызов curl с лимитом ожидания 10 секунд. Локальные пути проверяются тестом [ -f "path" ].
При ответах 403 запрос повторяется с заголовком пользовательского браузера, потому что часть сайтов блокирует вызовы curl. Для кода 429 выполняется повтор после паузы. Из-за жёстких лимитов GitHub и npm частые проверки завершатся ошибками, поэтому запросы к ним нужно распределять по времени.
Для неработающих адресов скилл ищет новую ссылку через веб-поиск. Если материал пропал насовсем, адрес заменяется архивной копией web.archive.org, комментируется или удаляется с сохранением текста анкора. Результаты проверки сводятся в итоговую таблицу.
Какие задачи решает
- найти битые внешние ссылки и локальные пути в документации
- проверить HTTP-коды ответов адресов с помощью вызовов
curl - заменить устаревшие ссылки на актуальные адреса или архивные копии
web.archive.org - удалить недействительные ссылки с сохранением текста анкоров
Примеры запросов агенту
- Проверь все ссылки в файле
README.mdи обнови адреса, возвращающие 404 - Запусти fixing-broken-links для каталога
docsи покажи итоговую таблицу со статусами - Найди битые ссылки в
resources/foo/SKILL.mdи замени недоступные страницы на копии из web.archive.org
Как установить fixing-broken-links
1Через Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill fixing-broken-links -a claude-code2Вручную: положить файлы
~/.claude/skills/fixing-broken-links/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/fixing-broken-links/
1Через Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill fixing-broken-links -a codex2Вручную: положить файлы
.agents/skills/fixing-broken-links/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill fixing-broken-links -a cursor2Вручную: положить файлы
.cursor/skills/fixing-broken-links/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install spencerpauly/awesome-cursor-skills fixing-broken-links2Вручную: положить файлы
.github/skills/fixing-broken-links/SKILL.md1Через Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill fixing-broken-links -a gemini-cli2Командой платформы
gemini skills install https://github.com/spencerpauly/awesome-cursor-skills --path resources/fixing-broken-linksВручную: положить файлы
.devin/skills/fixing-broken-links/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill fixing-broken-links -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о fixing-broken-links
Как установить fixing-broken-links в Claude Code?
Выполните команду npx skills add spencerpauly/awesome-cursor-skills --skill fixing-broken-links -a claude-code в терминале.
Что делает скилл fixing-broken-links?
Он находит ссылки в файлах, проверяет их доступность через curl и файловую систему, а затем обновляет адреса, подключает архивные копии или удаляет битые ссылки.
Как скилл обрабатывает блокировки curl и ошибки 403?
При получении кода 403 запрос повторяется с заголовком пользовательского браузера, поскольку некоторые серверы блокируют вызовы curl. При ошибке 429 скилл делает паузу перед повторной попыткой.
Исходный текст
SKILL.md · CC0-1.0
---
name: fixing-broken-links
description: Crawl all links in a file or project, test each for a valid HTTP response, report broken ones, and fix or remove them.
user-invocable: true
---
# Fixing Broken Links
Scan a file (or set of files) for URLs, test every link, and fix any that are broken.
## Workflow
### 1. Extract All Links
Read the target file(s) and collect every URL:
- Markdown links: `[text](url)`
- Bare URLs: `https://...`
- HTML `href` and `src` attributes
- Reference-style link definitions: `[id]: url`
- Local relative paths: `./path/to/file`, `resources/foo/SKILL.md`
### 2. Test Each Link
**For external URLs:**
- Use `curl -sL -o /dev/null -w "%{http_code}" --max-time 10 "<url>"` to get the HTTP status code
- Batch independent checks for speed (run multiple curl commands in parallel or in quick succession)
- Classify results:
- `200`–`299` → OK
- `301`/`302` → OK but note the redirect target
- `403` → Might be valid (some sites block curl); try with a browser user-agent header
- `404` → Broken
- `429` → Rate limited; retry once after a short pause
- `000` or timeout → Retry once; if still failing, mark as unreachable
**For local file paths:**
- Check if the file exists on disk with `[ -f "path" ]`
- If it's a relative path, resolve it from the file's directory
### 3. Fix Broken Links
For each broken link:
1. Search the web for the correct/current URL (the resource may have moved)
2. If found, replace the old URL with the new one
3. If the resource no longer exists, note it and either:
- Remove the link and leave the text
- Comment it out with a note
- Replace with an archived version (web.archive.org)
### 4. Report
Produce a summary table:
```
| URL | Status | Action |
|-----|--------|--------|
| https://example.com/page | 200 | OK |
| https://old.example.com/moved | 404 → 301 | Updated to https://new.example.com/page |
| ./docs/missing.md | MISSING | Removed link |
```
## Tips
- For large files with many links, batch curl calls to avoid slowdowns
- Some sites (GitHub, npm) rate-limit aggressively — space out requests
- Always re-read the file after making changes to confirm replacements didn't break formatting
- For Markdown files, verify link syntax is preserved: `[text](url)` not `[text]( url )` (no extra spaces)
© spencerpauly · CC0-1.0 · spencerpauly/awesome-cursor-skills