Agent skill

Vue Router Skilld

by skilld-dev in skilld-dev/vue-ecosystem-skills

ALWAYS use when writing code that imports "vue-router", "vue-router/vite", "vue-router/auto-routes", or "vue-router/experimental".

MITAuto-check passedDevelopment

Install Vue Router Skilld

skills CLI
$ npx skills add skilld-dev/vue-ecosystem-skills --skill vue-router-skilld -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install skilld-dev/vue-ecosystem-skills vue-router-skilld --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/skilld-dev/vue-ecosystem-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/vue-router-skilld .claude/skills/vue-router-skilld && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
vue-router-skilld
GitHub stars
181
Token cost
~2k tokens
SKILL.md length
528 words
Files
6 (incl. references)
Skills in repo
34
Repo updated
First seen
Licence
MIT

At a glance

ALWAYS use when writing code that imports "vue-router", "vue-router/vite", "vue-router/auto-routes", or "vue-router/experimental".

  • Writing code that imports vue-router
  • SKILL.md covers Import map, Quick start (classic routes), Quick start (file-based routing) and Core rules, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Vue-router/vite

What it does

Vue Router Skilld is an agent skill from skilld-dev/vue-ecosystem-skills. ALWAYS use when writing code that imports "vue-router", "vue-router/vite", "vue-router/auto-routes", or "vue-router/experimental". Consult for debugging, best practices, or modifying vue-router, vue router, router, file-based routing, typed routes, data loaders.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/core-api.md`, `references/data-loaders.md` and `references/file-based-routing.md`).

It sits in Development. It works with Vue.js, Vite and npm. The repository describes itself as: Agent Skills for the Vue ecosystem, written from current docs, issues, and releases. The licence is MIT.

When your agent uses it

  • Writing code that imports vue-router
  • Vue-router/vite
  • Vue-router/auto-routes
  • Vue-router/experimental

Example prompts

  • “vue-router”
  • “vue-router/vite”
  • “vue-router/auto-routes”
  • “/vue-router-skilld”

What it can do on your machine

Read from SKILL.md and the folder at commit c8994af. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • router.vuejs.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Vue Router Skilld loads about 2k tokens when it runs, and up to ~8.4k if it reads all its reference files. Until then it costs about 70 tokens; SKILL.md has 528 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from skilld-dev/vue-ecosystem-skills at commit c8994af, republished under its MIT licence (© skilld-dev). 528 words, ~2,036 tokens.

Download SKILL.mdSave it as .claude/skills/vue-router-skilld/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
vue-router-skilld
description
ALWAYS use when writing code that imports "vue-router", "vue-router/vite", "vue-router/auto-routes", or "vue-router/experimental". Consult for debugging, best practices, or modifying vue-router, vue router, router, file-based routing, typed routes, data loaders.

vuejs/router vue-router@5.3.1

Prepared source: vue-router@5.3.1, ESM package ("type": "module", package.json:2,20). Peers: vue ^3.5.34 || ^4.0.0; optional vite ^7.3.0 || ^8.0.0, pinia ^3.0.4 || ^4.0.2, @pinia/colada >=0.21.2 (package.json:173-193). Docs: https://router.vuejs.org

Import map

ImportUse for
vue-routercreateRouter, createWebHistory, createWebHashHistory, createMemoryHistory, RouterLink, RouterView, useRouter, useRoute, useLink, onBeforeRouteLeave, onBeforeRouteUpdate, isNavigationFailure, NavigationFailureType, START_LOCATION, parseQuery, stringifyQuery (dist/vue-router.d.ts:6)
vue-router/viteVite plugin, file-based routing (package.json:104)
vue-router/unplugin/{vite,webpack,rollup,esbuild,rolldown}same plugin for other bundlers (dist/unplugin/)
vue-router/unpluginVueRouterAutoImports, createRoutesContext, EditableTreeNode, plugin Options (dist/unplugin/index.d.mts:62)
vue-router/auto-routesgenerated routes array + handleHotUpdate(router) (vue-router-auto-routes.d.mts:6,28)
vue-router/auto-resolvergenerated resolver for experimental_createRouter + handleHotUpdate (vue-router-auto-resolver.d.mts:15,21)
vue-router/experimentaldata loaders, reroute, miss, definePage, defineParamParser, PARAM_PARSER_INT/PARAM_PARSER_BOOL, experimental_createRouter, useIsDataLoading (dist/experimental/index.d.ts:7)
vue-router/experimental/pinia-coladadefineColadaLoader (package.json:77)
vue-router/volar/sfc-route-blocks, vue-router/volar/sfc-typed-routerVolar plugins: <route> blocks, per-file typed useRoute() (package.json:115-121)

Avoid:

Quick start (classic routes)

ts
import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(),
  routes: [
    { path: '/', component: () => import('./pages/Home.vue') },
    { path: '/users/:id', component: () => import('./pages/User.vue'), props: true },
  ],
})
app.use(router)

In components: useRoute() / useRouter() from vue-router; <RouterLink to="..."> and <RouterView> are globally registered by app.use(router).

Quick start (file-based routing)

ts
// vite.config.ts
import VueRouter from 'vue-router/vite'
import Vue from '@vitejs/plugin-vue'

export default defineConfig({
  plugins: [VueRouter(), Vue()], // Vue plugin MUST come after VueRouter
})
ts
import { createRouter, createWebHistory } from 'vue-router'
import { routes, handleHotUpdate } from 'vue-router/auto-routes'

const router = createRouter({ history: createWebHistory(), routes })
if (import.meta.hot) handleHotUpdate(router)

Pages live in src/pages by default. Start the dev server once to generate typed-router.d.ts, add it to tsconfig.json include with "moduleResolution": "Bundler". Details, naming conventions, and plugin options: references/file-based-routing.md.

Core rules

  • Return values from navigation guards, never call next(). next is deprecated (runtime warning since v5.0.3) and will be removed (dist/index-D7ja2BKs.d.ts:362-393, https://github.com/vuejs/router/releases/tag/v5.0.3).
    ts
    router.beforeEach(to => {
      if (to.meta.requiresAuth && !isAuthenticated) return { name: 'login' }
      // return nothing, true, false, or a route location
    })
  • In data loaders, redirect with reroute(to); new NavigationResult(to) is deprecated and logs a warning (dist/experimental/index.js:1106-1111).
  • router.currentRoute is a ShallowRef<RouteLocationNormalizedLoaded> — read it as router.currentRoute.value (dist/index-D7ja2BKs.d.ts:1433).
  • router.onReady() does not exist (removed in v4); use await router.isReady().
  • scrollBehavior returns { top, left } (v4 renamed x/y to left/top).
  • Detect failed navigations: const failure = await router.push(...); check with isNavigationFailure(failure, NavigationFailureType.aborted).
  • route.meta merges non-recursively from all matched records; read to.meta.requiresAuth directly instead of scanning to.matched. Type meta via RouteMeta module augmentation.
  • Use router.beforeResolve (not beforeEach) for work that needs async components resolved.
  • Use inject() inside guards to reach Pinia stores (supported since Vue 3.3).
  • Decouple components from the router with route props: true or props: route => ({ ... }); pass query values this way to keep components testable.
  • Watch narrow sources (() => route.params.id), never the whole route object.

Full core API notes: references/core-api.md.

Show full SKILL.md (200 more words)Show less

Typed routes

Enable by using the file-based routing plugin (types are generated automatically), or augment manually:

ts
declare module 'vue-router' {
  interface TypesConfig {
    RouteNamedMap: RouteNamedMap
  }
}

Typed push('/users/:id', { params: { id: 42 } }), typed useRoute(), per-file typing via Volar plugin vue-router/volar/sfc-typed-router. Param parsers (int, bool, custom in src/params/) give typed, validated params; definePage({ params: { query: { page: { parser: 'int', default: 1 } } } }) declares query params. Details: references/typed-routes.md.

Data loaders (experimental)

ts
// src/pages/users/[id].vue
import { defineBasicLoader } from 'vue-router/experimental'
import { reroute } from 'vue-router/experimental'

export const useUserData = defineBasicLoader(async (to) => {
  if (!to.params.id) reroute('/') // reroute throws: stops the loader immediately
  return fetchUser(to.params.id)
})

Install DataLoaderPlugin before the router: app.use(DataLoaderPlugin, { router }). Non-blocking loaders: defineBasicLoader(loader, { lazy: true }); errors then land in error, not in router.onError. Details: references/data-loaders.md.

Version notes (5.0.x → 5.3.1)

Migration from v3/v4, or from unplugin-vue-router: references/migration.md.

References

  • core-api.md — router creation, histories, guards, failures, scroll, RouterLink/RouterView.
  • file-based-routing.md — plugin setup, file naming, definePage, <route> blocks, extendRoute, options.
  • typed-routes.md — TypesConfig, generated types, param parsers, experimental_createRouter.
  • data-loaders.md — defineBasicLoader, defineColadaLoader, reroute, lazy loaders, SSR notes.
  • migration.md — v3→v4 and v4→v5 changes, deprecations in the v5 line.

© skilld-dev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in skills/vue-router-skilld of skilld-dev/vue-ecosystem-skills.

  • SKILL.md
  • references/core-api.md
  • references/data-loaders.md
  • references/file-based-routing.md
  • references/migration.md
  • references/typed-routes.md

Open the folder on GitHubat commit c8994af

Compare with similar skills

Vue Router Skilld next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Vue Router Skilld compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Vue Router Skilld this skillskilld-dev/vue-ecosystem-skills181—~2kAutomated safety check: PassMIT
Vuetify Skilldlogue/vite-vuetify-ts-starter1811 repos~1.9kAutomated safety check: PassMIT
Lint Commit PRTresjs/tres3.8k—~1.1kAutomated safety check: PassMIT
Create SkillHyk260/PureChat5461 repos~823Automated safety check: PassMIT
Markbind Typescript MigrationMarkBind/markbind158—~2kAutomated safety check: PassMIT
Branch SyncChenyCHENYU/Robot_Admin1k—~883Automated safety check: PassMIT

Similar skills

  • Vuetify Skilld

    logue/vite-vuetify-ts-starter

    Vue Material Component Framework. An agent skill from logue/vite-vuetify-ts-starter.

    181 GitHub starsUsed in 1 repo~1.9k tokens
    Frontend & DesignAuto-check passed
  • Lint Commit PR

    Tresjs/tres

    Lint local changes, auto-fix, conventional commit, and optionally create PR

    3.8k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Create Skill

    Hyk260/PureChat

    Create a new skill in the current repository. An agent skill from Hyk260/PureChat.

    546 GitHub starsUsed in 1 repo~823 tokens
    DevelopmentAuto-check passed
  • Complete guide for migrating JavaScript files to TypeScript in the MarkBind project, including the two-commit strategy, import/export syntax conversion, and best practices.

    158 GitHub stars~2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Branch Sync

    ChenyCHENYU/Robot_Admin

    A skill your agent uses when: upgrading dependencies, adding common features, or when the user explicitly requests branch sync check.

    1k GitHub stars~883 tokensUpdated today
    DevelopmentAuto-check passed
  • Performance Profiling

    LiberatedPixelCup/Universal-LPC-Spritesheet-Character-Generator

    Run the headless app, catalog-load, and ZIP profilers and interpret the JSON the way a human would from window.profiler.report(), profile:load, and the ZIP console table.

    1.8k GitHub stars~1.8k tokensUpdated today
    DevelopmentAuto-check passed

More from skilld-dev/vue-ecosystem-skills

All 34 skills in this repo
  • Floating UI Vue Skilld

    skilld-dev/vue-ecosystem-skills

    Floating UI for Vue (@floating-ui/vue@2.0.1). An agent skill from skilld-dev/vue-ecosystem-skills.

    181 GitHub stars~1.3k tokensUpdated 15 days ago
    Auto-check passed
  • Formkit Core Skilld

    skilld-dev/vue-ecosystem-skills

    A skill your agent uses whenever writing, debugging, or reviewing code that imports @formkit/core — FormKit's framework-agnostic core (node trees, values, events, hooks, message stores, ledgers…

    181 GitHub stars~2.1k tokensUpdated 15 days ago
    Auto-check passed
  • Pinia Colada Skilld

    skilld-dev/vue-ecosystem-skills

    Data fetching layer for Vue built on Pinia. An agent skill from skilld-dev/vue-ecosystem-skills.

    181 GitHub stars~1.9k tokensUpdated 15 days ago
    Auto-check passed
  • Pinia Skilld

    skilld-dev/vue-ecosystem-skills

    A skill your agent uses when writing, debugging, or refactoring code that imports "pinia", the Vue 3 store library.

    181 GitHub stars~1.5k tokensUpdated 15 days ago
    Auto-check passed
  • Primevue Skilld

    skilld-dev/vue-ecosystem-skills

    A skill your agent uses when writing, debugging, or updating code that imports primevue (PrimeVue v5, UI component library for Vue 3).

    181 GitHub stars~1.9k tokensUpdated 15 days ago
    Auto-check passed
  • Quasar Skilld

    skilld-dev/vue-ecosystem-skills

    Build, configure, and debug apps with the Quasar framework (quasar npm package, v2.33.1).

    181 GitHub stars~1.6k tokensUpdated 15 days ago
    Auto-check passed

Works with

Categories

Questions about Vue Router Skilld

What does Vue Router Skilld do?

ALWAYS use when writing code that imports "vue-router", "vue-router/vite", "vue-router/auto-routes", or "vue-router/experimental". Vue Router Skilld is an agent skill from skilld-dev/vue-ecosystem-skills. ALWAYS use when writing code that imports "vue-router", "vue-router/vite", "vue-router/auto-routes", or "vue-router/experimental".

When should I use Vue Router Skilld?

Vue Router Skilld fits situations like: writing code that imports vue-router; vue-router/vite; vue-router/auto-routes; vue-router/experimental.

How do I install Vue Router Skilld in Claude Code?

Run `npx skills add skilld-dev/vue-ecosystem-skills --skill vue-router-skilld -a claude-code`. Or copy the skill folder (skills/vue-router-skilld in skilld-dev/vue-ecosystem-skills) into .claude/skills/vue-router-skilld in your project. Claude Code loads it when a task matches its description.

How do I install Vue Router Skilld in Codex?

Run `npx skills add skilld-dev/vue-ecosystem-skills --skill vue-router-skilld -a codex`. Or copy the skill folder (skills/vue-router-skilld in skilld-dev/vue-ecosystem-skills) into .agents/skills/vue-router-skilld in your project. Codex loads it when a task matches its description.

Can I use Vue Router Skilld in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add skilld-dev/vue-ecosystem-skills --skill vue-router-skilld -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/vue-router-skilld, .gemini/skills/vue-router-skilld, .github/skills/vue-router-skilld and .opencode/skills/vue-router-skilld in your project.

What does Vue Router Skilld need to run?

SKILL.md names no scripts, command-line tools or credentials: Vue Router Skilld is instructions for the agent only.

Does Vue Router Skilld access the network?

SKILL.md names 2 domains. As links in the text: github.com and router.vuejs.org. This is read from the text; nothing was executed.

Is Vue Router Skilld safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Vue Router Skilld use?

Vue Router Skilld is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Vue Router Skilld use?

About 2k tokens (SKILL.md is roughly 8.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.4k tokens, read only when the agent opens those files.

What are the alternatives to Vue Router Skilld?

Skills that share tags, products or a category with Vue Router Skilld: Vuetify Skilld (logue/vite-vuetify-ts-starter, 181 stars), Lint Commit PR (Tresjs/tres, 3.8k stars), Create Skill (Hyk260/PureChat, 546 stars) and Markbind Typescript Migration (MarkBind/markbind, 158 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Vue Router Skilld?

skilld-dev (a GitHub organization) maintains it in skilld-dev/vue-ecosystem-skills, which has 181 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on September 22, 2026.

Source: skilld-dev/vue-ecosystem-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.