Skip to content
SkillModel-led249 tokens in use

vue-router-best-practices

Vue Router 4 guidance for agents: navigation guards, redirect loops, route param changes and cleanup when components unmount.

3,364 stars on the repository MIT Licensevuejs-ai/skills · skills/vue-router-best-practices
npx skills add vuejs-ai/skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing vue-router-best-practices costs

24tokens idle
249tokens in use
10,086tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

Nothing detected: no shell, network, file writes, git or credentials in its files.

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Fair
  • Frontmatter11/15
  • Structure11/25
  • Examples3/15
  • Output0/15
  • Size15/15
  • Resources15/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent

No findings.

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Fair
  • Development activity68
  • Maintenance40
  • Community52
  • Maturity32
  • Momentum40

This skill gathers Vue Router 4 gotchas for an agent to apply. Its SKILL.md has three groups, Navigation Guards, Route Lifecycle and Setup, with one reference per entry.

Guard topics include beforeEnter not firing on param changes, no this in beforeRouteEnter, awaiting async calls, infinite redirect loops and the deprecated next() function. Lifecycle topics cover stale data when the same route is reused with other params and listeners left behind after unmounting.

What You Get

  • Five guard guides, from async await patterns to redirect loops
  • Two lifecycle guides on param changes and listener cleanup
  • A setup note on using Vue Router in production single-page apps
  • Each entry phrased as a symptom with a linked reference

Common Use Cases

  • Fixing a guard that never runs when only the route param changes
  • Breaking an infinite redirect loop in a navigation guard
  • Refreshing page data when a user moves between two items on the same route

What Makes It Unique

It covers the points where Vue Router differs from what a developer expects, such as param changes not mounting a component again. It is one of several focused Vue skills in the same repository.

Under The Hood

The agent loads a short Markdown index and reads the reference that matches the problem. There are no scripts. The skill does not tell the agent to fetch web pages, call APIs or run commands; the agent edits your router and component files when you ask for a fix.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers