Fix Broken Links
БесплатноЗапускает вложенные скриптыНе проверенScan web files for broken hyperlinks and weak SEO anchor text, then interactively replace, strip, or skip each dead URL. Use when asked to find or fix broken…
от jhauga612 установок в других каталогахОб этом скилле
Fix Broken Links
Scans web files for broken hyperlinks and reports them. For each broken URL the
skill tries common spelling variations, optionally hands the link to the GitHub
Copilot CLI for suggested replacements, and presents an interactive fix menu.
Generic anchor text (click here, read more, etc.) is flagged as an SEO issue.
When to Use This Skill
- User asks to "find broken links", "fix broken links", or "check for dead links / 404s"
- User wants to audit or validate the hyperlinks in edited or changed files
- User wants generic anchor text (
click here,here,read more) flagged for SEO - User wants link checking across HTML, Markdown, JS/TS, JSON, CSS, SQL, or templates
Prerequisites
curl— HTTP status checks (the script exits quietly if absent)grep,sed— link extraction (standard on any POSIX system)- Bash 4+ for
scripts/link-fix.sh; on Windows use Git Bash or WSL, or run the PowerShell 7+ portscripts/link-fix.ps1 jq— optional; lets the bash script parse a JSON payload piped on stdingit— optional; used to discover changed files when no paths are passed (falls back to a full repo scan)copilot(GitHub Copilot CLI) — optional; powers agent-suggested replacements. Without it, only verified spelling variations are offered.
How It Works
The script has two modes:
- With file paths (passed as command-line arguments): it checks each link, looks up replacement candidates, and presents the interactive fix menu.
- With no file arguments: it discovers changed files via
git(or scans the repo) and simply lists the broken links — no replacement lookups and no prompts.
Links are found by scanning each file for http(s):// URLs, so the same logic
covers every format that embeds absolute URLs.
Step-by-Step Workflow
1. Choose the script for the platform
| Platform | Command |
|---|---|
| POSIX / Git Bash / WSL | bash scripts/link-fix.sh <files...> |
| Windows PowerShell 7+ | pwsh scripts/link-fix.ps1 <files...> |
2. Run against the target files
Pass one or more web files to get the full repair flow (lookup + interactive menu):
bash scripts/link-fix.sh docs/guide.md index.html
pwsh scripts/link-fix.ps1 docs/guide.md index.html
Run with no arguments to report broken links in changed files only (no prompts):
bash scripts/link-fix.sh
3. Resolve each broken link
For each broken URL the interactive menu offers:
| Key | Action |
|---|---|
r |
Replace with the suggested URL (a working variation, or an agent-proposed alternative) |
1–9 |
Replace with a numbered alternative |
d |
Strip the link wrapper, keeping the visible text as plain text |
c |
Enter a custom replacement URL |
s |
Skip |
Supported Source Types
| Source | Examples matched |
|---|---|
| HTML | <a href>, <img src>, <script src>, <link href>, <iframe src> |
| Markdown | [text](url), [text][ref], bare <url> |
| JS / TS / Vue / Svelte | fetch(), XMLHttpRequest.open(), jQuery, axios, href:/url: props |
| JSON / JSONL | any string value that is an absolute URL |
| CSS | url(...) |
| SQL | URL literals in query strings |
| Templates | Jinja2, ERB, EJS, Handlebars, Pug |
The d (remove) action understands HTML <a> wrappers and Markdown [text](url)
links specifically, keeping the visible text. Other source types support
r (replace) and c (custom) via literal URL substitution.
Features
- Self-contained core: bash and PowerShell ports — no runtime to install
- Format-agnostic link scan: extracts every
http(s)URL, covering HTML, Markdown, JS/TS, JSON, CSS, SQL, and templates at once - Automatic URL healing: tries www, https, and trailing-slash variations
- Agent-assisted suggestions: optionally hands the broken link to the Copilot CLI for replacement candidates; if the CLI is missing or errors, it offers none
- SEO audit: flags anchor text that is too generic to benefit search ranking
- Large-file guard: prompts before checking files with more than 50 links
- Interactive fix menu: replace with suggestion, enter custom URL, strip tag keeping text, or skip
Example Output
Checking 2 link(s) in docs/guide.md ...
BROKEN (404) https://example.com/old-page
------------------------------------------------------------
SEO anchor issues (consider descriptive link text)
docs/guide.md: <a href="https://example.com/old-page">click here</a>
============================================================
fix-broken-links report
============================================================
[1] docs/guide.md
URL : https://example.com/old-page
HTTP: 404
r Replace -> https://example.com/docs/install
1 Replace -> https://example.com/docs/getting-started
d Remove link, keep text
c Custom replacement URL
s Skip
> r
replaced
1 file(s) updated:
docs/gu
Установить Fix Broken Links в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Fix Broken Links?
Scan web files for broken hyperlinks and weak SEO anchor text, then interactively replace, strip, or skip each dead URL. Use when asked to find or fix broken links, check for dead links or 404s, audit hyperlinks, validate URLs, or flag generic anchor text ("click here", "read more") in HTML, Markdown, JS/TS, JSON, CSS, SQL, or template files.
Как установить скилл Fix Broken Links?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Fix Broken Links запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic