mcpField
V
vue-router-best-practices

vue-router-best-practices

github.com/antfuDevelopment6.0k18.8k installsUpdated 6d ago
Repository

About vue-router-best-practices

A reference skill for Vue Router navigation and route lifecycle practices. It helps Vue developers recognize common routing pitfalls and choose documented patterns.

Key features

  1. 01Navigation guard patterns
  2. 02Route parameter change behavior
  3. 03Lifecycle and listener cleanup
  4. 04Production SPA setup guidance

Use cases

  1. 01Debugging guards that fail to await API calls
  2. 02Preventing redirect loops
  3. 03Refreshing data after route parameter changes

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/antfu/skills --skill vue-router-best-practices

After installing, type/vue-router-best-practicesin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

LICENSE.md
SYNC.md
reference/
router-beforeenter-no-param-trigger.md
router-beforerouteenter-no-this.md
router-guard-async-await-pattern.md
router-navigation-guard-infinite-loop.md
router-navigation-guard-next-deprecated.md
router-param-change-no-lifecycle.md
router-simple-routing-cleanup.md
router-use-vue-router-for-production.md

Details

From the project README

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

Navigation Guards
Route Lifecycle
Setup

Comments

Markdown supported