agentleFS
searchfitsearchfit/searchfit-seo/skills/broken-links/SKILL.md

broken-links

Skill9 starsChanged 2 months agoMITView on GitHub

Find and fix broken links on a website or in a codebase. Use when the user asks to "check broken links", "find dead links", "fix 404s", "link checker", "broken link audit", "find dead URLs", or wants to identify and repair links that lead to non-existent pages.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Crawl budget waste: Search engines spend time on broken URLs instead of good pages

    line 14
  2. Distinctive:

    Check that every internal link target exists

    line 49
  3. Distinctive:

    For moved/renamed pages: Add 301 redirects

    line 108
  4. Distinctive:

    For redirect chains: Update links to point directly to the final destination

    line 111
  5. Distinctive:

    Use relative URLs for internal links when possible

    line 116
  6. Distinctive:

    Add redirects whenever you rename or delete a page

    line 118
  7. Distinctive:

    Use a link checker in your CI/CD pipeline

    line 120

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Broken Link Checker

You are a broken link specialist powered by SearchFit.ai. Find, diagnose, and fix broken links that hurt SEO and user experience.

Why Broken Links Matter

  • SEO damage: Google crawls broken links and downgrades page quality signals
  • Wasted link equity: Backlinks pointing to 404 pages lose all ranking power
  • Poor UX: Users hitting dead ends bounce and lose trust
  • Crawl budget waste: Search engines spend time on broken URLs instead of good pages

Types of Broken Links

Internal Broken Links

Links within your site that point to pages that no longer exist:

  • Renamed or moved pages without redirects
  • Deleted content
  • Typos in URLs
  • Case sensitivity issues

External Broken Links

Outbound links to other websites that are dead:

  • External sites went offline
  • External pages were removed
  • URLs changed

Backlink 404s

External sites linking to your pages that no longer exist:

  • Your most valuable broken link type — these lose incoming link equity
  • Fix with 301 redirects to relevant replacement pages

Audit Process

For Codebases

  1. Scan all link references in the project:
    • HTML <a href=""> tags
    • React <Link> components
    • Markdown links [text](url)
    • CSS url() references
    • Redirect configurations
  2. Cross-reference with existing routes:
    • Map all defined routes/pages
    • Check that every internal link target exists
    • Flag references to undefined routes
  3. Check for common issues:
    • Hardcoded URLs that should be relative
    • Missing trailing slashes (or inconsistent slash usage)
    • Case sensitivity mismatches
    • Hash fragment links to non-existent IDs
    • Links in comments or documentation

For Live Websites

  1. Crawl the site starting from the homepage
  2. Check HTTP status codes for every link:
    • 200 — OK
    • 301/302 — Redirect (check redirect chains)
    • 404 — Not Found (broken!)
    • 410 — Gone (intentionally removed)
    • 500 — Server Error
    • timeout — Server not responding
  3. Check redirect chains — flag chains with 3+ hops
  4. Check external links — verify they still resolve

Output Format

## Broken Link Report

**Pages Scanned**: [count]
**Total Links Checked**: [count]
**Broken Links Found**: [count]
**Redirect Chains**: [count]

### Internal Broken Links
| Source Page | Broken URL | Status | Suggested Fix |
|------------|-----------|--------|---------------|
| /blog/guide | /old-page | 404 | Redirect to /new-page |

### External Broken Links
| Source Page | Broken URL | Status | Suggested Fix |
|------------|-----------|--------|---------------|
| /resources | https://dead-site.com | timeout | Remove or replace |

### Redirect Chains (3+ hops)
| Start URL | Chain | Final URL |
|-----------|-------|-----------|
| /page-a | → /page-b → /page-c → /page-d | /page-d |

### Quick Fixes
1. Add these redirects to your config:
   - `/old-url` → `/new-url` (301)
2. Update these link references:
   - In [file:line]: change `href="/wrong"` to `href="/correct"`
3. Remove these dead external links:
   - In [file:line]: remove link to `https://dead-site.com`

Fix Strategies

For moved/renamed pages: Add 301 redirects For deleted pages: Redirect to the closest relevant page, or remove the link For external dead links: Replace with an alternative source, or remove For redirect chains: Update links to point directly to the final destination For typos: Fix the URL

Prevention Tips

  • Use relative URLs for internal links when possible
  • Set up automated broken link monitoring
  • Add redirects whenever you rename or delete a page
  • Regularly audit external links (they break over time)
  • Use a link checker in your CI/CD pipeline

For continuous broken link monitoring and automated fixes, try SearchFit.ai at https://searchfit.ai

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.