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-linksor--offlinefor internal-only checks. - Treats a link behind a bot wall as unverified, not broken.
- Uses
--level fullfor sign-off, becausesurfacesamples 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-checkerThe plugin installs all the skills and the hosted squirrelscan MCP server:
/plugin marketplace add squirrelscan/skills/plugin install squirrelscan@squirrelscannpx 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 | bashExample prompts
Paste one of these into your coding agent:
Find broken links on https://example.com and tell me what to do with each oneCheck for 404s and redirect chains, internal links onlyClean up dead sitemap URLs in this repoThe 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
- Check the CLI and login status, and say what external link checks cost when logged in.
- Run
squirrel auditwith thelinks,images/broken-images,reliability/broken-resourcesandcrawl/sitemap-4xxrules. - Export the full list as JSON, since the
llmformat lists at most 5 pages per rule. - Decide per issue using the decision table: fix, redirect, remove or leave.
- Re-audit at
--level fullwith--refresh. A link the tool could not verify is reported as not checked, never fine.
Related skills
seo-audit: page content and metadata.audit-website: the wider fix loop.website-ci-gate: fail a build on new broken links.
Related rules and guides
Source on GitHub
skills/broken-link-checker: the skill folder- README.md
- SKILL.md