Skip to main content
link-validator Comprehensive link checking and validation for documentation. Validate internal links, external URLs, anchors, detect redirects, monitor link rot, and generate sitemap validation reports.
الانتقال إلى التثبيت سوق المهارات اكتشف واستكشف مهارات الذكاء الاصطناعي التي بناها المجتمع.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
نسخ Promptعرض تفاصيل Prompt يتجاوز الأمر المباشر Prompt المخصّص للمراجعة. افحص المصدر قبل تشغيله.
npx skills add https://github.com/a5c-ai/babysitter --skill link-validatorيبقى الأمر في سطر واحد. مرّر أفقيًا لمراجعته كاملًا قبل النسخ.
تفضّل نسخة محلية؟ نزّل الملفات المتاحة حاليًا لدى SkillsMP.
تحميل Zip جاري التحميل... المزيد من هذا المستودع Reference for querying the Atlas knowledge graph through its MCP tools — the SECONDARY enrichment/comparison layer that adds best-practice context to systems you have ALREADY scanned from your real sources (`az`, repos, dirs). Use when you need to look up nodes, edges, kinds, clusters, stats, or wiki pages in Atlas to compare against your real inventory. (atlas graph, query atlas, atlas mcp, search the graph, graph neighbors, atlas record, atlas kinds, enrichment layer)
Atlas turns your STATED NEED into a real systems atlas by SCANNING your actual sources (Azure via `az`, git repos, local dirs) and process/data mining them, THEN enriching against the Atlas knowledge graph. Use this skill when asked to inventory/map your real systems, scan your cloud + repos + directories, mine the real processes or data they contain, or collect their real constraints/gotchas. (atlas, scan my systems, inventory our azure account, map my repos, real systems atlas, process mining, data mining, collect nuances, system discovery)
assimilate-popular-workflows This skill should be used when the user asks to "find skills in the wild", "assimilate popular workflows", "discover SKILL.md files in repos", "research external skills", "find workflow patterns", "survey the skill landscape", "what skills exist out there", or wants to investigate public repositories for extractable processes, babysitter plugins, and reusable procedural insights. Searches GitHub for SKILL.md files, classifies repos by archetype, and maintains structured research under docs/reference-repos/.
المهن ذات الصلة SOC
استنادا إلى تصنيف SOC المهني
name link-validator description Comprehensive link checking and validation for documentation. Validate internal links, external URLs, anchors, detect redirects, monitor link rot, and generate sitemap validation reports. allowed-tools Read, Write, Edit, Bash, Glob, Grep backlog-id SK-009 metadata {"author":"babysitter-sdk","version":"1.0.0"} graph {"domains":["domain:software-engineering"],"specializations":["specialization:technical-documentation"],"skillAreas":["skill-area:docs-as-code","skill-area:code-analysis-linting"],"roles":["role:technical-writer","role:documentation-engineer"]}
Link Validation Skill
Comprehensive link checking and validation for documentation.
Capabilities
Internal link validation (cross-references)
External URL checking with retry logic
Anchor/fragment validation
Redirect detection and updating
Link rot monitoring and reporting
Archive.org fallback suggestions
sitemap.xml validation
Link accessibility checking
Usage Invoke this skill when you need to:
Validate all links in documentation
Check for broken external URLs
Verify anchor references
Detect and fix redirects
Monitor link health over time
Inputs Parameter Type Required Description inputPath string Yes Path to documentation directory action string Yes validate, monitor, fix-redirects checkExternal boolean No Check external URLs (default: true) timeout number No Request timeout in seconds retries number No Retry count for failed requests allowedDomains array No Domains to always allow blockedDomains array No Domains to skip checking
Input Example {
"inputPath" : "./docs" ,
"action" : "validate" ,
"checkExternal" : true ,
"timeout" : 30 ,
"retries" : 3
}
Output Structure
Validation Report {
"summary" : {
"total" : 342 ,
"valid" : 325 ,
"broken" : 12 ,
"redirected" : 5 ,
"skipped" : 0
} ,
"internal" : {
"total" : 180 ,
"valid" : 178 ,
"broken" : 2
} ,
"external" : {
"total" : 162 ,
"valid" : 147 ,
"broken" : 10 ,
"redirected" : 5
} ,
"issues" : [
{
"type" : "broken" ,
"url" : "https://api.example.com/v1/docs" ,
"status" : 404 ,
"source" : {
"file" : "docs/api/authentication.md" ,
"line" : 42 ,
"text" : "[API Documentation](https://api.example.com/v1/docs)"
} ,
"suggestion" : {
"archived" : "https://web.archive.org/web/20250101/https://api.example.com/v1/docs" ,
"alternative" : null
}
} ,
{
"type" : "redirect" ,
"url" : "http://example.com/old-page" ,
"redirectTo" : "https://example.com/new-page" ,
"status" : 301 ,
"source" : {
"file" : "docs/guides/migration.md" ,
"line" : 15
} ,
"suggestion" : "Update to: https://example.com/new-page"
} ,
{
"type" : "anchor-missing" ,
"url" : "api/users.md#create-user" ,
"source" : {
"file" : "docs/quickstart.md" ,
"line" : 28
} ,
"suggestion" : "Heading 'create-user' not found. Available: create, update, delete"
}
] ,
"performance" : {
"duration" : 45.2 ,
"requestsMade" : 162 ,
"avgResponseTime" : 245
}
}
Configuration
linkcheck.config.json {
"input" : "./docs" ,
"output" : "./reports/linkcheck.json" ,
"options" : {
"checkExternal" : true ,
"checkAnchors" : true ,
"checkImages" : true ,
"followRedirects" : true ,
"timeout" : 30000 ,
"retries" : 3 ,
"retryDelay" : 1000 ,
"concurrency" : 10 ,
"userAgent" : "Mozilla/5.0 LinkChecker/1.0"
} ,
"allowed" : {
"statusCodes" : [ 200 , 201 , 204 ] ,
"domains" : [ "localhost" , "127.0.0.1" ] ,
"patterns" : [ "^https://internal\\.example\\.com" ]
} ,
"blocked" : {
"domains" : [ "archive.org" ] ,
"patterns" : [ "^https://twitter\\.com" ]
} ,
"replacements" : {
"http://example.com" : "https://example.com" ,
"/docs/v1/" : "/docs/v2/"
}
}
Link Types
Internal Links <!-- Relative path links -->
[Getting Started ](./getting-started.md )
[API Reference ](../api/index.md )
<!-- Anchor links -->
[Configuration ](#configuration )
[API Users ](./api/users.md#create-user )
<!-- Image links -->

External Links <!-- Standard external links -->
[GitHub ](https://github.com )
[Documentation ](https://docs.example.com/guide )
<!-- Links with anchors -->
[MDN Array ](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array#instance_methods )
Validation Rules
Internal Link Rules const internalRules = {
fileExists : {
severity : 'error' ,
check : (link, context ) => {
const resolvedPath = resolvePath (link, context.file );
return fs.existsSync (resolvedPath);
}
},
anchorExists : {
severity : 'error' ,
check : (link, context ) => {
const [file, anchor] = link.split ('#' );
if (!anchor) return true ;
const headings = extractHeadings (file);
return headings.some (h => slugify (h) === anchor);
}
},
caseSensitive : {
severity : 'warning' ,
check : (link, context ) => {
const actual = findActualPath (link);
return link === actual;
}
}
};
External Link Rules const externalRules = {
statusOk : {
severity : 'error' ,
check : async (url) => {
const response = await fetch (url, { method : 'HEAD' });
return response.ok ;
}
},
httpsPreferred : {
severity : 'warning' ,
check : (url ) => {
return url.startsWith ('https://' ) || isLocalhost (url);
}
},
noRedirects : {
severity : 'info' ,
check : async (url) => {
const response = await fetch (url, { redirect : 'manual' });
return !response.headers .get ('location' );
}
}
};
Link Rot Monitoring
Scheduled Checks
name: Link Check
on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
jobs:
check-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check links
uses: lycheeverse/lychee-action@v1
with:
args: --verbose --no-progress './docs/**/*.md'
fail: true
- name: Create issue on failure
if: failure()
uses: actions/github-script@v7
with:
script: |
github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: 'Broken links detected',
body: 'Weekly link check found broken links. See workflow run for details.',
labels: ['documentation', 'bug']
})
Historical Tracking {
"history" : [
{
"date" : "2026-01-24" ,
"total" : 342 ,
"broken" : 12 ,
"new_broken" : 3 ,
"fixed" : 1
} ,
{
"date" : "2026-01-17" ,
"total" : 340 ,
"broken" : 10 ,
"new_broken" : 2 ,
"fixed" : 0
}
] ,
"trends" : {
"avg_broken_per_week" : 2.5 ,
"most_problematic_domains" : [
{ "domain" : "api.example.com" , "broken_count" : 5 } ,
{ "domain" : "old-docs.example.com" , "broken_count" : 3 }
]
}
}
Archive.org Integration
Fallback Suggestions async function findArchiveUrl (brokenUrl ) {
const archiveApi = `https://archive.org/wayback/available?url=${encodeURIComponent (brokenUrl)} ` ;
try {
const response = await fetch (archiveApi);
const data = await response.json ();
if (data.archived_snapshots ?.closest ) {
return {
available : true ,
url : data.archived_snapshots .closest .url ,
timestamp : data.archived_snapshots .closest .timestamp
};
}
} catch (error) {
}
return { available : false };
}
Sitemap Validation
sitemap.xml Check async function validateSitemap (sitemapUrl ) {
const response = await fetch (sitemapUrl);
const xml = await response.text ();
const urls = parseSitemapXml (xml);
const results = await Promise .all (
urls.map (async (url) => {
const check = await checkUrl (url.loc );
return {
url : url.loc ,
lastmod : url.lastmod ,
status : check.status ,
valid : check.valid
};
})
);
return {
total : urls.length ,
valid : results.filter (r => r.valid ).length ,
invalid : results.filter (r => !r.valid ),
missingLastmod : results.filter (r => !r.lastmod ).length
};
}
Workflow
Scan files - Find all Markdown files
Extract links - Parse internal and external links
Validate internal - Check file and anchor existence
Validate external - HTTP requests with retries
Check anchors - Verify fragment identifiers
Detect redirects - Note permanent redirects
Generate report - Output findings and suggestions
Dependencies {
"devDependencies" : {
"linkinator" : "^6.0.0" ,
"markdown-link-check" : "^3.11.0" ,
"lychee" : "^0.14.0" ,
"node-fetch" : "^3.3.0"
}
}
CLI Commands
npx linkinator ./docs --recurse --format json > report.json
find docs -name '*.md' -exec npx markdown-link-check {} \;
lychee './docs/**/*.md' --format json --output report.json
node scripts/fix-redirects.js --input docs/ --report report.json
Best Practices Applied
Run link checks in CI/CD
Monitor external links weekly
Update redirected links promptly
Use relative links for internal references
Include archive.org fallbacks for important links
Allowlist known-good domains
References
Target Processes
docs-testing.js
docs-audit.js
docs-pr-workflow.js