link-checker
Skill20 starsChanged 10 months agoMITView on GitHub
Find and validate links on web pages. Reports broken links, redirects, and other issues. Use browser_snapshot to get page accessibility tree, then extract links: For each link, make a HEAD request to check status: Track redirect chains: Tips: - Default to depth 1 - Use --internal-only to reduce scope - Parallelize requests where possible
1 other project uses a version of this.
Adopted by
Most recently taken up by
- mrhinkle/VibeCoding-a-Websitetheir own version, first seen Nov 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- mrhinkle/VibeCoding-a-Website★ 17same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- ab-testingSkill
- cookie-auditorSkill
- critical-pathsSkill
- form-fuzzerSkill
- github-prSkill
- network-throttlingSkill
- persona-generatorSkill
- screenshot-annotatorSkill
- session-recorderSkill
- smoke-testingSkill
- stripe-checkoutSkill
- user-testingSkill
- wcag-auditorSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Before releases to catch broken links
- Very specific: line 16
Use browser_snapshot to get page accessibility tree, then extract links:
- Very specific: line 159
Use --internal-only to reduce scope
- Very specific: line 203
When --check-links is added to /user-test:
- Distinctive: line 208
Don't interrupt persona flow for link checking
- Distinctive: line 214
Add "Link Health" section to report
- Distinctive: line 246
Don't hammer servers: Add delays between requests
≈ “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.
Files
Link Checker Skill
Find and validate links on web pages. Reports broken links, redirects, and other issues.
When to Use
- Before releases to catch broken links
- After content updates
- During user testing (with
--check-linksflag) - Regular site maintenance
Link Extraction
Using Browser Snapshot
Use browser_snapshot to get page accessibility tree, then extract links:
// Links to extract
const linkSelectors = [
'a[href]', // Standard links
'area[href]', // Image map links
'link[href]', // Stylesheet/resource links (optional)
];Link Types to Identify
| Type | Pattern | Action |
| Internal | Same domain | Check via HEAD |
| External | Different domain | Check via HEAD (unless excluded) |
| Anchor | #section | Verify element exists |
| mailto: | mailto:* | Validate format |
| tel: | tel:* | Validate format |
| javascript: | javascript:* | Flag as warning |
| data: | data:* | Skip |
Extracting via browser_evaluate
async (page) => {
const links = await page.evaluate(() => {
const anchors = document.querySelectorAll('a[href]');
return Array.from(anchors).map(a => ({
href: a.href,
text: a.textContent.trim().slice(0, 50),
location: a.closest('[id]')?.id || 'page'
}));
});
return links;
}Link Validation
HEAD Request Method
For each link, make a HEAD request to check status:
async (page) => {
const response = await page.request.head(url, {
timeout: 10000,
ignoreHTTPSErrors: false
});
return {
status: response.status(),
headers: response.headers()
};
}Status Interpretation
| Status Code | Category | Action |
| 200 | Success | Mark as working |
| 201-299 | Success | Mark as working |
| 301 | Permanent Redirect | Warn - update link |
| 302 | Temporary Redirect | Note redirect |
| 303, 307, 308 | Redirects | Note redirect |
| 400 | Bad Request | Error |
| 401, 403 | Auth Required | Warning |
| 404 | Not Found | Error - broken link |
| 405 | Method Not Allowed | Retry with GET |
| 429 | Rate Limited | Wait and retry |
| 500-599 | Server Error | Error |
| Timeout | No Response | Error |
Handling Redirects
Track redirect chains:
const checkLink = async (url) => {
const redirects = [];
let currentUrl = url;
let maxRedirects = 5;
while (maxRedirects > 0) {
const response = await fetch(currentUrl, {
method: 'HEAD',
redirect: 'manual'
});
if (response.status >= 300 && response.status < 400) {
const location = response.headers.get('location');
redirects.push({ from: currentUrl, to: location, status: response.status });
currentUrl = new URL(location, currentUrl).href;
maxRedirects--;
} else {
return { finalStatus: response.status, redirects };
}
}
return { error: 'Too many redirects', redirects };
};Depth Crawling
Algorithm
function crawl(startUrl, maxDepth):
visited = Set()
toVisit = [(startUrl, 0)] // (url, depth)
results = []
while toVisit not empty:
(url, depth) = toVisit.pop()
if url in visited or depth > maxDepth:
continue
visited.add(url)
pageLinks = extractLinks(url)
results.extend(validateLinks(pageLinks))
if depth < maxDepth:
for link in pageLinks:
if isInternal(link) and link not in visited:
toVisit.append((link, depth + 1))
return resultsPerformance Considerations
| Depth | Typical Links | Time |
| 1 | 20-100 | 10-30s |
| 2 | 100-500 | 1-5 min |
| 3 | 500-2000+ | 5-20 min |
Tips:
- Default to depth 1
- Use
--internal-onlyto reduce scope - Parallelize requests where possible
Report Generation
Data Structure
const linkReport = {
url: 'https://example.com',
checkedAt: '2025-01-06T14:30:00Z',
summary: {
total: 47,
working: 44,
broken: 2,
redirects: 3,
skipped: 1
},
broken: [
{ url: '/old-page', foundOn: '/', status: 404 },
],
redirects: [
{ url: '/blog', redirectsTo: '/news', status: 301 },
],
warnings: [
{ type: 'javascript-link', url: 'javascript:void(0)', foundOn: '/nav' },
],
byPage: {
'/': { checked: 15, broken: 1 },
'/about': { checked: 8, broken: 1 },
}
};Report Sections
- Summary: Quick overview of link health
- Broken Links: 404s and errors (highest priority)
- Redirects: Links that should be updated
- Warnings: javascript: links, slow responses, etc.
- By Page: Where issues were found
Integration with User Testing
When --check-links is added to /user-test:
During Test
- As persona navigates, collect all unique links seen
- Don't interrupt persona flow for link checking
- Store links for post-test validation
After Test
- Validate all collected links
- Add "Link Health" section to report
- Note any broken links encountered during tasks
Report Section
## Link Health
### Summary
- **Links Encountered**: 32
- **Working**: 30 (94%)
- **Broken**: 2 (6%)
### Broken Links Found During Testing
| Link | Encountered During | Status |
|------|-------------------|--------|
| /products/sale | Browsing products | 404 |
| /help/faq | Looking for help | 404 |
### Impact on User Experience
The persona encountered 2 broken links during their journey,
which could cause confusion and frustration.Best Practices
- Check internal links first: External sites may block or rate limit
- Respect robots.txt: For external sites
- Handle timeouts gracefully: Some servers are slow
- Track over time: Links break gradually
- Fix redirects: Replace with final destination
- Don't hammer servers: Add delays between requests
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
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.

