Check URLs Skill
This skill scans all TypeScript source files for hardcoded http:// and https:// URLs and performs HTTP HEAD requests to verify each one resolves without a 4xx/5xx error.
When to Use This Skill
Use this skill when you need to:
- Validate links added to fluency hints or tips in
maturityScoring.ts - Check that VS Code docs URLs, tech.hub.ms video links, or any other hardcoded URLs are still live
- Audit the codebase after bulk URL changes to catch 404s before a release
- Routinely health-check external references as part of a maintenance pass
Running the Check
node .github/skills/check-urls/check-urls.js
The script will:
- Recursively scan every
*.tsfile undersrc/ - Extract all unique
https?://...URLs (strips trailing punctuation, skips template literals) - Send an HTTP HEAD request to each URL (with a 10-second timeout)
- If HEAD returns any 4xx status, automatically retry with GET — some servers (e.g. intent URLs, social sharing endpoints) return 404/405 for HEAD but correctly respond to GET
- Print a summary showing ✅ OK, ⚠️ REDIRECT, or ❌ BROKEN for every URL
- Exit with code
1if any URL returns a 4xx or 5xx status on both HEAD and GET, or times out
Interpreting Output
| Symbol | Meaning |
|---|---|
| ✅ OK | 2xx response — URL is live |
| ⚠️ REDIRECT | 3xx response — URL redirects; consider updating to the final destination |
| ❌ BROKEN | 4xx/5xx or connection failure — URL must be fixed |
After Finding Broken URLs
- 404 on tech.hub.ms: The slug may have changed or the page was removed. Check
https://tech.hub.msto find the replacement and updatesrc/maturityScoring.ts. - 404 on code.visualstudio.com: The VS Code docs may have been reorganised. Search VS Code docs for the relevant topic and update the link.
- Timeout: May be a transient network issue. Re-run the script to confirm before changing anything.
- After fixing, re-run
node .github/skills/check-urls/check-urls.jsto confirm all URLs resolve. - Run
npm --prefix vscode-extension run validateto confirm type-checking, linting, and the build still pass.
Files in This Directory
- SKILL.md — This file; instructions for the skill
- check-urls.js — Node.js script that performs the URL scan and resolution check
- README.md — Short overview of the skill