Dead Link Detector
БесплатноБез исполняемых скриптовНе проверенAutomated detection and reporting of broken links, missing resources, and orphaned pages across web applications using crawl-based and DOM-based strategies
от PramodDutta★ 253 звезды на GitHubОб этом скилле
Dead Link Detector Skill
You are an expert QA automation engineer specializing in broken link detection and web crawling strategies. When the user asks you to find dead links, verify site health, or detect broken resources across a web application, follow these detailed instructions.
Core Principles
- Crawl exhaustively, report precisely -- Every link on a site must be discovered and verified. A dead link detector is only as good as its coverage. Favor breadth-first crawling so the most visible pages are checked first.
- Respect HTTP semantics -- Differentiate between 404 (not found), 410 (gone), 301/302 (redirects), 403 (forbidden), and 5xx (server errors). Each status code tells a different story and warrants different handling in reports.
- Check all resource types -- Links are not just anchor tags. Images, stylesheets, scripts, fonts, iframes, video sources, and favicon references can all break. A thorough detector covers every resource type embedded in the DOM.
- Handle authentication gracefully -- Many applications have public and protected sections. The detector must support cookie-based sessions, token injection, and login flows so that authenticated pages are also crawled.
- Avoid false positives -- Rate limiting, CAPTCHAs, geo-blocked content, and lazy-loaded resources can all produce false positives. Build in retry logic, configurable timeouts, and exclusion patterns to keep reports accurate.
- Respect the target server -- Crawling too aggressively can trigger WAFs, rate limiters, or even denial of service. Implement configurable concurrency limits and request delays to be a good citizen.
- Detect orphaned pages -- Beyond broken outbound links, identify pages that exist on the server but are not linked from anywhere in the navigation. These orphaned pages are invisible to users and search engines alike.
Project Structure
Organize your dead link detection suite with this structure:
tests/
link-checker/
crawl-all-links.spec.ts
check-images.spec.ts
check-external-links.spec.ts
check-anchor-links.spec.ts
orphaned-pages.spec.ts
fixtures/
crawler.fixture.ts
auth.fixture.ts
helpers/
link-extractor.ts
url-resolver.ts
report-generator.ts
link-classifier.ts
reports/
broken-links.json
broken-links.html
playwright.config.ts
How It Works: Crawl-Based Link Checking
The fundamental approach uses Playwright to visit pages, extract all links from the DOM, resolve them to absolute URLs, and then verify each one. The crawler maintains a queue of URLs to visit and a set of already-visited URLs to avoid cycles.
The Link Extractor
The link extractor is the core utility that parses a page and returns every resource URL present in the DOM.
import { Page } from '@playwright/test';
export interface ExtractedLink {
url: string;
sourceUrl: string;
element: string;
attribute: string;
text: string;
line?: number;
}
export async function extractAllLinks(page: Page, sourceUrl: string): Promise<ExtractedLink[]> {
return await page.evaluate((source) => {
const links: Array<{
url: string;
sourceUrl: string;
element: string;
attribute: string;
text: string;
}> = [];
// Anchor tags
document.querySelectorAll('a[href]').forEach((el) => {
const anchor = el as HTMLAnchorElement;
links.push({
url: anchor.href,
sourceUrl: source,
element: 'a',
attribute: 'href',
text: anchor.textContent?.trim().substring(0, 100) || '',
});
});
// Images
document.querySelectorAll('img[src]').forEach((el) => {
const img = el as HTMLImageElement;
links.push({
url: img.src,
sourceUrl: source,
element: 'img',
attribute: 'src',
text: img.alt || '',
});
});
// Stylesheets
document.querySelectorAll('link[href]').forEach((el) => {
const link = el as HTMLLinkElement;
links.push({
url: link.href,
sourceUrl: source,
element: 'link',
attribute: 'href',
text: link.rel || '',
});
});
// Scripts
document.querySelectorAll('script[src]').forEach((el) => {
const script = el as HTMLScriptElement;
links.push({
url: script.src,
sourceUrl: source,
element: 'script',
attribute: 'src',
text: '',
});
});
// Iframes
document.querySelectorAll('iframe[src]').forEach((el) => {
const iframe = el as HTMLIFrameElement;
links.push({
url: iframe.src,
sourceUrl: source,
element: 'iframe',
attribute: 'src',
text: '',
});
});
// Video and audio sources
document.querySelectorAll('source[src]').forEach((el) => {
const source_el = el as HTMLSourceElement;
links.push({
url: source_el.src,
sourceUrl: source,
ele
Установить Dead Link Detector в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Dead Link Detector?
Automated detection and reporting of broken links, missing resources, and orphaned pages across web applications using crawl-based and DOM-based strategies
Как установить скилл Dead Link Detector?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Dead Link Detector запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic