router
Generates src/router/index.ts with Vue Router configuration, hash-based routing, and navigation guards for route protection.
When & Why to Use This Skill
This Claude skill automates the generation of Vue Router configurations, providing a ready-to-use `src/router/index.ts` file. It streamlines web development by implementing hash-based routing, essential navigation guards for route protection, and default views, ensuring a secure and structured navigation foundation for Vue.js applications.
Use Cases
- Initial Project Setup: Quickly scaffold the routing architecture for new Vue.js applications with best-practice configurations and boilerplate code.
- Route Protection: Automatically implement navigation guards to secure private pages and manage user access control logic efficiently.
- Standardized Navigation: Ensure consistent routing patterns across projects, including automatic setup for Home and 404 'Page Not Found' screens.
| name | router |
|---|---|
| description | Generates src/router/index.ts with Vue Router configuration, hash-based routing, and navigation guards for route protection. |
Router Skill
Purpose
Generate the src/router/index.ts file with Vue Router configuration and navigation guards.
Output
Create the file: src/router/index.ts
Notes
- Uses hash-based routing
- Implements a navigation guards for example of usage
- Create 2 routes for home screen and page not found screen. If the view components skill mentions other files, create route for those files instead.
- All pages expect page not found page should have navigation guards.