menu-auth-routes

Generate TanStack Router authentication routes and sync bilingual Menu entries from MenuItem trees.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Aii-Group/AII-Admin-Cli --skill menu-auth-routes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: menu-auth-routes
Source: https://github.com/Aii-Group/AII-Admin-Cli/tree/main/.cursor/skills/menu-auth-routes
Command: npx skills add https://github.com/Aii-Group/AII-Admin-Cli --skill menu-auth-routes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

根据 MenuItem 菜单树在 src/routes/_authentication 下生成 TanStack Router 文件路由,按 staticData.key 维护 src/locales/business/Menu 双语文案;同名文件覆盖脚手架页面。在用户新增/调整后台菜单与页面路由、从接口或配置菜单批量落地路由与 i18n 时使用。

Core Features & Use Cases

  • 自动从 MenuItem[] 树生成站内路由文件,并对接 TanStack Router
  • 将 Menu.{key} 的双语文案写入 src/locales/business/Menu/en.yaml 与 zh.yaml,并保持同步
  • 当后台菜单或页面路由调整时,覆盖同名脚手架页面以实现快速落地
  • 路由 URL 与 kebab-case 文件结构保持一致,叶子节点会生成对应页面
  • 与路由生成工具配合,确保菜单变更后路由和国际化数据同步更新

Quick Start

Define or update your MenuItem[] tree and trigger the route generation process to auto-create authentication routes and Menu i18n entries.

Frequently Asked Questions about menu-auth-routes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate TanStack Router authentication routes from a MenuItem tree?

To generate TanStack Router authentication routes from a MenuItem tree, define your MenuItem array and trigger the generation process. This automatically creates route files under src/routes/_authentication and overwrites existing scaffold pages.

What is the best way to keep bilingual menu i18n entries in sync with route changes?

Keeping bilingual menu i18n entries in sync involves using staticData.key as the route key to update src/locales/business/Menu/en.yaml and zh.yaml files. This ensures route and internationalization data update together when menus change.

Does this route generation approach overwrite existing scaffold pages?

Yes, this route generation approach overwrites existing scaffold pages with the same name. It enforces kebab-case file structures for route URLs and generates corresponding pages for leaf nodes to achieve rapid deployment.

Can I bulk deploy routes and i18n from API responses?

Yes, you can bulk deploy routes and i18n from API responses or configuration data. The tool processes the provided MenuItem tree to simultaneously generate authentication routes and bilingual Menu entries.

When do I need to generate menu-driven routes for TanStack Router?

You need to generate menu-driven routes for TanStack Router when admin menus change, when adding new backend pages, or when bulk deploying routing structures and internationalization data from external configuration sources.

Why are my generated route URLs not matching the menu structure?

Generated route URLs might not match if staticData.key is not properly defined. The generation process strictly enforces staticData.key as the route key and maintains consistency between route URLs and kebab-case file structures.