What problem does it solve?
Provides a clear, consistent set of rules and patterns for designing Vue Router 4 routes, navigation guards, lazy-loaded components, and type-safe route metadata so teams avoid oversized bundles, inconsistent navigation behavior, and runtime typing errors.
Core Features & Use Cases
- Route design & naming conventions: Standardizes path kebab-case, PascalCase route names, and view filename conventions to keep route maps predictable and maintainable.
- Lazy loading and module structure: Enforces dynamic imports for page components and suggests modular route files to enable code-splitting and easier scaling in large projects.
- Navigation guards & auth patterns: Prescribes global, route-level, and in-component guard patterns including safe Pinia usage and redirect behaviors for auth and role-based access.
- Type-safe RouteMeta & props handling: Recommends augmenting RouteMeta in a dedicated TypeScript file and using props function modes for correct parameter typing and conversion.
Quick Start
Apply the vue-router skill to review and refactor the project's router configuration to use dynamic imports, typed RouteMeta augmentation, consistent route naming, and appropriate navigation guards.