create-endpoint

Generate a Minimal API endpoint with DTOs, validator, and Swagger metadata.

2|Updated May 2, 2026
One-click install
npx skills add https://github.com/andrecini/dotnet-squad-copilot-agent --skill create-endpoint-andrecini
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-endpoint
Source: https://github.com/andrecini/dotnet-squad-copilot-agent/tree/main/.claude/skills/create-endpoint
Command: npx skills add https://github.com/andrecini/dotnet-squad-copilot-agent --skill create-endpoint-andrecini

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of building a single REST endpoint in a consistent way without missing required wiring across request/response DTOs, validation, AppService delegation, AutoMapper mappings, endpoint filters, and Swagger documentation.

Core Features & Use Cases

  • Scaffold a Presentation-layer endpoint: generates the Minimal API route, DTOs (request/response), and an endpoint class placed under the API layer.
  • Add strong input validation: creates a validator for the request fields and wires it through the endpoint filter.
  • Connect to the correct application flow: generates/extends the Presentation AppService interface and class to map request → model → service → response, including AutoMapper profile updates.
  • Configure Swagger and authorization: adds OpenAPI metadata and applies authorization policy requirements when the endpoint is protected.

Quick Start

Ask to generate a POST endpoint for creating a specific resource, including the route, request/response fields, and whether authorization is required.

Frequently Asked Questions about create-endpoint

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

FAQPage Schema
How do I scaffold a Minimal API endpoint with validation and Swagger documentation?

Scaffolding a Minimal API endpoint requires generating route classes, DTOs, validators, and Swagger metadata. This tool automates that wiring, applies a ValidationFilter, configures dependency injection, and adds OpenAPI details while placing output under the API layer.

Can I add authorization to a Minimal API route during endpoint generation?

Yes, adding authorization to a Minimal API route is supported during endpoint generation. The tool applies the .RequireAuthorization method to your endpoint when requested, ensuring protected routes are configured correctly alongside their DTOs and validation logic.

Does this approach generate repository classes and database migrations for Minimal APIs?

No, this approach focuses strictly on the Presentation layer and does not generate repository classes, database migrations, or tests. It creates only the endpoint class, DTOs, validator, AppService interface, and AutoMapper mappings for a specified resource operation.

What is the best way to wire AutoMapper mappings for a new Minimal API endpoint?

The best way to wire AutoMapper mappings is to generate them alongside the AppService implementation. This tool updates your AutoMapper profile and maps request to model to response automatically, ensuring the application flow connects correctly to the endpoint.

How do I set up clean architecture dependency injection for a single Minimal API route?

Setting up clean architecture dependency injection for a single route involves generating an AppService interface and implementation. This tool writes the required dependency registrations under the API layer and delegates business logic from the endpoint to the application service.

Why use TypedResults when generating Minimal API endpoints?

Using TypedResults when generating Minimal API endpoints ensures strongly typed HTTP responses that are automatically recognized by Swagger. This tool integrates TypedResults to provide accurate OpenAPI metadata and reliable response typing for your generated routes.