squirrelscan
GitHub

Broken link checker skill for Claude Code, Codex and Cursor

The broken-link-checker agent skill finds dead links, anchors, redirect chains, orphan pages and broken images, with a decision for each issue.

broken-link-checker is an Agent Skills SKILL.md from squirrelscan: a broken link checker, 404 finder and redirect chain cleaner for coding agents. It runs squirrelscan’s link audit rules through the squirrel CLI or the hosted squirrelscan MCP server in Claude Code, Codex, Cursor and other agents. Broken links are usually a decision, not a mechanical fix, so it gives each issue a decision.

New to skills? Start with the skills overview.

What it does

  • Finds broken internal and external links, broken anchors, redirect chains, orphan pages, broken images and dead sitemap URLs.
  • Recommends per issue whether to fix, redirect, remove or leave the link.
  • Status-checks internal link targets the crawl did not fetch, and checks external links unless you pass --no-external-links.
  • Warns about cost before a logged-in run: the cloud charges 1 credit per distinct external link it verifies. Offers --no-external-links or --offline for internal-only checks.
  • Treats a link behind a bot wall as unverified, not broken.
  • Uses --level full for sign-off, because surface samples one page per URL pattern.
  • Never deletes a link without telling you which pages lose it.
  • Prefers fixing the source link over adding a redirect, and points to where redirects live in Next.js, WordPress, Shopify, Webflow, Cloudflare, Vercel and Netlify.

Questions it answers

  • Find broken links on my website
  • Check for 404s and redirect chains
  • Clean up dead sitemap URLs
  • Which pages link to a page that returns 404?
  • Which of my external links are dead?
  • Which pages are orphans with no inbound links?
  • Are there broken anchors or broken images on my website?
  • Should I redirect or remove a link to a deleted page?

Install

Works with any Agent Skills tool (Claude Code, Codex, Cursor, Gemini CLI, Amp and others):

npx skills add squirrelscan/skills --skill broken-link-checker

The plugin installs all the skills and the hosted squirrelscan MCP server:

/plugin marketplace add squirrelscan/skills
/plugin install squirrelscan@squirrelscan

npx skills add puts the skill in .agents/skills/. To add the MCP server too, configure it in ~/.codex/config.toml. See squirrelscan for Codex.

Run npx skills add, then use the Cursor plugin from the skills repository or the one-click MCP link. See squirrelscan for Cursor.

Gemini CLI, GitHub Copilot, Amp and other Agent Skills tools: run npx skills add, then add the MCP server. See coding agents.

Requirements

The squirrel CLI installed and in your PATH, or the hosted squirrelscan MCP server connected (https://mcp.squirrelscan.com/mcp). Check the CLI with squirrel --version. Setup steps are in install and MCP clients.

Install the CLI on macOS or Linux:

curl -fsSL https://install.squirrelscan.com | bash

Example prompts

Paste one of these into your coding agent:

Find broken links on https://example.com and tell me what to do with each one
Check for 404s and redirect chains, internal links only
Clean up dead sitemap URLs in this repo

The agent runs the link audit rules and exports every broken link with the pages it appears on. It proposes a decision for each. It edits links or redirects only after you agree.

How it works

  1. Check the CLI and login status, and say what external link checks cost when logged in.
  2. Run squirrel audit with the links, images/broken-images, reliability/broken-resources and crawl/sitemap-4xx rules.
  3. Export the full list as JSON, since the llm format lists at most 5 pages per rule.
  4. Decide per issue using the decision table: fix, redirect, remove or leave.
  5. Re-audit at --level full with --refresh. A link the tool could not verify is reported as not checked, never fine.

Source on GitHub

Type to search…

↑↓ navigate↵ openesc close