Vben logo

Vben

OrganizationPopular
LangChat
vben

Vben Admin 5.0 前端框架开发技能。用于开发基于 Vue3、Vite、TypeScript 的中后台管理系统。

Overview

PublisherLangChat
Repositorylangchat
Skill namevben
Stars
1.3K
Forks
255
Bundled files
20
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 20 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by LangChat on GitHub. Read the source before you install it.

Installation

Install the Vben AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/LangChat/langchat/tree/next/skills
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/LangChat/langchat.git /tmp/langchat
mkdir -p .claude/skills
cp -r /tmp/langchat/skills .claude/skills/vben
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Vben in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Vben on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Vben is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Vben Admin 开发技能

基于 Vben Admin 5.0 文档的专业开发指导技能,帮助快速开发中后台管理系统。

项目结构

采用 Monorepo 架构,核心目录:

├── apps/                    # 应用目录
│   ├── web-antd/           # Ant Design Vue 应用
│   ├── web-ele/            # Element Plus 应用
│   ├── web-naive/          # Naive UI 应用
│   └── backend-mock/       # Mock 后端服务
├── packages/               # 共享包
│   ├── @core/              # 核心包(UI组件、布局等)
│   ├── effects/            # 副作用包(权限、请求、hooks等)
│   ├── stores/             # 状态管理
│   ├── locales/            # 国际化
│   └── utils/              # 工具函数
└── internal/               # 内部工具配置

常用命令

bash
# 开发
pnpm dev:antd          # 启动 Ant Design 应用
pnpm dev:ele           # 启动 Element Plus 应用
pnpm dev:naive         # 启动 Naive UI 应用

# 构建
pnpm build             # 构建所有应用
pnpm build:antd        # 构建指定应用

# 其他
pnpm lint              # 代码检查
pnpm check:type        # 类型检查
pnpm reinstall         # 重新安装依赖

核心开发指南

路由与菜单

路由配置位于 src/router/routes/modules/ 目录:

ts
import type { RouteRecordRaw } from 'vue-router';

const routes: RouteRecordRaw[] = [
  {
    meta: {
      icon: 'mdi:home',
      title: $t('page.home.title'),
      authority: ['admin'],      // 权限控制
      order: 1000,               // 菜单排序
      keepAlive: true,           // 开启缓存
      hideInMenu: false,         // 菜单中隐藏
      hideInTab: false,          // 标签页中隐藏
    },
    name: 'Home',
    path: '/home',
    component: () => import('#/views/home/index.vue'),
  },
];

export default routes;

权限控制

三种模式在 preferences.ts 中配置:

ts
import { defineOverridesPreferences } from '@vben/preferences';

export const overridesPreferences = defineOverridesPreferences({
  app: {
    accessMode: 'frontend',  // 'frontend' | 'backend' | 'mixed'
  },
});

按钮级权限:

vue
<script setup>
import { AccessControl, useAccess } from '@vben/access';
const { hasAccessByCodes, hasAccessByRoles } = useAccess();
</script>

<template>
  <!-- 权限码方式 -->
  <AccessControl :codes="['AC_100100']" type="code">
    <Button>有权限可见</Button>
  </AccessControl>

  <!-- 角色方式 -->
  <Button v-if="hasAccessByRoles(['admin'])">管理员可见</Button>

  <!-- 指令方式 -->
  <Button v-access:code="'AC_100100'">有权限可见</Button>
</template>

偏好设置配置

在应用目录的 preferences.ts 中配置:

ts
import { defineOverridesPreferences } from '@vben/preferences';

export const overridesPreferences = defineOverridesPreferences({
  app: {
    layout: 'sidebar-nav',           // 布局方式
    locale: 'zh-CN',                 // 语言
    dynamicTitle: true,              // 动态标题
    watermark: false,                // 水印
    loginExpiredMode: 'page',        // 登录过期模式
  },
  theme: {
    mode: 'dark',                    // 主题模式
    builtinType: 'default',          // 内置主题
    colorPrimary: 'hsl(212 100% 45%)', // 主题色
  },
  sidebar: {
    collapsed: false,                // 侧边栏折叠
    width: 224,                      // 侧边栏宽度
  },
  tabbar: {
    enable: true,                    // 标签页
    keepAlive: true,                 // 缓存
  },
});

API 请求

请求配置在 src/api/request.ts:

ts
import { requestClient } from '#/api/request';

