fa-crud-page-generator
为 Fantastic-admin 框架生成完整的 CRUD 业务模块,遵循框架标准模块结构和内建 Fa* 组件体系,使用 FaForm/FaFormItem 生成新增/编辑表单,产出列表页、详情/编辑页、DetailForm 表单组件、API 模块、fake mock 数据、可选路由。用户说:'帮我做一个商品管理页面'、'搭一个用户列表,能搜索分页新增编辑删除'、'生成订单模块'、'新建 XX 管理模块'、'快速搭一个标准模块/CRUD 页面' 时,即使没有明确说 CRUD,也应触发此技能。
npx skills add fantastic-admin/basic --skill fa-crud-page-generator --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# CRUD 页面生成器 在 Fantastic-admin 框架中生成标准 CRUD 业务模块。生成时遵循框架当前标准模块结构: 列表页、独立详情页、`DetailForm` 表单组件、API 模块、fake mock、可选路由和 route i18n 要一次性配套生成。 优先复刻框架现有写法,而不是重新发明页面结构:列表页用 `FaSearchBar` + `FaTable` + `FaPagination`,详情表单抽成 `components/DetailForm/index.vue`,独立详情页用 `FaFixedBar` 固定顶部标题和底部提交区。 **生成文件清单:** - `apps/<app>/src/views/{path}/{module}/list.vue` — 列表页 - `apps/<app>/src/views/{path}/{module}/detail.vue` — 独立详情页,仅 `router` 模式需要 - `apps/<app>/src/views/{path}/{module}/components/DetailForm/index.vue` — 新增/编辑表单 - `apps/<app>/src/api/modules/{fileName}.ts` — API 模块 - `apps/<app>/src/api/fake_modules/{fileName}.fake.ts` — fake mock 数据,可选 - `apps/<app>/src/router/modules/{routeFileName}.ts` — 前端路由,可选 - `apps/<app>/src/locales/lang/route/{locale}.json` — 路由标题 i18n,可选 --- ## 先确认应用 本项目是 pnpm monorepo。开始写文件前先确认目标应用: 1. 如果用户已经明确写了 `apps/<app>`、`admin 应用`、`pro 应用` 等目标应用,直接使用该应用。 2. 如果没有明确目标应用,先执行 `ls apps/` 查看可用应用,然后询问用户要生成到哪个应用,并等待回复。 3. 后续所有路径都以 `apps/<app>/src/` 为根。 不要默认猜测应用;生成到错误应用的返工成本很高。 --- ## 信息收集 尽量一次性收集会影响文件结构的信息: - **模块名**:英文,用于目录、API 文件和路由,如 `product`、`order`、`systemUser` - **模块中文名**:用于标题和提示,如 `商品`、`订单`、`用户` - **存放路径**:位于 `src/views/` 下的子路径,如 `mall`、`system/user`,可为空 - **字段清单**:字段名、中文
- 先确认应用
- 信息收集
- 命名规范
- 代码生成规则
- 路由生成
- 生成前后检查
What does the fa-crud-page-generator skill do?
为 Fantastic-admin 框架生成完整的 CRUD 业务模块,遵循框架标准模块结构和内建 Fa* 组件体系,使用 FaForm/FaFormItem 生成新增/编辑表单,产出列表页、详情/编辑页、DetailForm 表单组件、API 模块、fake mock 数据、可选路由。用户说:'帮我做一个商品管理页面'、'搭一个用户列表,能搜索分页新增编辑删除'、'生成订单模块'、'新建 XX 管理模块'、'快速搭一个标准模块/CRUD 页面' 时,即使没有明确说 CRUD,也应触发此技能。
How do I install it?
Run `npx skills add fantastic-admin/basic --skill fa-crud-page-generator --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From fantastic-admin/basic, a repository with 3,352 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
