ワンクリックで
tests-local-test-local-site-links
// Check all links and anchors on the local development server using lychee link checker.
// Check all links and anchors on the local development server using lychee link checker.
Analyze an article and add relevant internal links from both SLG and ITA projects. Use when the user asks to add internal or cross-project links to an article.
Verify all claims, numbers, deadlines, and legal references in an article against official sources. Use when the user asks to fact-check or verify article content before publication.
Prepare an article for publication by running internal link addition and fact-checking in parallel. Use when the user asks to finalize, prepare, or get an article ready for publishing.
Translate approved Russian content to Ukrainian, English, and Spanish. Use when the user asks to translate an article or content to other languages.
Write or edit article content in the author's authentic voice. Use when the user asks to write, create, or edit an article, blog post, or content for the Spain Life Guide site.
Run all local validation checks that don't require network access to the live site.
| name | tests-local-test-local-site-links |
| description | Check all links and anchors on the local development server using lychee link checker. |
| user-invocable | false |
| allowed-tools | Bash(lychee *), Bash(curl *), Bash(which *) |
Check all links and anchors on the LOCAL development server (http://localhost:4001) using lychee link checker.
lychee must be installed:
brew install lychee
LOCAL Jekyll server must be running:
bundle exec jekyll serve --port 4001
The server should be accessible at http://localhost:4001
Check if lychee is installed:
which lychee || echo "lychee not found - install with: brew install lychee"
Check if LOCAL server is running:
curl -s -o /dev/null -w "%{http_code}" http://localhost:4001/ || echo "LOCAL server not running - start with: bundle exec jekyll serve"
Run lychee for each page with anchor fragment checking enabled:
lychee --include-fragments --exclude "bit.ly" "URL" 2>&1
The --exclude "bit.ly" flag skips bit.ly links (tested separately in /tests:prod:test-bitly-links to avoid inflating Bitly analytics).
Run all 12 checks in parallel using the Task tool for efficiency, or run sequentially:
# Example for one page:
lychee --include-fragments --exclude "bit.ly" "http://localhost:4001/" 2>&1
Parse the output for each page:
Some links may show errors but are false positives:
## LOCAL Site Link Check Results
| Page | Total | OK | Redirects | Excluded | Errors | Status |
|------|-------|-----|-----------|----------|--------|--------|
| RU Index (/) | 50 | 45 | 3 | 2 | 0 | ✅ |
| EN Index (/en/) | 50 | 45 | 3 | 2 | 0 | ✅ |
| UA Index (/ua/) | 50 | 45 | 3 | 2 | 0 | ✅ |
| ES Index (/es/) | 50 | 45 | 3 | 2 | 0 | ✅ |
| RU Mortgage | 45 | 42 | 2 | 1 | 0 | ✅ |
| EN Mortgage | 45 | 42 | 2 | 1 | 0 | ✅ |
| UA Mortgage | 45 | 42 | 2 | 1 | 0 | ✅ |
| ES Mortgage | 45 | 42 | 2 | 1 | 0 | ✅ |
| RU Why Valencia | 20 | 18 | 1 | 1 | 0 | ✅ |
| EN Why Valencia | 20 | 18 | 1 | 1 | 0 | ✅ |
| UA Why Valencia | 20 | 18 | 1 | 1 | 0 | ✅ |
| ES Why Valencia | 20 | 18 | 1 | 1 | 0 | ✅ |
Note: Total = OK + Redirects + Excluded + Errors
## ❌ Errors Found
### RU Index (/)
1. [ERROR] http://localhost:4001/#broken-anchor | Cannot find fragment
2. [ERROR] https://broken-link.com | Network error
### Action Required
- Fix broken links listed above
- For anchor errors: verify the target section exists on the page
End with a clear summary:
## Final Status
✅ **ALL LOCAL LINKS VALID** - All 12 pages passed (X total links, Y anchors verified)
OR
## Final Status
❌ **LOCAL ISSUES FOUND** - X broken link(s) across Y page(s)
Action required: Fix the errors listed above before deploying.
--include-fragments enables anchor/fragment checking (critical for internal navigation)localhost (not 127.0.0.1) to match Jekyll's generated URLs and get accurate link counts