fixing-broken-links
БесплатноБез исполняемых скриптовНе проверенCrawl all links in a file or project, test each for a valid HTTP response, report broken ones, and fix or remove them.
от spencerpauly★ 905 звёзд на GitHubОб этом скилле
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
hrefandsrcattributes - 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→ OK301/302→ OK but note the redirect target403→ Might be valid (some sites block curl); try with a browser user-agent header404→ Broken429→ Rate limited; retry once after a short pause000or 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:
- Search the web for the correct/current URL (the resource may have moved)
- If found, replace the old URL with the new one
- 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)
Установить fixing-broken-links в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл fixing-broken-links?
Crawl all links in a file or project, test each for a valid HTTP response, report broken ones, and fix or remove them.
Как установить скилл fixing-broken-links?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fixing-broken-links запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic