v3-upsert-route

v3-upsert-route is a skill for Claude Code, Codex from un-pany/v3-admin-vite. It costs 88 tokens per session (2,834 once invoked), scanned A, original, MIT.

A route configuration helper for projects that keep their routes in `src/router/index.ts`. It creates or updates permanent and permission-controlled pages, including titles, icons, and child routes.

In plain words
What is it for?
Use it to add or change paths such as `/school` or `/user`, set page titles and icons, define role or permission requirements, and organize nested pages.
Why use it?
It removes the need to hand-edit route objects and helps avoid mistakes in how pages appear in the sidebar. It asks for missing route details before generating a configuration.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to add or change paths such as /school or /user, set page titles and icons, define role or permission requirements, and organize nested pages.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/un-pany/v3-admin-vite/v3-upsert-route
About the project

V3 Admin Vite is a Vue 3 administrative dashboard template built with Vite, TypeScript, Element Plus, Pinia, Vue Router, and Axios. Developers use it as a starting point for creating web-based administration interfaces, and it is designed to support AI-assisted coding tools. The catalogue entries are skills, rules, and instructions for working with the template.

un-pany/v3-admin-vite · 7,058 stars · on GitHub · un-pany.github.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add un-pany/v3-admin-vite --skill v3-upsert-route
Clone the repo
git clone --depth 1 https://github.com/un-pany/v3-admin-vite

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for v3-upsert-route

