link-relevance

$npx mdskill add MicrosoftDocs/cloud-adoption-framework/link-relevance

Verify Microsoft Learn link text accuracy by comparing link anchors to destination page content.

  • Ensures technical documentation links accurately reflect the destination page's topic.
  • Integrates with `microsoft_docs_fetch` and `microsoft_docs_search` for content validation.
  • Compares extracted link text against fetched page titles, fixing only misleading anchors.
  • Outputs corrected relative paths, updating text only when factual mismatches occur.

SKILL.md

.github/skills/link-relevanceView on GitHub ↗
---
name: link-relevance
description: Verifies that Microsoft Learn link text matches the destination page content. Use when asked to check link accuracy or link text quality.
---

You are a link relevance checker for Azure technical documentation. Verify Microsoft Learn hyperlinks point to pages matching the link text.

## Scope

- **Validate**: Markdown links to learn.microsoft.com or relative `/azure/`, `/entra/`, `/purview/`, `/fabric/`, `/training/` paths
- **Skip**: External URLs, local file refs (`./`, `../`, `*.md`, `*.yml`), bare URLs, generic text ("learn more", "see here", "documentation")
- Never convert local relative paths to absolute `/azure/` URLs

## Process

1. Extract all in-scope links. Do not skip links that look "close enough" — titles change over time.
2. For each link, call `microsoft_docs_fetch` to get the actual page title/H1. Compare the link text to the page title.
3. Update the link text ONLY when it is misleading or factually wrong about the destination. Do NOT replace contextually-appropriate descriptive link text with the page title.
   - Example: if the sentence says "Use X to [limit user rights](/azure/...)" and the page title is "FAQ", keep the original text because it describes the action the reader should take.
   - If the page no longer exists, use `microsoft_docs_search` to find the replacement URL.

## Constraints

- Max 15 links through MCP
- Don't add/remove/restructure links — only fix mismatches
- Output relative paths only (no `https://learn.microsoft.com`, no `/en-us/`)
- Preserve anchors (`#section`) when the base URL is correct
- When updating a URL, also update link text if the new page title clearly differs

## What to ignore

YAML metadata, code blocks, link text quality, broken links/redirects (link checking handles those).

More from MicrosoftDocs/cloud-adoption-framework

SkillDescription
acronym-checkEnsures abbreviations are expanded on first use per Microsoft style. Use when asked to check acronyms or abbreviations in documentation.
active-voiceRewrites passive voice to active/imperative and enforces second person. Use when asked to fix passive voice or improve writing directness.
api-consistencyEnsures Azure REST API and CLI consistency across a document. Use when asked to check API calls, CLI parameters, or REST consistency.
azure-validationValidates portal navigation paths, detects contradictions against Microsoft Learn documentation, and checks alignment with current Azure implementation standards. Use when asked to verify Azure portal instructions or validate content accuracy.
check-accessibilityChecks image accessibility compliance per Microsoft Learn standards. Use when asked to review images for alt text, lightbox paths, or complex image markup.
check-relevanceAssesses whether guidance is still relevant and framed for modern Azure approaches. Use when asked to check if content is still current or strategically relevant.
cloud-adoptionHow to adopt and integrate the Microsoft Azure cloud into your organization. Strategy, policies, organizational readiness, architecture, platform landing zone, governance, security, health, and operations.
code-expertIdentifies definite errors in code samples including syntax errors, missing imports, and deprecated APIs. Use when asked to review code samples for correctness.
code-freshnessReviews code samples for modern patterns, deprecated APIs, outdated dependencies, and alignment with current Microsoft best practices. Use when asked to update or modernize code samples.
code-verifierVerifies code samples against official Microsoft/Azure examples and syntax rules. Use when asked to verify code correctness or validate API usage.