Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

vue-router

Skill by TanStack

Gives AI assistants the Vue bindings for TanStack Router, covering composables, components and Vue-specific patterns. It is for developers building Vue apps with type-safe routing from @tanstack/vue-router.

  • Score 88
  • 15k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install vue-router

Built from the published package, never by AI.

git clone --depth 1 https://github.com/TanStack/router /tmp/router && mkdir -p ~/.claude/skills && cp -r /tmp/router/packages/vue-router/skills/vue-router ~/.claude/skills/vue-router

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install vue-router in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill documents the Vue-specific bindings for TanStack Router, published as @tanstack/vue-router. It covers the setup with Vite and file-based routing, the composables such as useParams, useSearch, useLoaderData and useNavigate, and the components such as Link, Outlet, Navigate and CatchBoundary. It also explains Vue patterns like Ref<T> returns, render functions with h(), provide/inject through router context, and computed refs.

The skill builds on the router-core skill and states that TanStack Router is client-first, with loaders running on the client by default. It warns that @tanstack/vue-router is different from the official vue-router library. It is aimed at Vue developers who want to use TanStack Router in their projects.

Written from the project's SKILL.md and checked against it.

What it can do

  • useRouterReturns the router instance, for example to call invalidate().
  • useRouterStateSubscribes to router state changes through a select function.
  • useNavigateReturns a function for navigating to a route with typed params.
  • useSearchReturns a Ref with the typed search params for a given route.
  • useParamsReturns a Ref with the typed path params for a given route.
  • useLoaderDataReturns a Ref with the data loaded for a given route.
  • useMatch and useMatchesReturn a single route match or all active route matches.
  • Link and OutletProvide type-safe navigation links and render the matched child route.
  • useBlockerBlocks navigation, for example to protect unsaved changes.
  • createRootRouteWithContextPasses app context such as auth state into routes via beforeLoad.

What you need

  • Node.js and npm to install the packages
  • A Vite project with Vue
  • @vitejs/plugin-vue-jsx for JSX or TSX route files
  • @tanstack/router-plugin with target set to 'vue'

Try asking

  • Set up TanStack Router with file-based routing in my Vue Vite app.
  • Show me how to read route params with useParams in a Vue component.
  • Add an auth check with beforeLoad and router context in my Vue routes.

Good to know

  • Loaders and beforeLoad run on the client by default.
  • Vue composables cannot be used inside beforeLoad or loader functions.
  • This is not the official vue-router library and its APIs differ.
  • The router plugin target must be set to 'vue', since the default is 'react'.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: packages/vue-router/skills/vue-router/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md10 KB

Alternatives to vue-router

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

vue-router: common questions

Is this the same as the official Vue Router?

No. The source says @tanstack/vue-router is a different library with a different API from vue-router, and it warns against mixing their imports.

Why do composables return a Ref?

Most composables return Ref<T>, so script code must read the value with .value. Templates unwrap the value automatically.

Can I use Vue composables in a route loader?

No. The source says beforeLoad and loader are plain async functions, so Vue composables cannot be used there. It suggests passing state through router context instead.

How do I install vue-router?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is vue-router free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is vue-router safe to use?

It scores 88 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to vue-router?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

vue-router Install

Add to stack

Loading.