add-backend-feature

Scaffolds ASP.NET Boilerplate backend features with entities, DTOs, services, and migrations.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/AryanMohanlall/SafeGuard --skill add-backend-feature-aryanmohanlall
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: add-backend-feature
Source: https://github.com/AryanMohanlall/SafeGuard/tree/main/.agents/skills/add-backend-feature
Command: npx skills add https://github.com/AryanMohanlall/SafeGuard --skill add-backend-feature-aryanmohanlall

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding a new backend feature to an ASP.NET Boilerplate modular monolith requires touching many layers — domain entities, DTOs, application services, DbContext registration, and migrations — and it is easy to break layer boundaries or naming conventions. This Skill enforces the SafeGuard architecture rules so every new feature lands in the correct project with the correct patterns. ## Core Features & Use Cases - Layered Feature Scaffolding: Generates entities in the Core domain layer, DTOs with AutoMap, app service interfaces and implementations using AsyncCrudAppService, and DbContext registrations. - Architecture Guardrails: Enforces dependency direction (Web.Host → Web.Core → Application → Core), ABP authorization attributes, and repository-based data access instead of direct DbContext usage. - Migration Guidance: Produces the correct dotnet ef migrations command while requiring the user to run it manually. - Use Case: Ask to add a LeaveType CRUD module, and receive a ready-to-paste entity, DTO, ILeaveTypeAppService interface, LeaveTypeAppService implementation, DbContext update, and migration command that all follow the project conventions. ## Quick Start Ask the assistant to scaffold a new backend feature such as "Add a JobGrade entity with CRUD following the SafeGuard backend architecture" and review the generated layer-by-layer code.

Frequently Asked Questions about add-backend-feature

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

FAQPage Schema
How do I add a new CRUD entity in ASP.NET Boilerplate?▼

Create the entity inheriting FullAuditedEntity<Guid> in the Core domain layer, add a DTO with AutoMap, define an interface extending IAsyncCrudAppService, implement it with AsyncCrudAppService, register a DbSet in the DbContext, and add a migration.

How to structure application services in ABP Zero architecture?▼

Place each service in its own folder under the Application layer with an interface and implementation. Use AsyncCrudAppService for standard CRUD, ApplicationService for custom workflows, and decorate services with AbpAuthorize for permission enforcement.

Should DTOs expose EF Core navigation properties?▼

No. DTOs should not expose EF navigation properties directly, because that leaks persistence concerns into the API contract. Map only the fields clients need and use AutoMap attributes to keep entity-to-DTO mapping explicit.

Can application services use DbContext directly in ABP?▼

Application services should prefer IRepository<TEntity, Guid> over direct DbContext usage. Direct DbContext access is reserved for justified cases in the EntityFrameworkCore layer, keeping the application layer persistence-agnostic.

Why does this workflow not run EF migrations automatically?▼

The repository convention requires the agent to only identify model changes and generate the dotnet ef migrations add command. The developer runs the migration manually to review schema changes before they are applied to the database.