Vue Router Best Practices

Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.

3,356 stars 199 forksFrontend & Design Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add vuejs-ai/skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add vuejs-ai/skills --skill vue-router-best-practices
Manual install
git clone --depth 1 https://github.com/vuejs-ai/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/skills/vue-router-best-practices ~/.claude/skills/vue-router-best-practices

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

Vue Router best practices, common gotchas, and navigation patterns.

### Navigation Guards
- Navigating between same route with different params → See [router-beforeenter-no-param-trigger](reference/router-beforeenter-no-param-trigger.md)
- Accessing component instance in beforeRouteEnter guard → See [router-beforerouteenter-no-this](reference/router-beforerouteenter-no-this.md)
- Navigation guard making API calls without awaiting → See [router-guard-async-await-pattern](reference/router-guard-async-await-pattern.md)
- Users trapped in infinite redirect loops → See [router-navigation-guard-infinite-loop](reference/router-navigation-guard-infinite-loop.md)
- Navigation guard using deprecated next() function → See [router-navigation-guard-next-deprecated](reference/router-navigation-guard-next-deprecated.md)

### Route Lifecycle
- Stale data when navigating between same route → See [router-param-change-no-lifecycle](reference/router-param-change-no-lifecycle.md)
- Event listeners persisting after component unmounts → See [router-simple-routing-cleanup](reference/router-simple-routing-cleanup.md)

### Setup
- Building production single-page application → See [router-use-vue-router-for-production](reference/router-use-vue-router-for-production.md)
Read the full skill on GitHub

Details

Skill name
vue-router-best-practices
Path
skills/vue-router-best-practices/SKILL.md
License
MIT
Repo updated
23 October 2026
Copies
Found in 3 GitHub repos

FAQ

What does the Vue Router Best Practices skill do?

Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.

How do I install the Vue Router Best Practices skill?

Claude Code plugin: /plugin marketplace add vuejs-ai/skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Vue Router Best Practices popular?

It lives in vuejs-ai/skills, which has 3,356 GitHub stars and 199 forks.

Related skills

Vue Best Practices

3.4k

vuejs-ai/skills

MUST be used for Vue.js tasks. Strongly recommends Composition API with `<script setup>` and TypeScript as the standard approach. Covers Vue 3, SSR, Volar, vue-tsc. Load for any Vue, .vue files, Vue Router, Pinia, or Vite with Vue work. ALWAYS use Composition API unless the project explicitly requires Options API.

Frontend & Design199

Vue Testing Best Practices

3.4k

vuejs-ai/skills

Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.

Testing & QA199

Create Adaptable Composable

3.4k

vuejs-ai/skills

Create a library-grade Vue composable that accepts maybe-reactive inputs (MaybeRef / MaybeRefOrGetter) so callers can pass a plain value, ref, or getter. Normalize inputs with toValue()/toRef() inside reactive effects (watch/watchEffect) to keep behavior predictable and reactive. Use this skill when user asks for creating adaptable or reusable composables.

Frontend & Design199

Wiki Vitepress

3.2k

microsoft/skills

Packages generated wiki Markdown into a VitePress static site with dark theme, dark-mode Mermaid diagrams with click-to-zoom, and production build output. Use when the user wants to create a browsable website from generated wiki pages.

Frontend & DesignIn 2 lists372

UI Widget Developer

3.2k

microsoft/skills

Build MCP servers for Copilot Chat using the OpenAI Apps SDK or MCP Apps SDK widget rendering support (any language). Use this skill when: - Creating MCP servers that integrate with M365 Copilot declarative agents - Building rich interactive widgets (React + Fluent UI) that render in Copilot Chat - Implementing tools that return structuredContent for widget rendering - Adapting an existing MCP server to support Copilot widget rendering - Setting up devtunnels for localhost MCP server exposure - Configuring mcpPlugin.json manifests with RemoteMCPServer runtime Do NOT use this skill for general

Frontend & DesignIn 2 lists372

Zustand Store Ts

3.2k

microsoft/skills

Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state/action separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.

Frontend & DesignIn 2 lists372

Browse the most popular Claude skills, all frontend & design skills, or write your own with the skills generator.