README.md
[![agentmods](https://agentmods.dev/badge/skills/un-pany/v3-admin-vite/v3-upsert-route/github.svg)](https://agentmods.dev/skills/un-pany/v3-admin-vite/v3-upsert-route)
Your own site
<a href="https://agentmods.dev/skills/un-pany/v3-admin-vite/v3-upsert-route"><img src="https://agentmods.dev/badge/skills/un-pany/v3-admin-vite/v3-upsert-route/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for v3-upsert-route

Your own site · 80×15
<a href="https://agentmods.dev/skills/un-pany/v3-admin-vite/v3-upsert-route"><img src="https://agentmods.dev/badge/skills/un-pany/v3-admin-vite/v3-upsert-route.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,834 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00088 $0.02834
Opus 5 $0.00044 $0.01417
Sonnet 5 $0.00018 $0.00567
Haiku 4.5 $0.00009 $0.00283

Measured 11d ago against content hash 3b556cf8bcec, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

v3-upsert-route scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/v3-upsert-route/SKILL.md · 299 lines

How it starts

The opening of the file, as written. The whole thing — 299 lines — stays where its author put it; the contents beside it link to each section on GitHub.

创建或更新路由

根据用户提供的路由信息,在 src/router/index.ts 中生成或更新路由配置。

本 Skill 定义的是项目默认路由模式,当用户的实际需求与本 Skill 约定冲突时,以用户需求为准。

输入要求

用户需提供:

  1. 路由路径(如 /school/user
  2. 路由标题(中文,如 学校管理用户管理
  3. 路由类型
    • 常驻路由(constantRoutes):所有登录用户可访问
    • 动态路由(dynamicRoutes):需要角色或权限控制
  4. 权限配置(仅动态路由):角色如 ["admin"]["admin", "editor"],权限标识字符如 ["permission:page-level"]
  5. 图标:Element Plus 图标名(elIcon)或 SVG 图标名(svgIcon)
  6. 子路由信息:路径、标题、权限配置、图标等

如果用户信息不完整,主动询问补全后再生成。

路由文件结构

路由配置在 src/router/index.ts 中。

其他路由文件(通常无需修改):

  • src/router/config.ts — 路由模式、动态路由开关、三级路由缓存配置、路径常量(DASHBOARD_PATHREDIRECT_PATH
  • src/router/guard.ts — 导航守卫(登录验证、权限加载)
  • src/router/helper.ts — 路由降级(三级路由转二级)
  • src/router/whitelist.ts — 免登录白名单

侧边栏显示规则

理解这套规则是正确配置路由的关键:

  • 1 个非隐藏叶子子路由 → 子路由直接显示在侧边栏(扁平化,不显示父级折叠)
  • 多个非隐藏子路由 → 自动嵌套显示(父级作为折叠组)
  • alwaysShow: true → 强制始终显示父级折叠,即使只有 1 个子路由

因此:

  • 单页面模块不需要设置 alwaysShow,侧边栏会直接显示子路由
  • 多页面模块不需要设置 alwaysShow,自动嵌套
  • 只有 "单子路由但仍想显示为折叠组" 的特殊需求才用 alwaysShow: true
  • 动态路由的特殊情况:如果角色或权限过滤可能导致只剩 1 个可见子路由,建议加 alwaysShow: true 防止意外扁平化

图标放置规则

场景 图标位置 原因
单子路由(扁平显示) children[0].meta 子路由直接作为菜单项展示
多子路由(嵌套显示) 父级 meta 父级作为折叠组的标题

路由配置示例

单页面模块

侧边栏中显示为一个菜单项(不显示父级折叠),图标放在子路由:

{
  path: "/school",
  component: Layouts,
  redirect: "/school/list",
  children: [
    {
      path: "list",
      component: () => import("@/pages/school/index.vue"),
      name: "SchoolList",
      meta: {
        title: "学校管理",
        elIcon: "School"
      }
    }
  ]
}

多页面模块

侧边栏中显示为折叠组,图标放在父级:

{
  path: "/school",
  component: Layouts,
  redirect: "/school/list",
  name: "School",
  meta: {
    title: "学校管理",
    elIcon: "School"
  },
  children: [
    {
      path: "list",
      component: () => import("@/pages/school/list/index.vue"),
      name: "SchoolList",
      meta: { title: "学校列表" }
    },
    {
      path: "grade",
      component: () => import("@/pages/school/grade/index.vue"),
      name: "SchoolGrade",
      meta: { title: "年级管理" }
    }
  ]
}

Read the full file on GitHub · 299 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 299 lines · 88 tokens per session scan A 3b556cf8bcec

Subscribe to this mod's changes

v3-upsert-route is a skill published in the GitHub repository un-pany/v3-admin-vite (7,058 stars, last pushed 2mo ago), licensed MIT. It adds 88 tokens to every session and 2,834 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

admin-net-frontend

Use when building Vue 3 admin dashboard frontends with dynamic routing, permission-based menus, and CRUD page generation. Admin.NET Frontend: Vue 3 + Vite + TypeScript admin UI for Admin.NET backend.

znlgis/opengis-skills · 49 tokens

vue

Vue 3 - Progressive JavaScript framework with Composition API, reactivity system, single-file components, Vite integration, TypeScript support.

bobmatnyc/claude-mpm-skills · 29 tokens

admin-console-blueprint

Use when you need to design, scaffold, refactor, or document a medium-sized admin console built as an independent Vite/React SPA backed by modular Go admin APIs, Cookie session auth, and CLI-provisioned administrator accounts. Helpful for tasks like planning a new admin console, extracting reusable architecture from…

LSTM-Kirigaya/jinhui-skills · 91 tokens

antd

Use when the user's task involves Ant Design (antd) — writing antd components, debugging antd issues, querying antd APIs/props/tokens/demos, migrating between antd versions, or analyzing antd usage in a project. Triggers on antd-related code, imports from 'antd', or explicit antd questions.

ant-design/ant-design-pro · 69 tokens

slidev

Create and present web-based slidedecks for developers using Slidev with Markdown, Vue components, code highlighting, animations, and interactive features. Use when building technical presentations, conference talks, code walkthroughs, teaching materials, or developer decks.

slidevjs/slidev · 51 tokens

pro-upgrade

An upgrade guide for projects built with Ant Design Pro, a React-based application template for business software. It compares the project with the latest official template and merges framework updates while preserving application code.

ant-design/ant-design-pro · 63 tokens