new-vertical-slice

Scaffolds complete vertical slice architecture features for ERP modules in C# and SQL.

Updated Aug 18, 2026
One-click install
npx skills add https://github.com/Aurelian1974/ERPEnterprise --skill new-vertical-slice-aurelian1974
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: new-vertical-slice
Source: https://github.com/Aurelian1974/ERPEnterprise/tree/main/.github/skills/new-vertical-slice
Command: npx skills add https://github.com/Aurelian1974/ERPEnterprise --skill new-vertical-slice-aurelian1974

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building a new ERP feature requires writing many coordinated files across layers—Command/Query, Handler, Validator, Controller, Repository, and Stored Procedures—while respecting strict conventions like zero inline SQL, Result<T> returns, and mandatory tenant_id filtering. This Skill generates the entire vertical slice consistently in one pass. ## Core Features & Use Cases - Full VSA Scaffolding: Generates Command/Query records, MediatR handlers, FluentValidation validators, API controller actions, Dapper repositories, and CREATE OR ALTER stored procedures. - Convention Enforcement: Applies strict rules automatically—UUIDv7 aggregate IDs, tenant_id in every SP, Result<T> instead of exceptions, authorization policies per endpoint. - Use Case: Ask for a new "Create Invoice" endpoint in the Billing module and receive all C# files plus the usp_CreateInvoice, usp_GetInvoiceById, and usp_ListInvoice SQL procedures following project conventions. ## Quick Start Ask the assistant to scaffold a new vertical slice feature, for example a Create operation for the Customer entity in the Sales module.

Frequently Asked Questions about new-vertical-slice

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

FAQPage Schema
How do I scaffold a new vertical slice feature in C#?▼

Request the feature by module, entity, and action (Create, Update, Delete, GetById, List). The Skill generates the Command or Query record, MediatR handler, FluentValidation validator, controller action, repository method, and stored procedure following the project's VSA conventions.

What files are generated for a new ERP endpoint?▼

Five C# files per feature (Command/Query, Handler, Validator, Request, Response), a repository method calling a stored procedure, a controller action with an authorization policy, and a CREATE OR ALTER SQL stored procedure named usp_{Action}{Entity}.

Does the repository allow inline SQL queries?▼

No. Repositories call stored procedures exclusively via Dapper CommandDefinition with CommandType.StoredProcedure. Inline SQL in C# is explicitly forbidden, and every procedure must filter by tenant_id.

How are errors handled in the generated handlers?▼

Handlers return Result<T> and never throw exceptions for business errors. Not-found cases return Result.Failure with a typed error such as {Module}Errors.{Entity}NotFound, which the controller maps to an HTTP response.

What ID strategy do the generated entities use?▼

Aggregate root IDs are UNIQUEIDENTIFIER values using UUIDv7, generated in the entity constructor and passed to the stored procedure. Child table IDs use BIGINT IDENTITY and are never exposed through the API.