Provides comprehensive guidance for Vue Router v4 including route configuration, navigation, nested routes, route guards, and Vue 3 integration. Use when the user asks about Vue Router v4, needs to set up routing for Vue 3 applications, implement navigation guards, or work with Vue Router v4 features.
View on GitHubpartme-ai/full-stack-skills
development-skills-utils
February 1, 2026
Select agents to install to:
npx add-skill https://github.com/partme-ai/full-stack-skills/blob/main/skills/vue-router-v4/SKILL.md -a claude-code --skill vue-router-v4Installation paths:
.claude/skills/vue-router-v4/## When to use this skill Use this skill whenever the user wants to: - Set up routing in a Vue 3 application - Configure routes, nested routes, and named routes - Implement navigation guards (global, per-route, in-component) - Use programmatic navigation with `router.push()`, `router.replace()`, etc. - Handle dynamic route matching and route parameters - Work with route meta fields and route records - Implement lazy loading and code splitting for routes - Use Vue Router with Composition API (`useRouter`, `useRoute`) - Configure different history modes (hash, HTML5 history, memory) - Handle scroll behavior and transitions - Implement typed routes with TypeScript - Migrate from Vue Router 3 to Vue Router 4 - Extend RouterLink component - Handle navigation failures and errors - Work with dynamic routing (adding/removing routes at runtime) ## How to use this skill This skill is organized to match the Vue Router official documentation structure (https://router.vuejs.org/guide/, https://router.vuejs.org/api/). When working with Vue Router: 1. **Identify the topic** from the user's request: - Getting started/快速开始 → `examples/essentials/getting-started.md` - Dynamic route matching/动态路由匹配 → `examples/essentials/dynamic-route-matching.md` - Routes matching syntax/路由匹配语法 → `examples/essentials/routes-matching-syntax.md` - Named routes/命名路由 → `examples/essentials/named-routes.md` - Nested routes/嵌套路由 → `examples/essentials/nested-routes.md` - Programmatic navigation/编程式导航 → `examples/essentials/programmatic-navigation.md` - Named views/命名视图 → `examples/essentials/named-views.md` - Redirect and alias/重定向和别名 → `examples/essentials/redirect-alias.md` - Passing props to route components/向路由组件传递 props → `examples/essentials/passing-props.md` - Different history modes/不同的历史模式 → `examples/essentials/different-history-modes.md` - Navigation guards/导航守卫 → `examples/advanced/navigation-guards.md` - Route meta fields/路由元信息 → `examples/advanced/route