// GET 请求
export async function getUserInfoApi() {
  return requestClient.get<UserInfo>('/user/info');
}

// POST 请求
export async function saveUserApi(user: UserInfo) {
  return requestClient.post<UserInfo>('/user', user);
}

代理配置在 vite.config.mts:

ts
export default defineConfig(async () => {
  return {
    vite: {
      server: {
        proxy: {
          '/api': {
            target: 'http://localhost:5320/api',
            changeOrigin: true,
            rewrite: (path) => path.replace(/^\/api/, ''),
          },
        },
      },
    },
  };
});

国际化

使用 $t() 函数:

ts
import { $t } from '#/locales';

meta: {
  title: $t('page.home.title'),
}

语言文件在 packages/locales/ 目录。

主题定制

CSS 变量覆盖:

css
:root {
  --primary: 212 100% 45%;
  --sidebar: 0 0% 100%;
  --header: 0 0% 100%;
}

.dark {
  --background: 222.34deg 10.43% 12.27%;
  --sidebar: 222.34deg 10.43% 12.27%;
}

登录接口对接

需要的接口:

ts
// src/api/core/auth.ts
export async function loginApi(data: LoginParams) {
  return requestClient.post<LoginResult>('/auth/login', data);
}

// src/api/core/user.ts
export async function getUserInfoApi() {
  return requestClient.get<UserInfo>('/user/info');
}

// src/api/core/auth.ts (可选)
export async function getAccessCodesApi() {
  return requestClient.get<string[]>('/auth/codes');
}

环境变量

bash
# .env.development
VITE_PORT=5555
VITE_GLOB_API_URL=/api
VITE_NITRO_MOCK=true

# .env.production
VITE_GLOB_API_URL=https://api.example.com
VITE_COMPRESS=gzip
VITE_ROUTER_HISTORY=hash

别名配置

使用 # 开头的路径别名:

ts
// package.json
{
  "imports": {
    "#/*": "./src/*"
  }
}

// 使用
import { useAuthStore } from '#/store';

详细参考文档

需要更多细节时,查阅以下参考文件:

核心功能 (references/core/)

  • 路由菜单: references/core/route.md - 路由配置、Meta属性、多级菜单
  • 权限控制: references/core/access.md - 三种权限模式、按钮级权限
  • 偏好设置: references/core/preferences.md - 完整配置项说明
  • 主题定制: references/core/theme.md - CSS变量、内置主题、自定义主题
  • API请求: references/core/api.md - 请求配置、拦截器、多接口地址
  • 国际化: references/core/locale.md - 语言配置、新增语言包
  • 登录对接: references/core/login.md - 登录接口、Token刷新
  • 图标使用: references/core/icons.md - Iconify图标、SVG图标

业务组件 (references/components/business/)

  • Page页面: references/components/business/page.md - 页面布局容器、标题区、内容区
  • 表单组件: references/components/business/form.md - Vben Form表单配置、校验、联动
  • 表格组件: references/components/business/table.md - Vben Vxe Table表格配置、搜索、远程加载
  • 模态框: references/components/business/modal.md - Vben Modal配置、拖拽、全屏
  • 抽屉: references/components/business/drawer.md - Vben Drawer配置、组件抽离
  • 轻量提示框: references/components/business/alert.md - alert、confirm、prompt调用
  • API组件包装器: references/components/business/api-component.md - 远程数据自动加载

通用组件 (references/components/common/)

  • 数字动画: references/components/common/count-to.md - CountToAnimator数字滚动动画
  • 省略文本: references/components/common/ellipsis-text.md - EllipsisText文本省略展开

功能配置 (references/features/)

  • 常用功能: references/features/features.md - 水印、缓存、动态标题等

构建部署 (references/deployment/)

  • 构建部署: references/deployment/deploy.md - 构建配置、Nginx、Docker
  • 常见问题: references/deployment/faq.md - 依赖安装、打包部署、错误排查

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Vben AI skill do?

Vben Admin 5.0 前端框架开发技能。用于开发基于 Vue3、Vite、TypeScript 的中后台管理系统。

Why use Vben on TypingMind?

Because you install it once and use it with any model. Vben is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Vben in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/LangChat/langchat/tree/next/skills. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Vben?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Vben?

As many as you like. As long as a model supports skills, you can use Vben with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Vben AI skill free?

Yes. It is published on GitHub by LangChat under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