All skills
hyf0 avatar

/vue-router-best-practices

@bc922e4 official
by hyf0hyf0/vue-skills2.9k stars
167

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

Use this Skill: https://skilld.dev/gh/hyf0/vue-skills/vue-router-best-practices

This session only. Nothing lands on disk.

SKILL.md

β‰ˆ32 tokens always: the name and description. β‰ˆ320 when used: this file. β‰ˆ10k more on demand in 8 files.

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

Navigation Guards

Route Lifecycle

Setup

Source: SKILL.md on GitHub

No alerts16d5 checks Β· Risk SAFE
  • Gen Agent Trust Hub16d

    This skill is a collection of educational documentation and best practices for using Vue Router 4. It contains no executable code, network operations, or sensitive data access, and is focused entirely on providing guidance for frontend development patterns.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW Β· No issues

  • Runlayer7mo

    9 files scanned Β· No issues

  • ZeroLeaks5mo

    Score: 93/100 Β· 2 sections analyzed

Signed by skilld at bc922e4. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 8 months ago
version
1.0.0
author
github.com/vuejs-ai

README badge

README badge for hyf0/vue-skills/vue-router-best-practices

Teaches Vue Router 4 navigation guards, route lifecycle patterns, and common gotchas like stale data when params change and infinite redirect loops. Covers async/await in guards, beforeRouteEnter access patterns, and cleanup on component unmount.

Generated from the current SKILL.md.

Does this cover Vue Router 3 or Vue Router 4?
This skill targets Vue Router 4 specifically. It covers patterns and navigation guards in Vue 4's composition API context.
What are the main topics covered?
Navigation guards (beforeRouteEnter, beforeEach, infinite loops, async patterns), route lifecycle gotchas (stale data, cleanup), and production single-page app setup.
Does this address the deprecated next() function?
Yes. The skill includes guidance on replacing deprecated next() callbacks with modern return-based patterns in Vue Router 4.
Will this help with same-route navigation issues?
Yes. It covers both navigating to the same route with different params and stale data problems when component lifecycle hooks don't trigger on param changes.

Generated from the current SKILL.md. These answers refresh after source changes.