vue-router-best-practices
Vue Router 4 patterns, navigation guards, and route-lifecycle best practices.
Works with
What it does
Covers five navigation guard patterns including async/await handling, deprecated next() function migration, infinite redirect loops, and param-change detection
Addresses route-lifecycle gotchas like stale data when navigating between same routes and event listener cleanup on component unmount
Includes guidance on beforeRouteEnter guard limitations, component instance access, and param-triggered navigation b
Installation Guide
How to use vue-router-best-practices on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- โบCursor installed and configured on your machine
- โบNode.js 16+ with npm โ verify with
node --version - โบActive project directory where you want to add
vue-router-best-practices
Run the install command
Execute the skills CLI command in your project's root directory to begin installation:
Fetches vue-router-best-practices from hyf0/vue-skills and configures it for Cursor.
Select Cursor when prompted
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate vue-router-best-practices. Access via /vue-router-best-practices in your agent's command palette.
Security Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Documentation
Vue Router best practices, common gotchas, and navigation patterns.
Navigation Guards
- Navigating between same route with different params โ See router-beforeenter-no-param-trigger
- Accessing component instance in beforeRouteEnter guard โ See router-beforerouteenter-no-this
- Navigation guard making API calls without awaiting โ See router-guard-async-await-pattern
- Users trapped in infinite redirect loops โ See router-navigation-guard-infinite-loop
- Navigation guard using deprecated next() function โ See router-navigation-guard-next-deprecated
Route Lifecycle
- Stale data when navigating between same route โ See router-param-change-no-lifecycle
- Event listeners persisting after component unmounts โ See router-simple-routing-cleanup
Setup
- Building production single-page application โ See router-use-vue-router-for-production
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort