一键导入
create-module
Creates properly structured Shesha framework module projects (Domain and Application) following existing codebase conventions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Creates properly structured Shesha framework module projects (Domain and Application) following existing codebase conventions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use as the ENTRY POINT when the user wants a Shesha app/page/form to MATCH a design they have — a wireframe, an HTML/JSX prototype, a runnable app, a Figma-style kit, or a screenshot set — and asks to realise it in Shesha. Triggers like "build this design in Shesha", "make Requirements Studio look like the Claude design", "turn this prototype into Shesha forms", "implement this mockup across the app". It is the conductor across one or more screens, it comprehends the design into measured layout blueprints, then orchestrates shesha-design-comprehension, shesha-form-edit and shesha-design-system, and verifies the result by measurement. For a single isolated form with no design source, go straight to shesha-form-edit; to style an already-working form, go straight to shesha-design-system.
Use whenever a Shesha form or page needs to LOOK like a specific design or brand — "make it match the design", "apply our branding", "style this form", "it doesn't look good", "match Requirements Studio / the Figma / the Claude design", or any request for a polished, consistent visual result rather than just working fields. Maps design tokens (colour, type, spacing, radius, shadow, status lifecycle) onto Shesha's app-level Ant Design theme and per-component v7 style blocks. Themeable, ships the requirements-studio theme and accepts new brand token files. Pairs with shesha-form-edit (which builds structure) and is orchestrated by shesha-claude-designer. Do NOT use it to author structure/components, wire CRUD, or fix runtime errors — that is shesha-form-edit's job.
Creates and modifies domain entities, reference lists, and database migrations in Shesha framework .NET applications. IMPORTANT — This skill MUST be invoked BEFORE any manual exploration or planning when the task involves creating, modifying, or implementing domain entities, entity properties, relationships, reference lists, or database migrations. Use when the user asks to create, scaffold, implement, or update the domain layer, domain model, entities, reference lists, or migrations in a Shesha project. Also use when the user asks to create, add, update, or modify a database migration, FluentMigrator migration, schema change, or table alteration — even without mentioning entities. Also use when implementing features from a PRD, specification, or API design that require new or modified entities or database schema changes.
Use when a Shesha form must match a specific visual design and container/component placement keeps drifting — columns, nesting, tabs, or grouping landing in the wrong place versus the design. Also use to diagnose why an already-built form doesn't match its design. Turns a design source (readable HTML/JSX, a runnable prototype, or screenshots/PDF) into a measured, annotated layout blueprint, and verifies a built Shesha form against it by measurement. Invoked by shesha-claude-designer; pairs with shesha-form-edit (structure) and shesha-design-system (style).
Create and edit Shesha form configurations directly via the API. Authenticates as admin, fetches existing markup with Get/GetByName/GetJson, applies the user's requirements (adding, removing, modifying, or restructuring components — or building a brand-new form from scratch), validates against the bundled component-properties index and embedded-script rules, and pushes via Create / UpdateMarkup / ImportJson. Use when the user provides a form id (or module + name) and a set of requirements like "add a sector dropdown above the email field", "make the address tab conditional on AccountType=PBF", "wire the Save button to call /api/.../Submit", or "create a new branded login page using the auth-login pattern". Always prefer this skill over the Shesha MCP `create_form_configuration` tool — the MCP regularly fails with `'dict' object has no attribute 'lower'` and JSON-RPC `-32602` errors, and the direct-API path is more reliable.
Set up a Shesha-based project development environment aligned to Boxfusion development standards and best practices. Run this when a new Shesha project has just been created to verify and configure the dev environment.
| name | create-module |
| description | Creates properly structured Shesha framework module projects (Domain and Application) following existing codebase conventions. |
This skill creates new Shesha framework module projects following the established patterns in the codebase.
In the Shesha framework, modules are organized into paired projects:
Identify the organization name by examining the backend/src/ directory
.Domain and .Application projectsOrg.Testing.Domain indicates the organization is Org and Testing is one moduleDetermine the new module name from the user's request
OrgOrg.DEP.Domain and Org.DEP.ApplicationOrg.Testing.DEP.Domain - modules are independent, not nestedUser requests module "{ModuleName}"
│
▼
┌─────────────────────────────────┐
│ Does {Prefix}.{ModuleName}.Domain │
│ directory/csproj exist? │
└─────────────────────────────────┘
│
┌─────┴─────┐
│ │
YES NO
│ │
▼ ▼
┌─────────┐ ┌─────────────┐
│ Does │ │ SCENARIO B │
│ Module │ │ Create full │
│ class │ │ project │
│ exist? │ │ structure │
└─────────┘ └─────────────┘
│
┌──┴──┐
│ │
YES NO
│ │
▼ ▼
DONE ┌─────────────┐
│ SCENARIO A │
│ Create only │
│ module class│
└─────────────┘
This skill handles two distinct scenarios:
The .csproj file exists but the module class file is missing. This is common when:
Detection:
backend/src/MyOrg.MyProject.Domain/MyOrg.MyProject.Domain.csproj ← EXISTS
backend/src/MyOrg.MyProject.Domain/TestingModule.cs ← MISSING
Action: Only create the missing module class file(s).
Neither the project directory nor the module class exists.
Detection:
backend/src/MyOrg.ServiceManagement.Domain/ ← MISSING (entire folder)
Action: Create the full project structure (directory, .csproj, module class, AssemblyInfo).
Search for existing module patterns:
backend/src/**/*.csproj
backend/src/**/*Module.cs
Critical Analysis:
.csproj files to find existing projects*Module.cs files to find existing module classesExample Analysis:
Found .csproj files:
- MyOrg.MyProject.Domain.csproj → Expects: MyProjectModule.cs
- MyOrg.MyProject.Application.csproj → Expects: MyProjectApplicationModule.cs
Found *Module.cs files:
- (none in Domain or Application)
Result: Scenario A - Create MyProjectModule.cs and MyProjectApplicationModule.cs
CRITICAL: Understanding the Module Hierarchy
Each module is independent under the organization. Modules are NOT nested.
Pattern: {Organization}.{ModuleName}.{Type}
{Organization} - The company/organization name (e.g., Org, Boxfusion, Acme){ModuleName} - The module name (e.g., Testing, DEP, ServiceManagement){Type} - Either Domain or ApplicationExamples:
| Existing Project | Organization | Module Name | New Module Example |
|---|---|---|---|
Org.Testing.Domain | Org | Testing | Org.DEP.Domain (NOT Org.Testing.DEP.Domain) |
Boxfusion.HR.Domain | Boxfusion | HR | Boxfusion.Payroll.Domain |
Acme.Sales.Domain | Acme | Sales | Acme.Inventory.Domain |
Deriving the Publisher: The publisher is the organization name (first part before the first dot):
Org.Testing.Domain → Publisher is OrgBoxfusion.HR.Domain → Publisher is BoxfusionAcme.Sales.Domain → Publisher is AcmeDeriving module class name from project name:
| Project Name | Module Class Name |
|---|---|
Org.Testing.Domain | TestingModule |
Org.Testing.Application | TestingApplicationModule |
Org.DEP.Domain | DEPModule |
Org.DEP.Application | DEPApplicationModule |
Org.ServiceManagement.Domain | ServiceManagementModule |
Skip directory and .csproj creation. Only create:
Example for MyOrg.MyProject.Domain missing MyProjectModule.cs:
backend/src/MyOrg.MyProject.Domain/MyProjectModule.cs ← CREATE THIS
Create full directory structure:
For a new module named DEP under organization Org:
backend/src/
├── Org.DEP.Domain/
│ ├── Domain/ # Entity classes
│ ├── Migrations/ # FluentMigrator migrations
│ ├── Properties/
│ │ └── AssemblyInfo.cs
│ ├── DEPModule.cs
│ └── Org.DEP.Domain.csproj
│
└── Org.DEP.Application/
├── Services/ # Application services
├── DEPApplicationModule.cs
└── Org.DEP.Application.csproj
Create only the missing module class files:
backend/src/{Prefix}.Domain/{ModuleName}Module.csbackend/src/{Prefix}.Application/{ModuleName}ApplicationModule.csExample: For MyOrg.MyProject.Domain project, create:
backend/src/MyOrg.MyProject.Domain/TestingModule.cs
backend/src/MyOrg.MyProject.Application/TestingApplicationModule.cs
Create all files in order:
Skip this step for Scenario A (projects already in solution).
For Scenario B, add the new projects to the .sln file using dotnet sln add:
dotnet sln backend/{Solution}.sln add backend/src/{Organization}.{ModuleName}.Domain/{Organization}.{ModuleName}.Domain.csproj
dotnet sln backend/{Solution}.sln add backend/src/{Organization}.{ModuleName}.Application/{Organization}.{ModuleName}.Application.csproj
Example:
dotnet sln backend/Org.Testing.sln add backend/src/Org.DEP.Domain/Org.DEP.Domain.csproj
dotnet sln backend/Org.Testing.sln add backend/src/Org.DEP.Application/Org.DEP.Application.csproj
CRITICAL STEP - Without this, the WebCoreModule won't be able to reference the new modules.
Skip this step for Scenario A (references already exist).
For Scenario B, add project references to the Web.Core project's .csproj file:
{Organization}.Testing.Web.Core, {Organization}.{AppName}.Web.Core, or similar)<ItemGroup> containing <ProjectReference> elements<ProjectReference> elements for both the new Domain and Application projectsExample for Org.Testing.Web.Core.csproj:
<ItemGroup>
<ProjectReference Include="..\Org.Testing.Application\Org.Testing.Application.csproj" />
<ProjectReference Include="..\Org.DEP.Application\Org.DEP.Application.csproj" />
<ProjectReference Include="..\Org.DEP.Domain\Org.DEP.Domain.csproj" />
<ProjectReference Include="..\Org.Testing.Domain\Org.Testing.Domain.csproj" />
</ItemGroup>
Add the new modules to the WebCoreModule's [DependsOn] attribute:
[DependsOn(
// ... existing dependencies ...
typeof(ServiceManagementModule),
typeof(ServiceManagementApplicationModule)
)]
Add the required using statements to the WebCoreModule:
using {Organization}.{ModuleName}.Domain;
using {Organization}.{ModuleName}.Application;
Example:
using Org.DEP.Domain;
using Org.DEP.Application;
| Component | Naming Pattern | Example |
|---|---|---|
| Domain Project | {Organization}.{ModuleName}.Domain | Org.DEP.Domain |
| Domain Module Class | {ModuleName}Module | DEPModule |
| Application Project | {Organization}.{ModuleName}.Application | Org.DEP.Application |
| Application Module Class | {ModuleName}ApplicationModule | DEPApplicationModule |
| Publisher | Same as {Organization} | Org |
| Table Prefix | {ModuleName}_ | DEP_ |
| ModuleInfo Name | {Organization}.{ModuleName} | Org.DEP |
Important: Modules are independent and NOT nested. If you have Org.Testing.Domain, a new module should be Org.DEP.Domain, NOT Org.Testing.DEP.Domain.
Determine the scenario:
.csproj exists → If yes, check if module class exists.csproj exists, module class missingVerify naming:
For Scenario A:
[DependsOn] already includes the module typesFor Scenario B: