From rad-seo-optimizer
Broken links, 404 errors, dead links, redirect chains, link checker, fix links. Scans the user's codebase for broken internal/external links, redirect chains, mixed-content issues, and unlinked brand mention opportunities. Real code work — no Path B dependencies.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rad-seo-optimizer:broken-link-fixer [URL or path to check] [--non-interactive][URL or path to check] [--non-interactive]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Find every broken link on the target site, trace redirect chains, uncover link reclamation opportunities, and generate exact fix commands for every issue. Operates over the user's codebase (Glob + Grep for link references, verify targets) plus limited WebFetch for external link verification.
Find every broken link on the target site, trace redirect chains, uncover link reclamation opportunities, and generate exact fix commands for every issue. Operates over the user's codebase (Glob + Grep for link references, verify targets) plus limited WebFetch for external link verification.
Works identically on current Opus / Sonnet / Haiku models. Link verification is primarily tool-call orchestration; all three models handle the batch coordination reliably.
Grep the project source for all link references. Target these patterns:
href="..." in .html, .htm, .jsx, .tsx, .vue, .svelte, .php files.[text](url) and [text]: url reference-style links in .md and .mdx files.url(...) in .css, .scss, .less files (images, fonts, imports)..js, .ts files (fetch calls, API endpoints, window.location).src="..." on <img>, <video>, <source>, <script>, <iframe> tags.sitemap.xml.robots.txt, .htaccess, next.config.js, vercel.json, netlify.toml.claude "Grep all files for href=, src=, url(, markdown links, and fetch/axios URLs. Output a deduplicated list with source file and line number for each link found."
Use WebFetch starting from the root URL. For each page:
robots.txt disallow rules during crawl.claude "Use WebFetch to crawl {url} up to 5 levels deep. Extract all href, src, and srcset URLs from each page. Build a complete link inventory with source page, target URL, link text, and link type."
For every unique URL discovered, check the HTTP status code. Classify each result:
| Status | Classification | Action |
|---|---|---|
| 200 | OK | No action needed |
| 301 | Permanent redirect | Record destination; check for chains |
| 302 | Temporary redirect | Record destination; flag if older than 30 days |
| 403 | Forbidden | Flag — may indicate misconfigured permissions |
| 404 | Not Found | BROKEN — fix immediately |
| 410 | Gone | Intentionally removed — remove link or replace |
| 500+ | Server error | Flag — may be intermittent, recheck before reporting |
| Timeout | Unreachable | Flag — retry once, then report if still unreachable |
Rate limiting: Pause 200 ms between requests to the same domain. For external links, pause 500 ms to avoid triggering rate limits.
claude "Check HTTP status for every URL in the link inventory. For non-200 responses, record the status code, response headers, and redirect destination if applicable. Retry timeouts and 5xx errors once after 3 seconds."
For every URL that returns 301 or 302, follow the redirect path to the final destination. Flag:
For each chain, output the full path and recommend the flattened redirect.
claude "Trace every redirect to its final destination. Flag chains with 2+ hops. For each chain, output: Source -> Hop 1 -> Hop 2 -> ... -> Final. Generate a flattened redirect rule mapping source directly to final destination."
Use WebSearch to find pages that mention the brand name but do not link to the site:
claude "Use WebSearch to find '{brand}' mentions across the web. For each result, use WebFetch to check whether the page links to {domain}. Report pages that mention the brand without linking."
These are outreach targets — contact the site owner and request a link.
Identify broken outbound links on competitor sites that pointed to content similar to the target site's:
claude "Use WebSearch to find pages in {niche} that link to now-dead resources. Use WebFetch to verify the links are truly broken (404/410). Cross-reference with our content to find suitable replacement pages."
This is a proven link-building tactic. See link-building-tactics.md for outreach templates and best practices.
Rank reclamation opportunities by:
For each broken link, provide a specific fix with an executable Claude Code command.
The highest priority. These are links you fully control.
Diagnosis: Determine why the page is missing — was it moved, renamed, or deleted?
Fix commands:
# URL was moved — update all references
claude "Find every file that links to '/old-path'. Replace with '/new-path'. Verify no other references remain."
# Page was deleted — remove the link or replace with relevant alternative
claude "Find every file that links to '/deleted-page'. Replace the link with '/relevant-alternative' or remove the link element entirely if no alternative exists."
# Typo in URL — correct the path
claude "Find every file that links to '/missspelled-url'. Correct the URL to '/correct-url'."
Links to other sites that have gone dead.
# Replace with an alternative resource
claude "The link to 'https://dead-site.com/resource' on '/our-page' is returning 404. Find the page on the Wayback Machine or locate an equivalent resource. Replace the broken URL with the working alternative."
# Remove if no alternative exists
claude "Remove the broken link to 'https://dead-site.com/resource' from '/our-page'. Rewrite the surrounding text so it reads naturally without the link."
Flatten every chain to a direct link.
# Update internal links to point to final destination
claude "Find all links pointing to '{redirect-source}'. Update them to point directly to '{final-destination}' to eliminate the redirect chain."
# Update server redirect rules
claude "In the redirect configuration, replace the chain {A -> B -> C} with a single rule {A -> C}. Remove the intermediate rule {B -> C} only if B has no other inbound links."
claude "Find all HTTP URLs in the codebase (http://). For each, verify the HTTPS version works. Replace http:// with https:// for all valid URLs. Flag any that don't support HTTPS."
Check whether the site has a custom 404 page. Use WebFetch to request a known-bad URL and inspect the response.
Fix command if no custom 404 page exists:
claude "Create a custom 404 page that returns HTTP 404 status. Include: a friendly message ('We could not find that page'), a search bar, links to the 5 most important pages, and the standard site header/footer. Match the existing site design."
Fix command if 404 page returns 200 (soft 404):
claude "The custom 404 page is returning HTTP 200. Update the server configuration to return a 404 status code for missing pages while still rendering the custom error template."
Present results using this structure:
# Broken Link Report
## Summary
- Total links scanned: X
- Broken links found: X (internal: X, external: X)
- Redirect chains: X
- Mixed content issues: X
- Link reclamation opportunities: X
- 404 page status: [Custom / Soft 404 / Missing]
## Broken Internal Links (Fix Immediately)
| Source Page | Broken URL | Status | Fix |
|------------|-----------|--------|-----|
| /about | /old-team | 404 | Update to /team |
| /blog/post-1 | /products/removed | 410 | Remove link |
## Broken External Links
| Source Page | Broken URL | Status | Recommended Replacement |
|------------|-----------|--------|------------------------|
| /resources | https://example.com/gone | 404 | https://alternative.com/resource |
| /blog/post-2 | https://dead-site.com/page | Timeout | Remove or find alternative |
## Redirect Chains (Flatten)
| Source | Redirect 1 | Redirect 2 | Final Destination |
|--------|-----------|-----------|-------------------|
| /old-a | /old-b (301) | /old-c (301) | /current (200) |
## Mixed Content Issues
| Source Page | HTTP URL | HTTPS Available | Fix |
|------------|---------|----------------|-----|
| /contact | http://cdn.example.com/style.css | Yes | Update to https:// |
## Link Reclamation Opportunities
| External Page | Mention/Context | Current Link Status | Our Replacement URL |
|--------------|----------------|--------------------|--------------------|
| blog.example.com/post | Brand mention, no link | N/A (unlinked) | /homepage |
| competitor-linker.com/resources | Links to dead resource | 404 | /our-equivalent-resource |
## Fix Commands (Copy-Paste Ready)
1. `claude "Find every file linking to '/old-team'. Replace with '/team'."`
2. `claude "Remove the dead link to '/products/removed' from /about. Rewrite surrounding text."`
3. ...
Fix issues in this order:
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub radorigin-llc/rad-claude-skills --plugin rad-seo-optimizer