Agent skill · Frontend

vue-router-best-practices

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

antfugithub.com/antfuGitHub ↗
claude-codeMIT
Install
npx skills add antfu/skills --skill vue-router-best-practices --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 11
SKILL.md size: 1 KB
Bundled scripts: none
Version: 1.0.0
Declared author: github.com/vuejs-ai
Path: skills/vue-router-best-practices/SKILL.md
Open the folder on GitHub →
Where it comes from
Source: antfu/skills
Stars: 5,709
Language: TypeScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

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-pr

What's inside
Steps it walks through
  1. Navigation Guards
  2. Route Lifecycle
  3. Setup
Ships with 10 files
  • LICENSE.md
  • SYNC.md
  • reference/router-beforeenter-no-param-trigger.md
  • reference/router-beforerouteenter-no-this.md
  • reference/router-guard-async-await-pattern.md
  • reference/router-navigation-guard-infinite-loop.md
  • reference/router-navigation-guard-next-deprecated.md
  • reference/router-param-change-no-lifecycle.md
  • reference/router-simple-routing-cleanup.md
  • reference/router-use-vue-router-for-production.md
More from skills
All skills →
About this skill
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 it?

Run `npx skills add antfu/skills --skill vue-router-best-practices --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From antfu/skills, a repository with 5,709 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going