一键导入
field-sync
Synchronizes entity field changes across DTOs, services, frontend, and dictionary seeds. Invoke when adding/removing fields from entities.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Synchronizes entity field changes across DTOs, services, frontend, and dictionary seeds. Invoke when adding/removing fields from entities.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
执行代码规范审查脚本,对指定工作副本进行后端静态分析(跨模块引用、层依赖方向、DDD 构造块位置、AppService 命名、Repository 位置、Entity 基类等 12 项检查)、前端类型检查(pnpm check:type),可选 dotnet build。当用户提到"代码规范审查"、"code standard review"、"规范检查"、"跑一下检查"、"检查一下分支"、"规范扫描"、"验证代码规范"、"检查后端规范"、"执行 code-standard-review"、"对 xx 分支跑检查"时使用此技能。即使用户只说"检查一下"或"跑脚本",只要上下文涉及代码规范、构建验证或分支质量,都应触发此技能。
快速生成完整 CRUD 代码,基于实体类.cs 直接解析生成前后端代码。耗时约60秒。当用户请求"生成CRUD"、"创建CRUD"、"生成基础代码"、"新建业务模块"时触发。支持普通实体和树形实体,自动处理枚举、字典、菜单种子数据。
生成完整的 ABP 模块结构,以最小 token 开销创建 5 层项目、更新主模块依赖、解决方案文件和动态 API 配置。当用户想要创建新模块,提到"新建模块"、"创建模块"、"module"、"add module"、"generate module"时使用。支持简单名称(Payment)和复合名称(content-management、ContentManagement)。
用于 unibest / uni-app Vue3 TypeScript 项目的开发规范、代码生成、代码审查和问题排查。用户开发或修改页面、业务逻辑、tabbar、pages.config.ts、manifest.config.ts、vite-plugin-uni-pages、UnoCSS、Pinia、请求、多语言、wot-ui v2、App 白屏、HBuilderX 打包等内容时,应主动使用本 skill。强制优先使用 wot-ui v2,遵循 unibest 自动生成配置入口,避免手动修改会被覆盖的文件。
| name | field-sync |
| description | Synchronizes entity field changes across DTOs, services, frontend, and dictionary seeds. Invoke when adding/removing fields from entities. |
Synchronizes entity field changes across the entire codebase including DTOs, Service implementations, frontend API and views, and dictionary seed data.
Ask the user to clarify:
DTOs are located in: Yi.Abp/module/{module-name}/Yi.Module.{ModuleName}.Application.Contracts/Dtos/{EntityName}/
For each of the following files, add/remove/update the corresponding field:
{EntityName}GetOutputDto.cs - Single entity retrieval output{EntityName}GetListOutputDto.cs - List query output{EntityName}CreateInputVo.cs - Creation input{EntityName}UpdateInputVo.cs - Update input{EntityName}GetListInputVo.cs - Query parameters (remove if field no longer needed for filtering)Type Mapping:
bool → TypeScript booleanint → TypeScript numberGuid → TypeScript stringGuid? → TypeScript string | nullnumber (use enum name in imports)import type { EnumName } from '{module-path}/enums';Location: Yi.Abp/module/{module-name}/Yi.Module.{ModuleName}.Application/Services/{EntityName}Service.cs
WhereIF conditions in the querySelect mapping to include new fields or remove old fieldsLocation: Yi.Vben5/apps/web-antd/src/api/{module-name}/{entity-name}/model.d.ts
Update the TypeScript interface to match the DTO changes.
Location: Yi.Vben5/apps/web-antd/src/views/{module-name}/{entity-name}/data.ts
Add or remove column definitions:
{
field: 'fieldName',
title: 'Display Name',
minWidth: 100,
formatter({ cellValue }) {
// For booleans
return cellValue ? 'Yes' : 'No';
// For enums
return cellValue === 1 ? 'Value1' : 'Value0';
},
}
Add or remove form field definitions:
// Boolean field
{
component: 'Switch', // or 'Select' with options
fieldName: 'fieldName',
label: 'Display Name',
}
// Enum field
{
component: 'Select',
componentProps: {
options: [
{ label: 'Option 1', value: 0 },
{ label: 'Option 2', value: 1 },
],
},
fieldName: 'fieldName',
label: 'Display Name',
}
// Foreign key field (Guid)
{
component: 'Input', // or ApiSelect for dropdown
fieldName: 'fieldName',
label: 'Display Name',
}
Add or remove query conditions.
If the field is a boolean or enum used in dropdowns, add dictionary data.
Location: Yi.Abp/module/rbac/Yi.Module.Rbac.SqlSugarCore/DataSeeds/DictionaryTypeDataSeed.cs
Add new dictionary type:
DictionaryTypeAggregateRoot dictNew = new DictionaryTypeAggregateRoot()
{
DictName = "Dictionary Type Name",
DictType = "dict_type_key",
OrderNum = 100,
Remark = "Description",
IsDeleted = false,
State = true
};
entities.Add(dictNew);
Location: Yi.Abp/module/rbac/Yi.Module.Rbac.SqlSugarCore/DataSeeds/DictionaryDataSeed.cs
Add dictionary data entries:
DictionaryEntity dictData1 = new DictionaryEntity()
{
DictLabel = "Label 1",
DictValue = "Value1",
DictType = "dict_type_key",
OrderNum = 100,
Remark = "Description",
IsDeleted = false,
State = true,
ListClass = "default" // success, danger, warning, info, primary, default
};
entities.Add(dictData1);
DictionaryEntity dictData2 = new DictionaryEntity()
{
DictLabel = "Label 2",
DictValue = "Value2",
DictType = "dict_type_key",
OrderNum = 99,
Remark = "Description",
IsDeleted = false,
State = true,
ListClass = "primary"
};
entities.Add(dictData2);
Run build and typecheck to verify changes:
# Backend
dotnet build Yi.Abp/module/{module-name}/Yi.Module.{ModuleName}.Application/Yi.Module.{ModuleName}.Application.csproj
# Frontend
cd Yi.Vben5/apps/web-antd
npm run typecheck
This example shows the changes needed for adding Remark (string) and PhoneNumber (string?) to the RoleAggregateRoot entity.
RoleGetOutputDto.cs:
public string? Remark { get; set; }public string? PhoneNumber { get; set; }RoleGetListOutputDto.cs:
public string? Remark { get; set; }RoleCreateInputVo.cs / RoleUpdateInputVo.cs:
public string? Remark { get; set; }public string? PhoneNumber { get; set; }RoleGetListInputVo.cs:
public string? Remark { get; set; }RoleService.cs:
.WhereIF(!string.IsNullOrEmpty(input.Remark), x => x.Remark.Contains(input.Remark!))Remark = x.Remark, PhoneNumber = x.PhoneNumberapi/system/role/model.d.ts:
remark?: string | null;phoneNumber?: string | null;views/system/role/data.ts:
{ field: 'remark', title: '备注' }
{ component: 'Input', fieldName: 'remark', label: '备注' }
No dictionary seeds required as both fields are plain strings.