ワンクリックで
tests-local-test-and-update-internal-links
// Verify internal links database integrity and update with new pages/anchors.
// Verify internal links database integrity and update with new pages/anchors.
Analyze article and automatically insert relevant internal and external links from both ITA and SLG projects. Use when user asks to add links to an article or improve article cross-linking.
Perform thorough fact-checking of an article against authoritative official sources. Use when user asks to verify facts, check article accuracy, or validate claims before publication.
Prepare article for publication by running all pre-publication checks (internal links + fact-check) in parallel. Use when user asks to finalize, prepare for publication, or do final checks on an article.
Translate approved Russian content to Ukrainian, English, and Spanish. Use when user asks to translate an article or content to other languages, or after an article has been approved in Russian.
Write or edit article content in the author's authentic voice. Use when writing new articles, editing existing content, or when user provides notes/dictated content to turn into an article about being autónomo or SL in Spain.
Run all LOCAL validation checks that don't require network access to the live site.
| name | tests-local-test-and-update-internal-links |
| description | Verify internal links database integrity and update with new pages/anchors. |
| user-invocable | false |
| allowed-tools | Read, Glob, Grep, Bash, Task, Edit |
Verify internal links database integrity and update with new pages/anchors. This skill:
The internal links database (internal_links_{lang}.json) tracks:
/ (EN), /ru/, /ua/, /es/#reliable-gestors, #надежные-хесторы)Note: ITA has one main index page per language. All content is organized as sections (anchors) on these pages.
Run this after adding/modifying content or before deploying to ensure all internal links work.
_resources/internal_links_en.json - English (default)_resources/internal_links_ru.json - Russian_resources/internal_links_ua.json - Ukrainian_resources/internal_links_es.json - Spanish{
"description": "All internal links for Russian version",
"language": "ru",
"generated_at": "2025-01-21",
"pages": [
{
"path": "/ru/",
"url": "https://itautonomos.com/ru/",
"title": "Autónomo - Полное Руководство",
"description": "Main page with all sections about autónomo in Spain",
"anchors": ["надежные-хесторы", "регистрация-autónomo-пошагово", ...]
}
]
}
Convert path from JSON to HTML file:
/ → _site/index.html/ru/ → _site/ru/index.html/ua/ → _site/ua/index.html/es/ → _site/es/index.htmlThe following ID patterns are excluded from anchor tracking (technical IDs, not content anchors):
| Pattern | Description |
|---|---|
*-contact-form* | Contact form element IDs (including language-suffixed variants like -contact-form-en) |
hs-script-loader | HubSpot script loader ID |
| UUID patterns | Auto-generated IDs like f47ac10b-58cc-4372-a567-0e02b2c3d479 |
IMPORTANT: The _site/ directory must exist with compiled HTML files. If it doesn't exist, run:
bundle exec jekyll build
Check if _site/ exists
ls _site/index.html
If files don't exist, inform the user to run bundle exec jekyll build first.
For each language, read internal_links_{lang}.json
For each page in the pages array:
path to HTML file pathgrep -oE 'id="[^"]+"' HTML_FILE | sed 's/id="//;s/"$//' | grep -v -E '(-contact-form|^hs-script-loader$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$)' | sort -u
anchors array for that pageRun all page scans in parallel using the Task tool for efficiency.
## Anchor Check & Update Results
### English (internal_links_en.json)
| Page | In Database | In HTML | New | Removed |
|------|-------------|---------|-----|---------|
| / (main) | 150 | 150 | 0 | 0 |
### Russian (internal_links_ru.json)
| Page | In Database | In HTML | New | Removed |
|------|-------------|---------|-----|---------|
| /ru/ (main) | 151 | 153 | 2 | 0 |
IMPORTANT: Missing anchors indicate potential broken links!
## ❌ Missing Anchors (in database but NOT in HTML)
These anchors may have been renamed without adding legacy anchors. URLs pointing to them will break!
### RU - /ru/ (1 missing)
1. `старое-название`
- URL: https://itautonomos.com/ru/#старое-название
- Fix: Add legacy anchor before renamed heading:
```markdown
<span id="старое-название" class="legacy-anchor"></span>
## Новое Название
```
## 🆕 New Anchors Found (in HTML but not in database)
These can be added to the database for future tracking.
### RU - /ru/ (2 new)
1. `новый-раздел`
2. `дополнительная-информация`
After showing the report:
If missing anchors found: Stop and warn the user. These need legacy anchors BEFORE proceeding.
If new anchors found (and no missing): Ask user if they want to add them to the database
If user confirms: Update the JSON files:
pages arrayanchors arraygenerated_at to current date## Final Status
✅ **ALL CHECKS PASSED** - No missing anchors, database is up to date.
OR
## Final Status
✅ **DATABASE UPDATED** - All checks passed.
Updated files:
- _resources/internal_links_ru.json: /ru/ (+2 anchors)
- _resources/internal_links_ua.json: /ua/ (+1 anchor)
OR
## Final Status
❌ **MISSING ANCHORS FOUND** - X anchor(s) missing across Y page(s).
Action required: Add legacy anchors for the missing IDs listed above, then rebuild and re-run this command.
bundle exec jekyll build) before running this skill