← スキル一覧に戻る

route-auditor-v1
by atiati82
⭐ 0🍴 0📅 2026年1月25日
SKILL.md
name: route-auditor-v1 description: Prevent 404s by validating all routes exist and are accessible
Route Auditor Skill v1.0
Purpose: Ensure every route has a valid page and every page has a valid route.
1) Non-Negotiables (Policy)
Routing Rules
- All routes MUST be defined in
client/src/App.tsx - Route path MUST match page filename (without
.tsx) - All pages in
client/src/pages/MUST have a corresponding route - Lazy loading REQUIRED for all page imports
Forbidden Patterns
- ❌ Dead links (href to non-existent routes)
- ❌ Orphan pages (pages without routes)
- ❌ Duplicate routes (same path defined twice)
- ❌ Missing lazy imports
2) Inputs & Outputs
Inputs (When to Run)
- After creating new pages
- After modifying
App.tsx - Before deployment
- As part of PR review
Output Contract
{
"status": "PASS" | "FAIL",
"totalRoutes": number,
"totalPages": number,
"issues": {
"orphanPages": ["string"],
"missingRoutes": ["string"],
"deadLinks": [
{
"source": "string",
"href": "string"
}
],
"duplicateRoutes": ["string"]
}
}
3) Quality Gates
Route Integrity Check
Run before any deployment:
npm run guard:routes
npm run guard:route-integrity
Comprehensive Audit
tsx scripts/audit-routes.ts
Dead Link Detection (Playwright)
npm run test:e2e -- tests/dead-link-crawler.spec.ts
Validation Scripts
Primary Scripts
| Script | Purpose |
|---|---|
scripts/guard-routes.ts | Quick route validation |
scripts/guard-route-order.ts | Check route ordering |
scripts/route-integrity-check.ts | Full integrity audit |
scripts/audit-routes.ts | Comprehensive audit |
Sitemap Validation
npm run guard:sitemap
Validates against ANDARA_SITEMAP_V1_3.md
Common Issues & Fixes
Orphan Page (page exists, no route)
// In App.tsx, add:
const NewPage = lazy(() => import('./pages/new-page'));
// In routes:
<Route path="/new-page" component={NewPage} />
Dead Link (link to non-existent route)
- Find the source file containing the bad link
- Either create the missing page/route, OR
- Update the link to point to existing route
Duplicate Route
- Search App.tsx for duplicate path definitions
- Remove the duplicate
- Ensure only one component handles the route
Integration with CI/CD
These guards run automatically:
{
"prebuild": "npm run guard:all",
"guard:routes": "tsx scripts/guard-route-order.ts",
"guard:sitemap": "tsx scripts/guard-routes.ts"
}
Build FAILS if any route issues detected.
スコア
総合スコア
40/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です